Crossmate/Views/Components/NoticeView.swift (2678B)
1import SwiftUI
2
3
4
5
6
7
8struct NoticeView: View {
9
10 let onDismiss: () -> Void
11
12 var body: some View {
13 VStack(spacing: 24) {
14 Spacer(minLength: 0)
15
16 Image(systemName: "trash")
17 .font(.system(size: 64, weight: .semibold))
18 .foregroundStyle(.tint)
19 .accessibilityHidden(true)
20
21 VStack(spacing: 12) {
22 Text("All Data Reset")
23 .font(.largeTitle.bold())
24 .multilineTextAlignment(.center)
25
26 Text(
27 """
28 The production database has been updated in preparation for \
29 the public release. This has reset all data (including \
30 puzzles). I'm very sorry for the disruption.
31 """
32 )
33 .font(.callout)
34 .multilineTextAlignment(.leading)
35 .frame(maxWidth: .infinity, alignment: .leading)
36
37 Text(
38 """
39 To share a game, please send the share link to your \
40 collaborator(s). After the first game is shared like this, \
41 your friendships with these players will be reestablished.
42 """
43 )
44 .font(.callout)
45 .multilineTextAlignment(.leading)
46 .frame(maxWidth: .infinity, alignment: .leading)
47
48 Text(
49 """
50 Again, I am very sorry for the disruption. I'm deeply \
51 grateful for all the help developing Crossmate so far.
52 """
53 )
54 .font(.callout)
55 .foregroundStyle(.secondary)
56 .multilineTextAlignment(.leading)
57 .frame(maxWidth: .infinity, alignment: .leading)
58 }
59
60 Spacer(minLength: 0)
61
62 Button(action: onDismiss) {
63 Text("Got It")
64 .font(.headline)
65 .frame(maxWidth: .infinity)
66 }
67 .buttonStyle(.borderedProminent)
68 .controlSize(.large)
69 }
70 .padding(24)
71 .padding(.vertical, 16)
72 .interactiveDismissDisabled()
73 }
74}