diff --git a/readeck/Assets.xcassets/bookmark_list_bg.colorset/Contents.json b/readeck/Assets.xcassets/bookmark_list_bg.colorset/Contents.json new file mode 100644 index 0000000..8383a25 --- /dev/null +++ b/readeck/Assets.xcassets/bookmark_list_bg.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0xFB", + "red" : "0xFC" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x27", + "green" : "0x26", + "red" : "0x21" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/readeck/Assets.xcassets/menu_sidebar_bg.colorset/Contents.json b/readeck/Assets.xcassets/menu_sidebar_bg.colorset/Contents.json new file mode 100644 index 0000000..6d68ad2 --- /dev/null +++ b/readeck/Assets.xcassets/menu_sidebar_bg.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF7", + "green" : "0xF8", + "red" : "0xF9" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x39", + "green" : "0x37", + "red" : "0x30" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/readeck/Assets.xcassets/readeck.imageset/Contents.json b/readeck/Assets.xcassets/readeck.imageset/Contents.json index 59c7294..b033310 100644 --- a/readeck/Assets.xcassets/readeck.imageset/Contents.json +++ b/readeck/Assets.xcassets/readeck.imageset/Contents.json @@ -5,15 +5,48 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "readeck2@3x@1x.png", + "idiom" : "universal", + "scale" : "1x" + }, { "filename" : "readeck2@2x.png", "idiom" : "universal", "scale" : "2x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "readeck2@3x@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, { "filename" : "readeck2@3x.png", "idiom" : "universal", "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "readeck2@3x@3x.png", + "idiom" : "universal", + "scale" : "3x" } ], "info" : { diff --git a/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@1x.png b/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@1x.png new file mode 100644 index 0000000..9c3ef4d Binary files /dev/null and b/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@1x.png differ diff --git a/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@2x.png b/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@2x.png new file mode 100644 index 0000000..371fb67 Binary files /dev/null and b/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@2x.png differ diff --git a/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@3x.png b/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@3x.png new file mode 100644 index 0000000..6cbfc11 Binary files /dev/null and b/readeck/Assets.xcassets/readeck.imageset/readeck2@3x@3x.png differ diff --git a/readeck/UI/BookmarkDetail/BookmarkDetailView.swift b/readeck/UI/BookmarkDetail/BookmarkDetailView.swift index 6c8c9b6..470980f 100644 --- a/readeck/UI/BookmarkDetail/BookmarkDetailView.swift +++ b/readeck/UI/BookmarkDetail/BookmarkDetailView.swift @@ -210,7 +210,7 @@ struct BookmarkDetailView: View { Text("Bookmark archivieren") } .font(.title3.bold()) - .frame(maxWidth: .infinity) + .frame(maxWidth: .infinity, maxHeight: 40) } .buttonStyle(.borderedProminent) .disabled(viewModel.isLoading) diff --git a/readeck/UI/Bookmarks/BookmarkCardView.swift b/readeck/UI/Bookmarks/BookmarkCardView.swift index 006fc46..468f31c 100644 --- a/readeck/UI/Bookmarks/BookmarkCardView.swift +++ b/readeck/UI/Bookmarks/BookmarkCardView.swift @@ -2,6 +2,9 @@ import SwiftUI import SafariServices struct BookmarkCardView: View { + + @Environment(\.colorScheme) var colorScheme + let bookmark: Bookmark let currentState: BookmarkState let onArchive: (Bookmark) -> Void @@ -75,9 +78,9 @@ struct BookmarkCardView: View { .padding(.horizontal, 12) .padding(.bottom, 12) } - .background(Color(.systemBackground)) + .background(Color(R.color.bookmark_list_bg)) .clipShape(RoundedRectangle(cornerRadius: 12)) - .shadow(color: .black.opacity(0.1), radius: 2, x: 0, y: 1) + .shadow(color: colorScheme == .light ? .black.opacity(0.1) : .white.opacity(0.1), radius: 2, x: 0, y: 1) .swipeActions(edge: .trailing, allowsFullSwipe: true) { Button("Löschen", role: .destructive) { onDelete(bookmark) diff --git a/readeck/UI/Bookmarks/BookmarksView.swift b/readeck/UI/Bookmarks/BookmarksView.swift index 533225c..712831a 100644 --- a/readeck/UI/Bookmarks/BookmarksView.swift +++ b/readeck/UI/Bookmarks/BookmarksView.swift @@ -74,10 +74,12 @@ struct BookmarksView: View { .buttonStyle(PlainButtonStyle()) .listRowInsets(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16)) .listRowSeparator(.hidden) - .listRowBackground(Color.clear) + .listRowBackground(Color(R.color.bookmark_list_bg)) } } .listStyle(.plain) + .background(Color(R.color.bookmark_list_bg)) + .scrollContentBackground(.hidden) .refreshable { await viewModel.refreshBookmarks() } diff --git a/readeck/UI/Menu/PadSidebarView.swift b/readeck/UI/Menu/PadSidebarView.swift index 66d67a0..bd87179 100644 --- a/readeck/UI/Menu/PadSidebarView.swift +++ b/readeck/UI/Menu/PadSidebarView.swift @@ -25,20 +25,28 @@ struct PadSidebarView: View { .frame(maxWidth: .infinity, alignment: .leading) .contentShape(Rectangle()) } - .listRowBackground(selectedTab == tab ? Color.accentColor.opacity(0.15) : Color.clear) + .listRowBackground(selectedTab == tab ? Color.accentColor.opacity(0.15) : Color(R.color.menu_sidebar_bg)) if tab == .archived { Spacer() + .listRowBackground(Color(R.color.menu_sidebar_bg)) } if tab == .pictures { - Spacer() - Divider() - Spacer() + Group { + Spacer() + Divider() + Spacer() + } + .listRowBackground(Color(R.color.menu_sidebar_bg)) + } } } + .listRowBackground(Color(R.color.menu_sidebar_bg)) + .background(Color(R.color.menu_sidebar_bg)) .listStyle(.sidebar) + .scrollContentBackground(.hidden) .safeAreaInset(edge: .bottom, alignment: .center) { VStack(spacing: 0) { Divider() @@ -51,10 +59,10 @@ struct PadSidebarView: View { .padding(.vertical, 12) .contentShape(Rectangle()) } - .listRowBackground(selectedTab == .settings ? Color.accentColor.opacity(0.15) : Color.clear) + .listRowBackground(selectedTab == .settings ? Color.accentColor.opacity(0.15) : Color(R.color.menu_sidebar_bg)) } .padding(.horizontal, 12) - .background(Color(.systemGroupedBackground)) + .background(Color(R.color.menu_sidebar_bg)) } } content: { Group { @@ -82,6 +90,8 @@ struct PadSidebarView: View { } } .navigationTitle(selectedTab.label) + + } detail: { if let bookmark = selectedBookmark, selectedTab != .settings { BookmarkDetailView(bookmarkId: bookmark.id) @@ -90,5 +100,6 @@ struct PadSidebarView: View { .foregroundColor(.gray) } } + .background(Color(R.color.menu_sidebar_bg)) } } diff --git a/readeck/UI/Menu/PhoneTabView.swift b/readeck/UI/Menu/PhoneTabView.swift index 6f845bc..0900bda 100644 --- a/readeck/UI/Menu/PhoneTabView.swift +++ b/readeck/UI/Menu/PhoneTabView.swift @@ -34,8 +34,11 @@ struct PhoneTabView: View { } label: { Label(tab.label, systemImage: tab.systemImage) } + .listRowBackground(Color(R.color.bookmark_list_bg)) } .navigationTitle("Mehr") + .scrollContentBackground(.hidden) + .background(Color(R.color.bookmark_list_bg)) } .tabItem { Label("Mehr", systemImage: "ellipsis") diff --git a/readeck/UI/readeckApp.swift b/readeck/UI/readeckApp.swift index 0cd5712..952339d 100644 --- a/readeck/UI/readeckApp.swift +++ b/readeck/UI/readeckApp.swift @@ -11,7 +11,7 @@ import netfox @main struct readeckApp: App { let persistenceController = PersistenceController.shared - @State private var hasFinishedSetup = false + @State private var hasFinishedSetup = true var body: some Scene { WindowGroup {