Skip to content

Commit eaf0701

Browse files
committed
chore: formatting
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
1 parent b4bb0f5 commit eaf0701

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

Sushitrain/BrowserView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,11 @@ struct BrowserView: View {
367367
Label("All files and folders", systemImage: "folder").tag(BrowserViewFilterAvailability.all)
368368
Label("Only files on this device", systemImage: "folder.fill").tag(BrowserViewFilterAvailability.localOnly)
369369
}.pickerStyle(.inline)
370-
370+
371371
Divider()
372-
372+
373373
Toggle("Hide dotfiles", isOn: userSettings.$dotFilesHidden)
374-
374+
375375
} label: {
376376
Label("Filter", systemImage: "line.3.horizontal.decrease")
377377
.tint(self.currentFilterAvailability == .all ? nil : Color.accentColor)

Sushitrain/EncryptionView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ struct EncryptionView: View {
7575
writeTextToPasteboard(self.fileKey)
7676
}
7777
.disabled(self.folderPassword.isEmpty || self.fileKey.isEmpty)
78+
#if os(macOS)
79+
.buttonStyle(.link)
80+
#endif
7881
}
7982
}
8083
.task {

Sushitrain/EntryDownloaderView.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private class DownloadOperation: NSObject, ObservableObject, SushitrainDownloadD
1414
@Published var downloadedFileURL: URL? = nil
1515
private var lock = NSLock()
1616
private var cancelled = false
17-
17+
1818
deinit {
1919
self.cancel()
2020
}
@@ -52,12 +52,12 @@ private class DownloadOperation: NSObject, ObservableObject, SushitrainDownloadD
5252
}
5353
}
5454

55-
/** A view that downloads an item and then performs a configurable action, such as quick look. */
55+
/// A view that downloads an item and then performs a configurable action, such as quick look.
5656
struct EntryDownloaderView: View {
5757
enum AfterDownloadAction: Identifiable {
5858
case quickLook(dismissAfterClose: Bool)
5959
case share
60-
60+
6161
var id: String {
6262
switch self {
6363
case .quickLook(dismissAfterClose: let a):
@@ -70,7 +70,7 @@ struct EntryDownloaderView: View {
7070

7171
let file: SushitrainDownloadableProtocol
7272
let action: AfterDownloadAction
73-
73+
7474
@Environment(AppState.self) private var appState
7575

7676
@StateObject private var downloadOperation: DownloadOperation = DownloadOperation()
@@ -112,7 +112,7 @@ struct EntryDownloaderView: View {
112112
if case .quickLook(_) = action, !quicklookHidden {
113113
return self.downloadOperation.downloadedFileURL
114114
}
115-
115+
116116
return nil
117117
},
118118
set: { p in
@@ -145,7 +145,7 @@ struct EntryDownloaderView: View {
145145
self.cancelAndDeleteFiles()
146146
}
147147
}
148-
148+
149149
@ViewBuilder private func actionView(_ url: URL) -> some View {
150150
switch self.action {
151151
case .quickLook(dismissAfterClose: _):
@@ -155,7 +155,7 @@ struct EntryDownloaderView: View {
155155
).onTapGesture {
156156
quicklookHidden = false
157157
}
158-
158+
159159
case .share:
160160
ShareLink(item: url)
161161
Button("Save a copy...", systemImage: "square.and.arrow.down") {

Sushitrain/FileView.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ struct FileView: View {
240240
}
241241
}
242242
}
243-
243+
244244
@ViewBuilder private func fileDetailsSection() -> some View {
245245
Section {
246246
if !file.isDirectory() && !file.isSymlink() {
@@ -472,14 +472,14 @@ struct FileView: View {
472472
@ViewBuilder private func downloaderSheet(action: EntryDownloaderView.AfterDownloadAction) -> some View {
473473
NavigationStack {
474474
EntryDownloaderView(file: file, action: action)
475-
#if os(iOS)
476-
.navigationBarTitleDisplayMode(.inline)
477-
#endif
478-
.toolbar {
479-
SheetButton(role: .cancel) {
480-
showDownloader = nil
475+
#if os(iOS)
476+
.navigationBarTitleDisplayMode(.inline)
477+
#endif
478+
.toolbar {
479+
SheetButton(role: .cancel) {
480+
showDownloader = nil
481+
}
481482
}
482-
}
483483
}
484484
}
485485

Sushitrain/FileViewerView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct FileViewerView: View {
134134
}
135135
#endif
136136
}
137-
137+
138138
#if os(macOS)
139139
if let siblings = siblings, let selfIndex = selfIndex {
140140
ToolbarItemGroup(placement: .automatic) {

0 commit comments

Comments
 (0)