Skip to content

Commit

Permalink
夜间模式配色优化(之前某些UI有点看不清); 更新 readme 说明文件
Browse files Browse the repository at this point in the history
  • Loading branch information
Hext123 committed Jan 15, 2022
1 parent c5bd3b2 commit 5a58906
Show file tree
Hide file tree
Showing 18 changed files with 308 additions and 38 deletions.
4 changes: 0 additions & 4 deletions ios/PushDeer-iOS/PushDeer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
5292F4FD2776BC7A00B9A7BB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5292F4FC2776BC7A00B9A7BB /* Assets.xcassets */; };
5292F5002776BC7A00B9A7BB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5292F4FF2776BC7A00B9A7BB /* Preview Assets.xcassets */; };
52B8CF5F277DE660004CB680 /* AppleSignInButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B8CF5E277DE660004CB680 /* AppleSignInButton.swift */; };
52B8CF6B277E0B46004CB680 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52B8CF6A277E0B46004CB680 /* Assets.xcassets */; };
52B8CF6E277E0B46004CB680 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52B8CF6D277E0B46004CB680 /* Preview Assets.xcassets */; };
52B8CF73277E0B46004CB680 /* PushDeerClip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = 52B8CF64277E0B44004CB680 /* PushDeerClip.app */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
52B8CF78277E0BF1004CB680 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52163EB227773F8400594190 /* MainView.swift */; };
Expand Down Expand Up @@ -127,7 +126,6 @@
5292F4FF2776BC7A00B9A7BB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
52B8CF5E277DE660004CB680 /* AppleSignInButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleSignInButton.swift; sourceTree = "<group>"; };
52B8CF64277E0B44004CB680 /* PushDeerClip.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PushDeerClip.app; sourceTree = BUILT_PRODUCTS_DIR; };
52B8CF6A277E0B46004CB680 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
52B8CF6D277E0B46004CB680 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
52B8CF6F277E0B46004CB680 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
52B8CF70277E0B46004CB680 /* PushDeerClip.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PushDeerClip.entitlements; sourceTree = "<group>"; };
Expand Down Expand Up @@ -268,7 +266,6 @@
52B8CF65277E0B44004CB680 /* PushDeerClip */ = {
isa = PBXGroup;
children = (
52B8CF6A277E0B46004CB680 /* Assets.xcassets */,
52B8CF6F277E0B46004CB680 /* Info.plist */,
52E317DD279305BB000B8BB1 /* InfoPlist.strings */,
52B8CF70277E0B46004CB680 /* PushDeerClip.entitlements */,
Expand Down Expand Up @@ -434,7 +431,6 @@
52B8CF6E277E0B46004CB680 /* Preview Assets.xcassets in Resources */,
52E317DF279305BB000B8BB1 /* InfoPlist.strings in Resources */,
52B8CF87277E0C5C004CB680 /* Assets.xcassets in Resources */,
52B8CF6B277E0B46004CB680 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB3",
"green" : "0x5D",
"red" : "0x4D"
}
},
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x89",
"green" : "0x47",
"red" : "0x3B"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x66",
"green" : "0x34",
"red" : "0x2B"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE5",
"green" : "0xE5",
"red" : "0xE5"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.100",
"green" : "0.100",
"red" : "0.100"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.667",
"green" : "0.667",
"red" : "0.667"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.365",
"green" : "0.365",
"red" : "0.365"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.500",
"green" : "0.500",
"red" : "0.500"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.700",
"green" : "0.700",
"red" : "0.700"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.333",
"green" : "0.333",
"red" : "0.333"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.800",
"green" : "0.800",
"red" : "0.800"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ struct BaseNavigationView<Content : View> : View {
/// 页面主体View
@ViewBuilder let contentView: Content

@Environment(\.colorScheme) private var colorScheme

var body: some View {
NavigationView {
ZStack {
Expand All @@ -27,7 +29,9 @@ struct BaseNavigationView<Content : View> : View {
contentView
}
.background(
Image("deer.gray").offset(x: -150, y: -10),
Image("deer.gray")
.offset(x: -150, y: -10)
.opacity(colorScheme == .dark ? 0.4 : 1),
alignment: .bottom
)
.navigationBarTitle(title)
Expand All @@ -41,5 +45,6 @@ struct BaseNavigationView_Previews: PreviewProvider {
BaseNavigationView(title: "标题") {
Text("内容")
}
.environment(\.colorScheme, .dark)
}
}
4 changes: 3 additions & 1 deletion ios/PushDeer-iOS/PushDeer/View/DeviceListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ struct DeviceListView: View {

struct DeviceView_Previews: PreviewProvider {
static var previews: some View {
DeviceListView().environmentObject(AppState.shared)
DeviceListView()
.environmentObject(AppState.shared)
.environment(\.colorScheme, .dark)
}
}
4 changes: 2 additions & 2 deletions ios/PushDeer-iOS/PushDeer/View/KeyItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct KeyItemView: View {
.font(.system(size: 14))
.disabled(true)
.padding(12)
.overlay(RoundedRectangle(cornerRadius: 4).stroke(Color(UIColor.lightGray)))
.overlay(RoundedRectangle(cornerRadius: 4).stroke(Color("borderColor")))
.foregroundColor(Color.gray)

HLine().stroke(Color.gray, style: StrokeStyle(lineWidth: 1, dash: [5]))
Expand Down Expand Up @@ -78,7 +78,7 @@ struct KeyItemView: View {
.font(.system(size: 20))
.frame(width: 90, height: 42)
.foregroundColor(Color.white)
.background(Color.accentColor)
.background(Color("BtnBgColor"))
.cornerRadius(8)
}
}
Expand Down
1 change: 1 addition & 0 deletions ios/PushDeer-iOS/PushDeer/View/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct LoginView: View {
}
}
)
.overlay(RoundedRectangle(cornerRadius: 6).stroke(Color.white))
.frame(maxWidth: 375, minHeight: 64, maxHeight: 64)
.padding()
}
Expand Down
Loading

0 comments on commit 5a58906

Please sign in to comment.