Files
Outpost/Outpost/Features/Account/KeyboardShortcutsView.swift
T
Puranjay Savar Mattas ef085f0018 feat(account): add account menu, about panel, and preferences (macOS)
Sidebar footer opens a popover (not Menu — its AppKit-bridged label
rendering broke on click with an avatar image in it) with profile,
keyboard shortcuts, docs/feedback links, and log out. About panel and
a minimal Preferences window round out the app-menu affordances.
2026-08-14 00:24:30 +01:00

40 lines
1.1 KiB
Swift

#if os(macOS)
import SwiftUI
struct KeyboardShortcutsView: View {
private struct Shortcut: Identifiable {
let id = UUID()
let action: String
let keys: String
}
private let shortcuts: [Shortcut] = [
Shortcut(action: "Sign In", keys: "⏎"),
Shortcut(action: "Preferences", keys: "⌘ ,"),
Shortcut(action: "Close Window", keys: "⌘ W"),
Shortcut(action: "Quit Outpost", keys: "⌘ Q")
]
var body: some View {
VStack(alignment: .leading, spacing: 16) {
Text("Keyboard Shortcuts")
.font(.title3.bold())
VStack(spacing: 10) {
ForEach(shortcuts) { shortcut in
HStack {
Text(shortcut.action)
Spacer()
Text(shortcut.keys)
.foregroundStyle(.secondary)
.monospaced()
}
}
}
}
.padding(24)
.frame(width: 280)
}
}
#endif