darkmode optimizations
This commit is contained in:
parent
624816d914
commit
40d340daa3
@ -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
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
@ -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" : {
|
||||
|
||||
BIN
readeck/Assets.xcassets/readeck.imageset/readeck2@3x@1x.png
vendored
Normal file
BIN
readeck/Assets.xcassets/readeck.imageset/readeck2@3x@1x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
readeck/Assets.xcassets/readeck.imageset/readeck2@3x@2x.png
vendored
Normal file
BIN
readeck/Assets.xcassets/readeck.imageset/readeck2@3x@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
BIN
readeck/Assets.xcassets/readeck.imageset/readeck2@3x@3x.png
vendored
Normal file
BIN
readeck/Assets.xcassets/readeck.imageset/readeck2@3x@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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()
|
||||
}
|
||||
|
||||
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user