Skip to content

Commit e208efb

Browse files
committed
1.1
1 parent 83547ba commit e208efb

File tree

7 files changed

+50
-7
lines changed

7 files changed

+50
-7
lines changed

Geranium.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@
864864
ENABLE_PREVIEWS = YES;
865865
GENERATE_INFOPLIST_FILE = YES;
866866
INFOPLIST_FILE = Geranium/Info.plist;
867+
INFOPLIST_KEY_CFBundleDisplayName = Geranium;
867868
INFOPLIST_KEY_LSApplicationCategoryType = "";
868869
INFOPLIST_KEY_NSLocationUsageDescription = "Enabling location for Geranium makes it possible for the app to display your location on the map.";
869870
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "This will allow the app to display your location on the LocSim map.";
@@ -902,6 +903,7 @@
902903
ENABLE_PREVIEWS = YES;
903904
GENERATE_INFOPLIST_FILE = YES;
904905
INFOPLIST_FILE = Geranium/Info.plist;
906+
INFOPLIST_KEY_CFBundleDisplayName = Geranium;
905907
INFOPLIST_KEY_LSApplicationCategoryType = "";
906908
INFOPLIST_KEY_NSLocationUsageDescription = "Enabling location for Geranium makes it possible for the app to display your location on the map.";
907909
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "This will allow the app to display your location on the LocSim map.";

Geranium/Cleaner/CleanerView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct CleanerView: View {
6161
// check if smth is selected
6262
if safari || appCaches || otaCaches || leftoverCaches || custompathselect {
6363
Button("Clean !", action: {
64-
UIApplication.shared.confirmAlert(title: "Selected options", body: "Safari Caches: \(truelyEnabled(safari))\nGeneral Caches: \(truelyEnabled(appCaches))\nOTA Update Caches: \(truelyEnabled(otaCaches))\nApps Leftover Caches: \(truelyEnabled(leftoverCaches))\n Are you sure you want to permanently delete those files ? \(draftWarning(isEnabled: leftoverCaches))", onOK: {
64+
UIApplication.shared.confirmAlert(title: "Selected options", body: "Safari Caches: \(truelyEnabled(safari))\nGeneral Caches: \(truelyEnabled(appCaches))\nOTA Update Caches: \(truelyEnabled(otaCaches))\nApps Leftover Caches: \(truelyEnabled(leftoverCaches))\(customTest(isEnabled: custompathselect))\n Are you sure you want to permanently delete those files ? \(draftWarning(isEnabled: leftoverCaches))", onOK: {
6565
print("")
6666
withAnimation {
6767
var sizetotal = (safariCacheSize + GlobalCacheSize + OTACacheSize + leftOverCacheSize) / (1024 * 1024)

Geranium/Cleaner/CustomPaths.swift

+17-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ struct CustomPaths: View {
1616
NavigationView {
1717
List {
1818
ForEach(paths, id: \.self) { path in
19-
Text(path)
19+
withAnimation {
20+
Text(path)
21+
}
2022
}
2123
.onDelete(perform: deletePaths)
2224
}
@@ -26,6 +28,20 @@ struct CustomPaths: View {
2628
.font(.title2)
2729
.bold()
2830
}
31+
ToolbarItem(placement: .navigationBarTrailing) {
32+
Button(action: {
33+
UIApplication.shared.confirmAlert(title: "Are you sure you want to erase all your custom paths ?", body: "This won't clean them but will erase them from your list.", onOK: {
34+
paths = []
35+
savePaths()
36+
}, noCancel: false)
37+
}) {
38+
if !paths.isEmpty {
39+
withAnimation {
40+
Text("Clear")
41+
}
42+
}
43+
}
44+
}
2945
ToolbarItem(placement: .navigationBarTrailing) {
3046
Button(action: {
3147
UIApplication.shared.TextFieldAlert(title: "Enter a path you want to add to your list :", textFieldPlaceHolder: "/var/mobile/DCIM/") { chemin in

Geranium/Cleaner/Paths.swift

+9
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,12 @@ func draftWarning(isEnabled: Bool = false)-> String {
186186
return ""
187187
}
188188
}
189+
func customTest(isEnabled: Bool = false)-> String {
190+
var paths: [String] = UserDefaults.standard.stringArray(forKey: "savedPaths") ?? []
191+
if !paths.isEmpty{
192+
return "\nCustom Paths: Enabled"
193+
}
194+
else {
195+
return ""
196+
}
197+
}

Geranium/SettingsView.swift

+10-5
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ struct SettingsView: View {
9292
appSettings.languageCode = ""
9393
UserDefaults.standard.set(["\(newValue)"], forKey: "AppleLanguages")
9494
}
95-
exitGracefully()
95+
UIApplication.shared.confirmAlert(title: "You need to quit the app to apply changes.", body: "You might want to open it back.", onOK: {
96+
exitGracefully()
97+
}, noCancel: true)
9698
}
9799
.onAppear {
98100
print(langaugee)
@@ -106,10 +108,12 @@ struct SettingsView: View {
106108
Text("Debug Info")
107109
}
108110
if DebugStuff {
109-
Text(localisation)
111+
Text("Language set to : \(localisation)")
110112
Button("Set language to Default") {
111113
UserDefaults.standard.set(["Base"], forKey: "AppleLanguages")
112-
exitGracefully()
114+
UIApplication.shared.confirmAlert(title: "You need to quit the app to apply changes.", body: "You might want to open it back.", onOK: {
115+
exitGracefully()
116+
}, noCancel: true)
113117
}
114118
Text("UUID : \(appSettings.usrUUID)")
115119
Text("RootHelper Path : \(RootHelper.whatsthePath())")
@@ -179,7 +183,9 @@ struct SettingsView: View {
179183
print(defaultTab)
180184
appSettings.defaultTab = defaultTab
181185
print(appSettings.defaultTab)
182-
exitGracefully()
186+
UIApplication.shared.confirmAlert(title: "You need to quit the app to apply changes.", body: "You might want to open it back.", onOK: {
187+
exitGracefully()
188+
}, noCancel: true)
183189
}
184190
Toggle(isOn: $appSettings.tsBypass) {
185191
Text("Bypass TrollStore Pop Up")
@@ -293,7 +299,6 @@ struct SettingsView: View {
293299
LinkCell(imageLink: "https://cdn.discordapp.com/avatars/607904288882294795/76b2725a7e4f0b1fa18bc2fe4938a846.webp?size=160", url: "https://twitter.com/spy_g_", title: "Spy_G", description: "🇸🇪 Swedish")
294300
LinkCell(imageLink: "https://cclerc.ch/db/geranium/dTiW9yol-2.jpg", url: "https://twitter.com/straight_tamago", title: "Straight Tamago", description: "🇯🇵 Japanese")
295301
LinkCell(imageLink: "https://cdn.discordapp.com/avatars/1183594247929208874/2bfce82426459ce7f55aeb736fd95a9f.webp?size=160", url: "https://twitter.com/Ting2021", title: "ting0441", description: "🇨🇳 Chinese (Simplified)")
296-
LinkCell(imageLink: "https://cdn.discordapp.com/avatars/795556607445696533/6ab9334b128bfda2eb9f16461f0a6e09.webp?size=160", url: "https://twitter.com/ChromiumCandy", title: "ur.za", description: "🇯🇵 Japanese")
297302
LinkCell(imageLink: "https://cdn.discordapp.com/avatars/259867085453131778/685ffaefba4fce61d633f5f5434b7647.webp?size=160", url: "https://twitter.com/Alz971", title: "W$D$B", description: "🇮🇹 Italian")
298303
LinkCell(imageLink: "https://cdn.discordapp.com/avatars/709644128685916185/51c2ef8ff5c774f27662753208fa0f67.webp?size=160", url: "https://twitter.com/yyyyyy_public", title: "yyyywaiwai", description: "🇯🇵 Japanese")
299304
}

Geranium/Translations/Localizable.xcstrings

+6
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,9 @@
17781778
}
17791779
}
17801780
}
1781+
},
1782+
"Clear" : {
1783+
17811784
},
17821785
"Credits" : {
17831786
"localizations" : {
@@ -4320,6 +4323,9 @@
43204323
}
43214324
}
43224325
}
4326+
},
4327+
"Language set to : %@" : {
4328+
43234329
},
43244330
"Latitude: %lf Longitude: %lf" : {
43254331
"localizations" : {

Geranium/WelcomeView.swift

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ struct WelcomeView: View {
2727
Toggle(isOn: $loggingAllowed) {
2828
Text("Enable log collection")
2929
}
30+
.onChange(of: loggingAllowed) { newValue in
31+
if !loggingAllowed {
32+
UIApplication.shared.alert(title: "Warning", body: "Disabling logging might make things more difficult for developers if you have an issue.")
33+
}
34+
}
3035
}
3136

3237
Section(header: Text("Update Warnings")) {

0 commit comments

Comments
 (0)