From 833a9bfec22d4810bba71aae65a9c79b7cd3a2f9 Mon Sep 17 00:00:00 2001 From: diyaa Date: Sun, 26 Jul 2026 21:27:51 +0200 Subject: [PATCH] Add persistent app quit control --- FchatiApp/Sources/FchatiApp/FchatiApp.swift | 23 +++++++++++++++------ IMPLEMENTATION_STATUS.md | 1 + 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/FchatiApp/Sources/FchatiApp/FchatiApp.swift b/FchatiApp/Sources/FchatiApp/FchatiApp.swift index c8a1a91..4f3c049 100644 --- a/FchatiApp/Sources/FchatiApp/FchatiApp.swift +++ b/FchatiApp/Sources/FchatiApp/FchatiApp.swift @@ -1,3 +1,4 @@ +import AppKit import SwiftUI @main @@ -38,14 +39,24 @@ private struct RootView: View { var body: some View { VStack(spacing: 0) { - Picker("Section", selection: $selectedTab) { - ForEach(AppTab.allCases) { tab in - Label(tab.title, systemImage: tab.icon) - .tag(tab) + HStack(spacing: 8) { + Picker("Section", selection: $selectedTab) { + ForEach(AppTab.allCases) { tab in + Label(tab.title, systemImage: tab.icon) + .tag(tab) + } } + .pickerStyle(.segmented) + .labelsHidden() + + Button { + NSApplication.shared.terminate(nil) + } label: { + Image(systemName: "power") + } + .accessibilityLabel("Quit Fchati") + .help("Quit Fchati") } - .pickerStyle(.segmented) - .labelsHidden() .padding() Divider() diff --git a/IMPLEMENTATION_STATUS.md b/IMPLEMENTATION_STATUS.md index 96ac662..9f1b324 100644 --- a/IMPLEMENTATION_STATUS.md +++ b/IMPLEMENTATION_STATUS.md @@ -197,6 +197,7 @@ - The relay now defaults to the production Traefik certificate resolver (`myresolver`) and allows a host-specific override through `TRAEFIK_CERT_RESOLVER`. - Corrected the production hostname to `fchaty.diyaa.de` in the relay route and macOS application HTTP and WebSocket clients. - `relay-server/Dockerfile` initializes all persistent-data paths as the unprivileged `node` user, preventing pairing, queue, and upload write failures on newly created volumes. +- The macOS app now has an always-visible quit control beside the top-level tabs, in addition to the existing Settings action. ## Bug Fixes — Post-Review ✅