-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestartPromptView.swift
More file actions
59 lines (51 loc) · 1.77 KB
/
RestartPromptView.swift
File metadata and controls
59 lines (51 loc) · 1.77 KB
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
//
// RestartPromptView.swift
// PushUps
//
// Created by Berk Dogan on 21/6/2025.
//
import SwiftUI
struct RestartPromptView: View {
@Environment(\.dismiss) private var dismiss
var body: some View {
NavigationStack {
ZStack {
VStack(spacing: 20) {
Image(systemName: "checkmark.circle.fill")
.font(.system(size: 60))
.foregroundStyle(.accent)
.padding(20)
Text("Upgrade Successful!")
.font(.title2.bold())
Text("To ensure all premium features work correctly, please restart the app.")
.multilineTextAlignment(.center)
.foregroundStyle(.secondary)
.padding(.horizontal)
Button {
exit(0)
} label: {
Text("Restart Now")
.font(.headline)
.frame(maxWidth: .infinity)
.foregroundStyle(.white)
.padding()
.background(
RoundedRectangle(cornerRadius: 15)
.fill(.accent)
)
}
.padding(.horizontal)
.padding(.top)
Button {
dismiss()
} label: {
Text("Later")
.foregroundStyle(.secondary)
}
}
.padding()
}
.navigationBarTitleDisplayMode(.inline)
}
}
}