diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-01-05 19:46:13 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-01-05 19:46:37 -0800 |
| commit | 2f8f71d0410f59d5d303a4c221a628630168bfe2 (patch) | |
| tree | 6a18ae2e4dbd72a688667bd9e819ecee72d76b52 /Hotline/Application.swift | |
| parent | 57c33eb798f6802fe5af8fcd3d1992a4b63a448f (diff) | |
Add image preview to Files so you don't have to download images to view them, works with animated GIFs too. Added cmd-R shortcut for Servers window. More work on login view.
Diffstat (limited to 'Hotline/Application.swift')
| -rw-r--r-- | Hotline/Application.swift | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Hotline/Application.swift b/Hotline/Application.swift index 91f8dac..e08695a 100644 --- a/Hotline/Application.swift +++ b/Hotline/Application.swift @@ -20,17 +20,22 @@ struct Application: App { .environment(model) } #elseif os(macOS) + // MARK: Tracker Window Window("Servers", id: "servers") { TrackerView() .frame(minWidth: 250, minHeight: 250) } + .keyboardShortcut(.init(.init("R"), modifiers: .command)) .defaultSize(width: 700, height: 550) .defaultPosition(.center) - + + // MARK: Server Window WindowGroup(id: "server", for: Server.self) { $server in ServerView(server: $server) .frame(minWidth: 400, minHeight: 300) .environment(preferences) + } defaultValue: { + Server(name: nil, description: nil, address: "") } .defaultSize(width: 750, height: 700) .defaultPosition(.center) @@ -43,6 +48,15 @@ struct Application: App { } } +// WindowGroup(id: "preview", for: PreviewFileInfo.self) { info in +// FilePreviewView(info: info) +// .frame(minWidth: 400, minHeight: 300) +// } +// .defaultSize(width: 750, height: 700) +// .windowStyle(.hiddenTitleBar) +// .aspectRatio(nil, contentMode: .fit) + + // MARK: Settings Window Settings { SettingsView() .environment(preferences) |