diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Contents.json diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon1.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon1.imageset/Contents.json new file mode 100644 index 00000000..d0de805f --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "UI_EmotionIcon1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon1.imageset/UI_EmotionIcon1.png b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon1.imageset/UI_EmotionIcon1.png new file mode 100644 index 00000000..cb6252bb Binary files /dev/null and b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon1.imageset/UI_EmotionIcon1.png differ diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon2.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon2.imageset/Contents.json new file mode 100644 index 00000000..55b88159 --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "UI_EmotionIcon2.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon2.imageset/UI_EmotionIcon2.png b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon2.imageset/UI_EmotionIcon2.png new file mode 100644 index 00000000..9fae5462 Binary files /dev/null and b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon2.imageset/UI_EmotionIcon2.png differ diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon3.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon3.imageset/Contents.json new file mode 100644 index 00000000..b5d97228 --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "UI_EmotionIcon3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon3.imageset/UI_EmotionIcon3.png b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon3.imageset/UI_EmotionIcon3.png new file mode 100644 index 00000000..21bc9324 Binary files /dev/null and b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon3.imageset/UI_EmotionIcon3.png differ diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon4.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon4.imageset/Contents.json new file mode 100644 index 00000000..de7804ee --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon4.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "UI_EmotionIcon4.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon4.imageset/UI_EmotionIcon4.png b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon4.imageset/UI_EmotionIcon4.png new file mode 100644 index 00000000..68944a84 Binary files /dev/null and b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon4.imageset/UI_EmotionIcon4.png differ diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon5.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon5.imageset/Contents.json new file mode 100644 index 00000000..68c7263b --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon5.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "UI_EmotionIcon5.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon5.imageset/UI_EmotionIcon5.png b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon5.imageset/UI_EmotionIcon5.png new file mode 100644 index 00000000..4b70b856 Binary files /dev/null and b/Assets/Assets.xcassets/GachaRankerIcons/Paimon Sticker/UI_EmotionIcon5.imageset/UI_EmotionIcon5.png differ diff --git a/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Pom-Pom_Sticker_18.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Pom-Pom_Sticker_18.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Pom-Pom_Sticker_18.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_18.imageset/Pom-Pom_Sticker_18.heic diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Pom-Pom_Sticker_19.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Pom-Pom_Sticker_19.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Pom-Pom_Sticker_19.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_19.imageset/Pom-Pom_Sticker_19.heic diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Pom-Pom_Sticker_21.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Pom-Pom_Sticker_21.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Pom-Pom_Sticker_21.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_21.imageset/Pom-Pom_Sticker_21.heic diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Pom-Pom_Sticker_23.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Pom-Pom_Sticker_23.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Pom-Pom_Sticker_23.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_23.imageset/Pom-Pom_Sticker_23.heic diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Pom-Pom_Sticker_24.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Pom-Pom_Sticker_24.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Pom-Pom_Sticker_24.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_24.imageset/Pom-Pom_Sticker_24.heic diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Pom-Pom_Sticker_30.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Pom-Pom_Sticker_30.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Pom-Pom_Sticker_30.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_30.imageset/Pom-Pom_Sticker_30.heic diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Contents.json b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Contents.json similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Contents.json rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Contents.json diff --git a/Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Pom-Pom_Sticker_32.heic b/Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Pom-Pom_Sticker_32.heic similarity index 100% rename from Assets/Assets.xcassets/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Pom-Pom_Sticker_32.heic rename to Assets/Assets.xcassets/GachaRankerIcons/Pom-Pom Sticker/Pom-Pom_Sticker_32.imageset/Pom-Pom_Sticker_32.heic diff --git a/Common/UserDefaultKeys.swift b/Common/UserDefaultKeys.swift index 0982fa2f..772f941d 100644 --- a/Common/UserDefaultKeys.swift +++ b/Common/UserDefaultKeys.swift @@ -44,6 +44,11 @@ extension DefaultsKeys { .init("checkedUpdateVersions", defaultValue: []) } + /// Whether using Paimon to evaluate the gacha records. + var useGuestGachaEvaluator: DefaultsKey { + .init("useGuestGachaEvaluator", defaultValue: false) + } + // MARK: - For widgets var widgetTimelineLatestStartAppRefreshTime: DefaultsKey { diff --git a/Features/Gacha/View/AccountGachaView.swift b/Features/Gacha/View/AccountGachaView.swift index a1c94236..0fb62759 100644 --- a/Features/Gacha/View/AccountGachaView.swift +++ b/Features/Gacha/View/AccountGachaView.swift @@ -307,7 +307,9 @@ private struct GachaStatisticSectionView: View { if gachaType != .regularWarp { VStack { HStack { - Text("gacha.account_detail.statistic.pom_pom_review") + let keyPaimon = "gacha.account_detail.statistic.paimon_review" + let keyPomPom = "gacha.account_detail.statistic.pom_pom_review" + Text(Defaults[\.useGuestGachaEvaluator] ? keyPaimon : keyPomPom) .font(.caption) .foregroundColor(.secondary) Spacer() @@ -321,10 +323,10 @@ private struct GachaStatisticSectionView: View { ForEach(Rank.allCases, id: \.rawValue) { rank in Group { if judgedRank == rank { - rank.image().resizable() + rank.image(neighborGame: Defaults[\.useGuestGachaEvaluator]).resizable() .scaledToFit() } else { - rank.image().resizable() + rank.image(neighborGame: Defaults[\.useGuestGachaEvaluator]).resizable() .scaledToFit() .opacity(0.25) } @@ -344,18 +346,18 @@ private struct GachaStatisticSectionView: View { } extension GachaStatisticSectionView.Rank { - func image() -> Image { + func image(neighborGame: Bool = false) -> Image { switch self { case .one: - return Image("Pom-Pom_Sticker_21") + return neighborGame ? Image("UI_EmotionIcon5") : Image("Pom-Pom_Sticker_21") case .two: - return Image("Pom-Pom_Sticker_32") + return neighborGame ? Image("UI_EmotionIcon4") : Image("Pom-Pom_Sticker_32") case .three: - return Image("Pom-Pom_Sticker_18") + return neighborGame ? Image("UI_EmotionIcon3") : Image("Pom-Pom_Sticker_18") case .four: - return Image("Pom-Pom_Sticker_24") + return neighborGame ? Image("UI_EmotionIcon2") : Image("Pom-Pom_Sticker_24") case .five: - return Image("Pom-Pom_Sticker_30") + return neighborGame ? Image("UI_EmotionIcon1") : Image("Pom-Pom_Sticker_30") } } diff --git a/HSRPizzaHelper.xcodeproj/project.pbxproj b/HSRPizzaHelper.xcodeproj/project.pbxproj index b0cfdd6e..fb3f0fc4 100644 --- a/HSRPizzaHelper.xcodeproj/project.pbxproj +++ b/HSRPizzaHelper.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 5BB6BD702ACAC529001D6847 /* DisplayOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BB6BD6F2ACAC529001D6847 /* DisplayOptionsView.swift */; }; BF06C4A52A04D42900EE9120 /* WebViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF06C4A42A04D42900EE9120 /* WebViews.swift */; }; BF06C4A82A04FD1F00EE9120 /* ReviewHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF06C4A72A04FD1F00EE9120 /* ReviewHandler.swift */; }; BF14CFA82A049ADB00E437C6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = BF14CFAA2A049ADB00E437C6 /* Localizable.strings */; }; @@ -312,6 +313,7 @@ 5B0BAC842A265E5700B0B8F8 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/HSRPizzaHelperWidget.strings"; sourceTree = ""; }; 5B0BAC852A265E5700B0B8F8 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = ""; }; 5B0BAC862A265E5700B0B8F8 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; + 5BB6BD6F2ACAC529001D6847 /* DisplayOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayOptionsView.swift; sourceTree = ""; }; BF06C4A42A04D42900EE9120 /* WebViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViews.swift; sourceTree = ""; }; BF06C4A72A04FD1F00EE9120 /* ReviewHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewHandler.swift; sourceTree = ""; }; BF14CFA92A049ADB00E437C6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; @@ -549,6 +551,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 5BB6BD6E2ACAC514001D6847 /* SubViews */ = { + isa = PBXGroup; + children = ( + 5BB6BD6F2ACAC529001D6847 /* DisplayOptionsView.swift */, + ); + path = SubViews; + sourceTree = ""; + }; BF14CFA72A049AC100E437C6 /* Internationalization */ = { isa = PBXGroup; children = ( @@ -1105,6 +1115,7 @@ EAE519CA2A0178D100EF23B7 /* View */ = { isa = PBXGroup; children = ( + 5BB6BD6E2ACAC514001D6847 /* SubViews */, EADA63762A0201B200BF070F /* HomeView.swift */, EAE37EBE2A0206AC00154432 /* SettingView.swift */, EA1D523D2A76521E00FA66A9 /* ToolView.swift */, @@ -1545,6 +1556,7 @@ EA5F23322A0BE87000D6D024 /* OnFocused.swift in Sources */, EA742BF92A020B8700ACB8E4 /* GetCookieWebView.swift in Sources */, EA2C06522A04AC5A00A328E6 /* TestAccountSectionView.swift in Sources */, + 5BB6BD702ACAC529001D6847 /* DisplayOptionsView.swift in Sources */, EAE519822A01738600EF23B7 /* ContentView.swift in Sources */, EA1D523E2A76521E00FA66A9 /* ToolView.swift in Sources */, EADA63752A01FF8B00BF070F /* DailyNoteViewModel.swift in Sources */, diff --git a/HSRPizzaHelper/View/SettingView.swift b/HSRPizzaHelper/View/SettingView.swift index 11d4a9c9..761367cd 100644 --- a/HSRPizzaHelper/View/SettingView.swift +++ b/HSRPizzaHelper/View/SettingView.swift @@ -38,6 +38,15 @@ struct SettingView: View { Image(systemSymbol: .bellBadgeFill) } } + NavigationLink { + DisplayOptionsView() + } label: { + Label { + Text("setting.uirelated.title") + } icon: { + Image(systemSymbol: .uiwindowSplit2x1) + } + } } Section { Button { diff --git a/HSRPizzaHelper/View/SubViews/DisplayOptionsView.swift b/HSRPizzaHelper/View/SubViews/DisplayOptionsView.swift new file mode 100644 index 00000000..1e1330cb --- /dev/null +++ b/HSRPizzaHelper/View/SubViews/DisplayOptionsView.swift @@ -0,0 +1,38 @@ +// +// DisplayOptionsView.swift +// HSRPizzaHelper +// +// Created by ShikiSuen on 2023/10/2. +// + +import SwiftUI +import SwiftyUserDefaults + +struct DisplayOptionsView: View { + @State var useGuestGachaEvaluator = Binding( + get: { + Defaults[\.useGuestGachaEvaluator] + }, + set: { + Defaults[\.useGuestGachaEvaluator] = $0 + } + ) + + var body: some View { + Group { + mainView() + } + .inlineNavigationTitle("setting.uirelated.title") + } + + @ViewBuilder + func mainView() -> some View { + List { + Section { + Toggle(isOn: useGuestGachaEvaluator) { + Text("setting.uirelated.useguestgachaevaluator") + } + } + } + } +} diff --git a/Internationalization/en.lproj/Localizable.strings b/Internationalization/en.lproj/Localizable.strings index e98bd0e4..3cd1f8ff 100644 --- a/Internationalization/en.lproj/Localizable.strings +++ b/Internationalization/en.lproj/Localizable.strings @@ -214,6 +214,8 @@ "setting.notification.daily_training.header" = "Daily Training"; "setting.notification.daily_training.date_picker" = "Notify me at"; "setting.notification.daily_training.footer" = "China mainland server user only. "; +"setting.uirelated.title" = "UI Settings"; +"setting.uirelated.useguestgachaevaluator" = "Let Paimon evaluate the warps instead"; "sys.weekday.sunday" = "Sunday"; "sys.weekday.monday" = "Monday"; "sys.weekday.tuesday" = "Tuesday"; @@ -314,6 +316,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "5-star Average Pulls"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "Limited 5-star Average Pulls"; "gacha.account_detail.statistic.won_5050" = "Won 50/50"; +"gacha.account_detail.statistic.paimon_review" = "Paimon's Review"; "gacha.account_detail.statistic.pom_pom_review" = "Pom-Pom's Review"; "gacha.account_detail.detail.title" = "Detail"; "gacha.account_detail.detail.filter.header" = "Filter"; diff --git a/Internationalization/es.lproj/Localizable.strings b/Internationalization/es.lproj/Localizable.strings index fc34f632..f62a103c 100644 --- a/Internationalization/es.lproj/Localizable.strings +++ b/Internationalization/es.lproj/Localizable.strings @@ -214,6 +214,8 @@ "setting.notification.daily_training.header" = "Entrenamiento Diario"; "setting.notification.daily_training.date_picker" = "Notificarme cuando"; "setting.notification.daily_training.footer" = "Solo para usuarios del servidor de China Continental. "; +"setting.uirelated.title" = "UI Settings"; +"setting.uirelated.useguestgachaevaluator" = "Let Paimon evaluate the warps instead"; "sys.weekday.sunday" = "Domingo "; "sys.weekday.monday" = "Lunes"; "sys.weekday.tuesday" = "Martes"; @@ -314,6 +316,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "5-star Average Pulls"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "Limited 5-star Average Pulls"; "gacha.account_detail.statistic.won_5050" = "Won 50/50"; +"gacha.account_detail.statistic.paimon_review" = "Paimon's Review"; "gacha.account_detail.statistic.pom_pom_review" = "Pom-Pom's Review"; "gacha.account_detail.detail.title" = "Detail"; "gacha.account_detail.detail.filter.header" = "Filter"; diff --git a/Internationalization/ja.lproj/Localizable.strings b/Internationalization/ja.lproj/Localizable.strings index eb00f0a8..d2b8046a 100644 --- a/Internationalization/ja.lproj/Localizable.strings +++ b/Internationalization/ja.lproj/Localizable.strings @@ -214,6 +214,8 @@ "setting.notification.daily_training.header" = "デイリー訓練"; "setting.notification.daily_training.date_picker" = "通知の時間:"; "setting.notification.daily_training.footer" = "中国大陸サーバー限定機能である。"; +"setting.uirelated.title" = "操作画面設定"; +"setting.uirelated.useguestgachaevaluator" = "パイモンに跳躍の評価を"; "sys.weekday.sunday" = "日曜日"; "sys.weekday.monday" = "月曜日"; "sys.weekday.tuesday" = "火曜日"; @@ -314,6 +316,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "星5平均ガチャ回數"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "限定星5平均ガチャ回數"; "gacha.account_detail.statistic.won_5050" = "すり抜け回避率"; +"gacha.account_detail.statistic.paimon_review" = "パイモンの評価"; "gacha.account_detail.statistic.pom_pom_review" = "パムの評価"; "gacha.account_detail.detail.title" = "詳細記録"; "gacha.account_detail.detail.filter.header" = "フィルター"; diff --git a/Internationalization/ru.lproj/Localizable.strings b/Internationalization/ru.lproj/Localizable.strings index 24190e92..199f6ed8 100644 --- a/Internationalization/ru.lproj/Localizable.strings +++ b/Internationalization/ru.lproj/Localizable.strings @@ -214,6 +214,8 @@ "setting.notification.daily_training.header" = "Daily Training"; "setting.notification.daily_training.date_picker" = "Notify me at"; "setting.notification.daily_training.footer" = "China mainland server user only. "; +"setting.uirelated.title" = "UI Settings"; +"setting.uirelated.useguestgachaevaluator" = "Let Paimon evaluate the warps instead"; "sys.weekday.sunday" = "Sunday"; "sys.weekday.monday" = "Monday"; "sys.weekday.tuesday" = "Tuesday"; @@ -314,6 +316,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "5-star Average Pulls"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "Limited 5-star Average Pulls"; "gacha.account_detail.statistic.won_5050" = "Won 50/50"; +"gacha.account_detail.statistic.paimon_review" = "Paimon's Review"; "gacha.account_detail.statistic.pom_pom_review" = "Pom-Pom's Review"; "gacha.account_detail.detail.title" = "Detail"; "gacha.account_detail.detail.filter.header" = "Filter"; diff --git a/Internationalization/vi.lproj/Localizable.strings b/Internationalization/vi.lproj/Localizable.strings index a2983255..7845d718 100644 --- a/Internationalization/vi.lproj/Localizable.strings +++ b/Internationalization/vi.lproj/Localizable.strings @@ -314,6 +314,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "5-star Average Pulls"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "Limited 5-star Average Pulls"; "gacha.account_detail.statistic.won_5050" = "Won 50/50"; +"gacha.account_detail.statistic.paimon_review" = "Paimon's Review"; "gacha.account_detail.statistic.pom_pom_review" = "Pom-Pom's Review"; "gacha.account_detail.detail.title" = "Detail"; "gacha.account_detail.detail.filter.header" = "Filter"; diff --git a/Internationalization/zh-Hans.lproj/Localizable.strings b/Internationalization/zh-Hans.lproj/Localizable.strings index 8b44cf31..050d92b0 100644 --- a/Internationalization/zh-Hans.lproj/Localizable.strings +++ b/Internationalization/zh-Hans.lproj/Localizable.strings @@ -214,6 +214,8 @@ "setting.notification.daily_training.header" = "每日实训"; "setting.notification.daily_training.date_picker" = "提醒于"; "setting.notification.daily_training.footer" = "仅中国大陆服务器用户。"; +"setting.uirelated.title" = "界面设置"; +"setting.uirelated.useguestgachaevaluator" = "改由派蒙评价跃迁"; "sys.weekday.sunday" = "星期日"; "sys.weekday.monday" = "星期一"; "sys.weekday.tuesday" = "星期二"; @@ -314,6 +316,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "五星平均抽数"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "限定五星平均抽数"; "gacha.account_detail.statistic.won_5050" = "不歪率"; +"gacha.account_detail.statistic.paimon_review" = "派蒙的评价"; "gacha.account_detail.statistic.pom_pom_review" = "帕姆的评价"; "gacha.account_detail.detail.title" = "详细记录"; "gacha.account_detail.detail.filter.header" = "筛选"; diff --git a/Internationalization/zh-Hant.lproj/Localizable.strings b/Internationalization/zh-Hant.lproj/Localizable.strings index b491f9ac..d5a303a2 100644 --- a/Internationalization/zh-Hant.lproj/Localizable.strings +++ b/Internationalization/zh-Hant.lproj/Localizable.strings @@ -214,6 +214,8 @@ "setting.notification.daily_training.header" = "每日實訓"; "setting.notification.daily_training.date_picker" = "提醒於"; "setting.notification.daily_training.footer" = "僅限中國內地伺服器。"; +"setting.uirelated.title" = "介面設定"; +"setting.uirelated.useguestgachaevaluator" = "改由派蒙評價躍遷"; "sys.weekday.sunday" = "星期日"; "sys.weekday.monday" = "星期一"; "sys.weekday.tuesday" = "星期二"; @@ -314,6 +316,7 @@ "gacha.account_detail.statistic.5_star_avg_pull" = "五星平均抽數"; "gacha.account_detail.statistic.limited_5_star_avg_pull" = "限定五星平均抽數"; "gacha.account_detail.statistic.won_5050" = "不歪率"; +"gacha.account_detail.statistic.paimon_review" = "派蒙的評價"; "gacha.account_detail.statistic.pom_pom_review" = "帕姆的評價"; "gacha.account_detail.detail.title" = "詳細記錄"; "gacha.account_detail.detail.filter.header" = "篩選";