summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-22 08:20:08 -0800
committerFuwn <[email protected]>2025-02-22 08:20:08 -0800
commit4a2e9cdfde7f06f36f0a44ef9484b2dd134e3188 (patch)
tree86dc433f39075f4c39705d9d198df47002912526
parentfeat: Development commit (diff)
downloadsora-testing-4a2e9cdfde7f06f36f0a44ef9484b2dd134e3188.tar.xz
sora-testing-4a2e9cdfde7f06f36f0a44ef9484b2dd134e3188.zip
feat: Development commit
-rw-r--r--Sora/Views/ContentView.swift19
-rw-r--r--Sora/Views/Post/Details/PostDetailsView.swift11
2 files changed, 23 insertions, 7 deletions
diff --git a/Sora/Views/ContentView.swift b/Sora/Views/ContentView.swift
index c7ac1a6..8613e56 100644
--- a/Sora/Views/ContentView.swift
+++ b/Sora/Views/ContentView.swift
@@ -19,9 +19,14 @@ struct ContentView: View {
}
}
} content: {
- if selectedTabIndex == 1 {
+ switch selectedTabIndex {
+ case 1:
BookmarksView(selectedTab: $selectedTabIndex)
- } else {
+
+ case 2:
+ SettingsView()
+
+ default:
PostGridView()
}
} detail: {
@@ -32,6 +37,11 @@ struct ContentView: View {
.foregroundColor(.secondary)
}
}
+ #if DEBUG
+ .onAppear {
+ tabs.append("Settings")
+ }
+ #endif
#else
NavigationStack {
PostGridView()
@@ -39,8 +49,3 @@ struct ContentView: View {
#endif
}
}
-
-#Preview {
- ContentView()
- .environmentObject(Settings())
-}
diff --git a/Sora/Views/Post/Details/PostDetailsView.swift b/Sora/Views/Post/Details/PostDetailsView.swift
index 3c004ca..b8899b1 100644
--- a/Sora/Views/Post/Details/PostDetailsView.swift
+++ b/Sora/Views/Post/Details/PostDetailsView.swift
@@ -83,5 +83,16 @@ struct PostDetailsView: View {
.toolbarBackground(.visible, for: .navigationBar)
.toolbarBackground(.ultraThinMaterial, for: .navigationBar)
#endif
+ #if os(macOS)
+ .toolbar {
+ if settings.enableShareShortcut {
+ ToolbarItem {
+ ShareLink(item: imageURL!) {
+ Label("Share", systemImage: "square.and.arrow.up")
+ }
+ }
+ }
+ }
+ #endif
}
}