From 2f8f71d0410f59d5d303a4c221a628630168bfe2 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 5 Jan 2024 19:46:13 -0800 Subject: 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. --- Hotline/Application.swift | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Hotline/Application.swift') 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) -- cgit