diff options
Diffstat (limited to 'Hotline/macOS/FilesView.swift')
| -rw-r--r-- | Hotline/macOS/FilesView.swift | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Hotline/macOS/FilesView.swift b/Hotline/macOS/FilesView.swift index 397feb3..f698b5d 100644 --- a/Hotline/macOS/FilesView.swift +++ b/Hotline/macOS/FilesView.swift @@ -102,7 +102,8 @@ struct FilesView: View { @Environment(\.openWindow) private var openWindow @State private var selection: FileInfo? - + @State private var fileDetails: FileDetails? + private func openPreviewWindow(_ previewInfo: PreviewFileInfo) { switch previewInfo.previewType { case .image: @@ -206,6 +207,11 @@ struct FilesView: View { ToolbarItem(placement: .primaryAction) { Button { + if let s = selection { + model.fileDetails(s.name, path: s.path) { info in + fileDetails = info + } + } } label: { Label("Get File Info", systemImage: "info.circle") } @@ -224,6 +230,9 @@ struct FilesView: View { } } } + .sheet(item: $fileDetails ) { item in + FileDetailsView(fd: item) + } } } |