You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Text("Before we start, we need to go over a few things:").multilineTextAlignment(
48
-
.leading)
49
-
50
-
FeatureView(
51
-
image:"bolt.horizontal.circle",
52
-
title:String(localized:"Synchronization is not back-up"),
53
-
description:String(
54
-
localized:
55
-
"When you synchronize files, all changes, including deleting files, also happen on your other devices. Do not use Synctrain for back-up purposes, and always keep a back-up of your data."
56
-
))
57
-
58
-
FeatureView(
59
-
image:"hand.raised.circle",
60
-
title:String(localized:"Your devices, your data, your responsibility"),
61
-
description:String(
62
-
localized:
63
-
"You decide with which devices you share which files. This also means the app makers cannot help you access or recover any lost files."
64
-
)
65
-
)
41
+
privateenumOnboardingPage:Int{
42
+
case start =0
43
+
case explainNoBackup =1
44
+
case explainResponsibility =2
45
+
case explainSyncthing =3
46
+
case finished =4
47
+
}
66
48
67
-
FeatureView(
68
-
image:"gear.circle",
69
-
title:String(localized:"Powered by Syncthing"),
70
-
description:String(
71
-
localized:
72
-
"This app is powered by Syncthing. This app is however not associated with or endorsed by Syncthing nor its developers. Please do not expect support from the Syncthing developers. Instead, contact the maker of this app if you have questions."
73
-
)
49
+
privatestructOnboardingExplainView:View{
50
+
letpage:OnboardingPage
51
+
52
+
varbody:someView{
53
+
switch page {
54
+
case.start:
55
+
HStack{
56
+
Spacer()
57
+
Image("Logo")
58
+
Spacer()
59
+
}
60
+
61
+
HStack(alignment:.center){
62
+
Text("Synchronize your files securely with your other devices.")
63
+
.dynamicTypeSize(.medium)
64
+
.bold()
65
+
.multilineTextAlignment(.center)
66
+
.fixedSize(horizontal:false, vertical:true)
67
+
}
68
+
69
+
Text("Before we start, we need to go over a few things.")
70
+
.multilineTextAlignment(.leading)
71
+
72
+
case.explainNoBackup:
73
+
ExplainView(
74
+
image:"bolt.horizontal.circle",
75
+
title:String(localized:"Synchronization is not back-up"),
76
+
description:String(
77
+
localized:
78
+
"When you synchronize files, all changes, including deleting files, also happen on your other devices. Do not use Synctrain for back-up purposes, and always keep a back-up of your data."
79
+
))
80
+
81
+
case.explainResponsibility:
82
+
ExplainView(
83
+
image:"hand.raised.circle",
84
+
title:String(localized:"Your devices, your data, your responsibility"),
85
+
description:String(
86
+
localized:
87
+
"You decide with which devices you share which files. This also means the app makers cannot help you access or recover any lost files."
74
88
)
89
+
)
75
90
76
-
self.footer.padding(.bottom).padding(10)
91
+
case.explainSyncthing:
92
+
ExplainView(
93
+
image:"gear.circle",
94
+
title:String(localized:"Powered by Syncthing"),
95
+
description:String(
96
+
localized:
97
+
"This app is powered by Syncthing. This app is however not associated with or endorsed by Syncthing nor its developers. Please do not expect support from the Syncthing developers. Instead, contact the maker of this app if you have questions."
98
+
)
99
+
)
77
100
78
-
}.padding(.all).padding(20)
101
+
default:
102
+
EmptyView()
79
103
}
80
104
}
105
+
}
81
106
82
-
vartitle:someView{
83
-
Text(
84
-
"Welcome to Synctrain!"
85
-
)
86
-
.font(.largeTitle.bold())
87
-
.multilineTextAlignment(.center)
88
-
}
107
+
structOnboardingView:View{
108
+
@Environment(\.dismiss)privatevardismiss
109
+
@Stateprivatevarpage=OnboardingPage.start
89
110
90
-
varfooter:someView{
91
-
Color.blue
92
-
.frame(
93
-
minHeight:48, maxHeight:.infinity
94
-
)
95
-
.cornerRadius(9.0)
96
-
.overlay(alignment:.center){
97
-
Text("I understand, let's get started!").bold().foregroundColor(.white)
0 commit comments