From 78fc6a1563cabb72b0a0268963a966e3893fd209 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 7 Jun 2025 07:23:24 -0700 Subject: feat: Development commit --- Localizable.xcstrings | 3 +++ Sora/Views/MainView.swift | 8 +++++--- Sora/Views/Post/Details/PostDetailsView.swift | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 581f479..85ed2b4 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -138,6 +138,9 @@ }, "Import Failed" : { + }, + "In %@" : { + }, "Invalid Domain" : { diff --git a/Sora/Views/MainView.swift b/Sora/Views/MainView.swift index 44a0a8a..87bc090 100644 --- a/Sora/Views/MainView.swift +++ b/Sora/Views/MainView.swift @@ -86,9 +86,11 @@ struct MainView: View { } #Preview { - let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1_920, height: 1_080) - let heightCoefficient = screenSize.height / 1_080 - let widthCoefficient = screenSize.width / 1_440 + #if os(macOS) + let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1_920, height: 1_080) + let heightCoefficient = screenSize.height / 1_080 + let widthCoefficient = screenSize.width / 1_440 + #endif MainView() .environmentObject(SettingsManager()) diff --git a/Sora/Views/Post/Details/PostDetailsView.swift b/Sora/Views/Post/Details/PostDetailsView.swift index e040bc3..108f12c 100644 --- a/Sora/Views/Post/Details/PostDetailsView.swift +++ b/Sora/Views/Post/Details/PostDetailsView.swift @@ -119,7 +119,9 @@ struct PostDetailsView: View { } .sheet(isPresented: $isTagsSheetPresented) { PostDetailsTagsView(isPresented: $isTagsSheetPresented, tags: post.tags) - .frame(minHeight: 250) + #if os(macOS) + .frame(minHeight: (NSScreen.main?.frame.height ?? 1_080) / 2, maxHeight: .infinity) + #endif } } } -- cgit v1.2.3