1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 23:00:32 +05:30

Welcome screen fixes

This commit is contained in:
Arkadiusz Fal 2022-07-03 22:18:11 +02:00
parent d99256c673
commit f07e3ebef9

View File

@ -12,16 +12,17 @@ struct WelcomeScreen: View {
VStack(alignment: .leading) { VStack(alignment: .leading) {
Spacer() Spacer()
Text("Welcome to Yattee") Text("Welcome")
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.font(.largeTitle) .font(.largeTitle)
.padding(.bottom, 10) .padding(.bottom, 10)
Text("Select location closest to you to get the best performance") Text("Select location closest to you:")
.font(.subheadline) .font(.subheadline)
ScrollView { ScrollView {
ForEach(store.map(\.country).sorted(), id: \.self) { country in let countries = store.map(\.country).sorted().unique()
ForEach(countries, id: \.self) { country in
Button { Button {
Defaults[.countryOfPublicInstances] = country Defaults[.countryOfPublicInstances] = country
InstancesManifest.shared.setPublicAccount(country, accounts: accounts) InstancesManifest.shared.setPublicAccount(country, accounts: accounts)
@ -53,19 +54,17 @@ struct WelcomeScreen: View {
} }
.padding(.horizontal, 30) .padding(.horizontal, 30)
} }
#if !os(tvOS)
Text("This information will not be collected and it will be saved only on your device. You can change it later in settings.") OpenSettingsButton()
.foregroundColor(.white)
.padding(10)
.background(RoundedRectangle(cornerRadius: 4).foregroundColor(Color.accentColor))
.frame(maxWidth: .infinity)
#endif
Text("This information will be processed only on your device and used to connect you to the server in the specified country.\n" +
"It can be changed later in settings. You can use your own locations too.")
.font(.caption) .font(.caption)
.foregroundColor(.secondary) .foregroundColor(.secondary)
#if !os(tvOS)
Spacer()
OpenSettingsButton()
.frame(maxWidth: .infinity)
Spacer()
#endif
} }
.onAppear { .onAppear {
resource.load().onSuccess { response in resource.load().onSuccess { response in