-
Notifications
You must be signed in to change notification settings - Fork 1
/
ContentView.Swift
83 lines (72 loc) · 3.07 KB
/
ContentView.Swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import SwiftUI
struct ContentView: View {
@State private var isUserspaceRebooting = false
var body: some View {
NavigationView {
ZStack {
Color(.black).edgesIgnoringSafeArea(.all)
VStack {
Spacer()
Text("FlawlessJB")
.font(.system(size: 40))
.fontWeight(.bold)
.foregroundColor(.white)
.padding(.bottom, 50)
VStack(spacing: 20) {
NavigationLink(destination: SettingsView()) {
Text("Settings")
.font(.system(size: 20))
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.gray.opacity(0.3))
.cornerRadius(10)
}
Button(action: {
// Simulate Reboot Userspace
withAnimation {
isUserspaceRebooting = true
}
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
isUserspaceRebooting = false
}
}) {
Text("Reboot Userspace")
.font(.system(size: 20))
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.gray.opacity(0.3))
.cornerRadius(10)
}
NavigationLink(destination: AboutView()) {
Text("Credits")
.font(.system(size: 20))
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.gray.opacity(0.3))
.cornerRadius(10)
}
}
.padding(.horizontal, 20)
Spacer()
Text("Jailbroken")
.font(.system(size: 16))
.foregroundColor(.white)
.padding(.bottom, 20)
}
.padding(.top, 50)
if isUserspaceRebooting {
Color.black
.edgesIgnoringSafeArea(.all)
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}