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",
|
"idiom" : "universal",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filename" : "readeck2@3x@1x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"filename" : "readeck2@2x.png",
|
"filename" : "readeck2@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filename" : "readeck2@3x@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"filename" : "readeck2@3x.png",
|
"filename" : "readeck2@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filename" : "readeck2@3x@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"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")
|
Text("Bookmark archivieren")
|
||||||
}
|
}
|
||||||
.font(.title3.bold())
|
.font(.title3.bold())
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: 40)
|
||||||
}
|
}
|
||||||
.buttonStyle(.borderedProminent)
|
.buttonStyle(.borderedProminent)
|
||||||
.disabled(viewModel.isLoading)
|
.disabled(viewModel.isLoading)
|
||||||
|
|||||||
@ -2,6 +2,9 @@ import SwiftUI
|
|||||||
import SafariServices
|
import SafariServices
|
||||||
|
|
||||||
struct BookmarkCardView: View {
|
struct BookmarkCardView: View {
|
||||||
|
|
||||||
|
@Environment(\.colorScheme) var colorScheme
|
||||||
|
|
||||||
let bookmark: Bookmark
|
let bookmark: Bookmark
|
||||||
let currentState: BookmarkState
|
let currentState: BookmarkState
|
||||||
let onArchive: (Bookmark) -> Void
|
let onArchive: (Bookmark) -> Void
|
||||||
@ -75,9 +78,9 @@ struct BookmarkCardView: View {
|
|||||||
.padding(.horizontal, 12)
|
.padding(.horizontal, 12)
|
||||||
.padding(.bottom, 12)
|
.padding(.bottom, 12)
|
||||||
}
|
}
|
||||||
.background(Color(.systemBackground))
|
.background(Color(R.color.bookmark_list_bg))
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
.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) {
|
.swipeActions(edge: .trailing, allowsFullSwipe: true) {
|
||||||
Button("Löschen", role: .destructive) {
|
Button("Löschen", role: .destructive) {
|
||||||
onDelete(bookmark)
|
onDelete(bookmark)
|
||||||
|
|||||||
@ -74,10 +74,12 @@ struct BookmarksView: View {
|
|||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
.listRowInsets(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
|
.listRowInsets(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
|
||||||
.listRowSeparator(.hidden)
|
.listRowSeparator(.hidden)
|
||||||
.listRowBackground(Color.clear)
|
.listRowBackground(Color(R.color.bookmark_list_bg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.listStyle(.plain)
|
.listStyle(.plain)
|
||||||
|
.background(Color(R.color.bookmark_list_bg))
|
||||||
|
.scrollContentBackground(.hidden)
|
||||||
.refreshable {
|
.refreshable {
|
||||||
await viewModel.refreshBookmarks()
|
await viewModel.refreshBookmarks()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,20 +25,28 @@ struct PadSidebarView: View {
|
|||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.contentShape(Rectangle())
|
.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 {
|
if tab == .archived {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
.listRowBackground(Color(R.color.menu_sidebar_bg))
|
||||||
}
|
}
|
||||||
|
|
||||||
if tab == .pictures {
|
if tab == .pictures {
|
||||||
Spacer()
|
Group {
|
||||||
Divider()
|
Spacer()
|
||||||
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)
|
.listStyle(.sidebar)
|
||||||
|
.scrollContentBackground(.hidden)
|
||||||
.safeAreaInset(edge: .bottom, alignment: .center) {
|
.safeAreaInset(edge: .bottom, alignment: .center) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Divider()
|
Divider()
|
||||||
@ -51,10 +59,10 @@ struct PadSidebarView: View {
|
|||||||
.padding(.vertical, 12)
|
.padding(.vertical, 12)
|
||||||
.contentShape(Rectangle())
|
.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)
|
.padding(.horizontal, 12)
|
||||||
.background(Color(.systemGroupedBackground))
|
.background(Color(R.color.menu_sidebar_bg))
|
||||||
}
|
}
|
||||||
} content: {
|
} content: {
|
||||||
Group {
|
Group {
|
||||||
@ -82,6 +90,8 @@ struct PadSidebarView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle(selectedTab.label)
|
.navigationTitle(selectedTab.label)
|
||||||
|
|
||||||
|
|
||||||
} detail: {
|
} detail: {
|
||||||
if let bookmark = selectedBookmark, selectedTab != .settings {
|
if let bookmark = selectedBookmark, selectedTab != .settings {
|
||||||
BookmarkDetailView(bookmarkId: bookmark.id)
|
BookmarkDetailView(bookmarkId: bookmark.id)
|
||||||
@ -90,5 +100,6 @@ struct PadSidebarView: View {
|
|||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.background(Color(R.color.menu_sidebar_bg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,8 +34,11 @@ struct PhoneTabView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Label(tab.label, systemImage: tab.systemImage)
|
Label(tab.label, systemImage: tab.systemImage)
|
||||||
}
|
}
|
||||||
|
.listRowBackground(Color(R.color.bookmark_list_bg))
|
||||||
}
|
}
|
||||||
.navigationTitle("Mehr")
|
.navigationTitle("Mehr")
|
||||||
|
.scrollContentBackground(.hidden)
|
||||||
|
.background(Color(R.color.bookmark_list_bg))
|
||||||
}
|
}
|
||||||
.tabItem {
|
.tabItem {
|
||||||
Label("Mehr", systemImage: "ellipsis")
|
Label("Mehr", systemImage: "ellipsis")
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import netfox
|
|||||||
@main
|
@main
|
||||||
struct readeckApp: App {
|
struct readeckApp: App {
|
||||||
let persistenceController = PersistenceController.shared
|
let persistenceController = PersistenceController.shared
|
||||||
@State private var hasFinishedSetup = false
|
@State private var hasFinishedSetup = true
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user