Add option to choose save directory & automatically accept files

This commit is contained in:
Leon Böttger committed 2025-03-25 21:06:01 +01:00
1 parent 164d351c4d
commit ea324ea7d8
26 files changed
+436 -77

No files matched your search

+38 -21
View File
@@ -21,28 +21,9 @@ struct TutorialView: View {
@AppStorage(UserDefaultsKeys.plusVersion.rawValue) var isPlusVersion = false
var body: some View {
ScrollView {
LargeAppIconView(title: title) {
VStack {
Image("AppIconHighRes")
.resizable()
.frame(width: 150, height: 150)
.padding(.top, 50)
.onTapGesture {
taps += 1
print("Tapped \(taps) times")
if taps == 5 {
let logString = LogManager.sharedInstance.getLogString()
copyToClipboard(logString)
print("Copied log to clipboard")
}
}
Text(title.localized())
.font(.largeTitle)
.padding()
Text(text.localized())
.multilineTextAlignment(.center)
.fixedSize(horizontal: false, vertical: true)
@@ -90,6 +71,42 @@ struct TutorialView: View {
.padding()
}
}
}
}
}
struct LargeAppIconView<Content: View>: View {
let title: String
let bottomView: () -> Content
@State var taps = 0
var body: some View {
ScrollView {
VStack {
Image("AppIconHighRes")
.resizable()
.frame(width: 150, height: 150)
.padding(.top, 50)
.onTapGesture {
taps += 1
print("Tapped \(taps) times")
if taps == 5 {
let logString = LogManager.sharedInstance.getLogString()
copyToClipboard(logString)
print("Copied log to clipboard")
}
}
Text(title.localized())
.font(.largeTitle)
.padding()
bottomView()
}
.frame(maxWidth: 500)
.frame(maxWidth: .infinity)
}