diff --git a/BanYaroGo/Views/LoginView.swift b/BanYaroGo/Views/LoginView.swift index eb2fd77..a0e8db9 100644 --- a/BanYaroGo/Views/LoginView.swift +++ b/BanYaroGo/Views/LoginView.swift @@ -66,10 +66,31 @@ struct LoginView: View { .foregroundStyle(.white) .disabled(auth.isLoggingIn || email.isEmpty || password.isEmpty) + registrationHint + Spacer() } .padding(.horizontal, 28) } + + private var registrationHint: some View { + VStack(spacing: 6) { + Text("Noch kein Account?") + .font(.footnote) + .foregroundStyle(.secondary) + if let url = URL(string: "https://banyaro.app/#settings?tab=register") { + Link(destination: url) { + HStack(spacing: 6) { + Text("Kostenlos bei banyaro.app registrieren") + .font(.footnote.bold()) + Image(systemName: "arrow.up.right.square") + .font(.caption) + } + .foregroundStyle(Color.accentColor) + } + } + } + } } #Preview { diff --git a/BanYaroGo/Views/SettingsView.swift b/BanYaroGo/Views/SettingsView.swift index 18b8051..3725d82 100644 --- a/BanYaroGo/Views/SettingsView.swift +++ b/BanYaroGo/Views/SettingsView.swift @@ -78,6 +78,44 @@ struct SettingsView: View { pwaLink("Profil & Einstellungen", systemImage: "gearshape.fill", fragment: "settings") } + Section { + if let url = URL(string: "https://banyaro.app") { + Link(destination: url) { + Label("banyaro.app in Safari öffnen", systemImage: "safari.fill") + .foregroundStyle(.primary) + } + } + } header: { + Text("banyaro.app als Web-App") + } footer: { + VStack(alignment: .leading, spacing: 8) { + Text("Du kannst banyaro.app zusätzlich als Web-App auf deinem Home-Bildschirm ablegen — praktisch für alle Features, die diese App nicht abbildet.") + HStack(alignment: .firstTextBaseline, spacing: 4) { + Text("**1.**") + Text("Oben „in Safari öffnen“ tippen") + } + HStack(alignment: .firstTextBaseline, spacing: 4) { + Text("**2.**") + HStack(spacing: 4) { + Text("In Safari unten das Teilen-Icon") + Image(systemName: "square.and.arrow.up") + Text("antippen") + } + } + HStack(alignment: .firstTextBaseline, spacing: 4) { + Text("**3.**") + HStack(spacing: 4) { + Text("„Zum Home-Bildschirm“") + Image(systemName: "plus.square") + Text("auswählen") + } + } + Text("Eine native App kann eine Web-App leider nicht selbst installieren — Apple lässt das nur über Safari zu.") + .padding(.top, 4) + .foregroundStyle(.tertiary) + } + } + Section { Button("Abmelden", role: .destructive) { auth.logout()