mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
implement onboarding
update welcomeview to fit everything on screen
This commit is contained in:
@@ -22,13 +22,18 @@ struct ShhShellApp: App {
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView(
|
||||
handler: sshHandler,
|
||||
hostsManager: hostsManager,
|
||||
keyManager: keyManager
|
||||
)
|
||||
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
|
||||
.tint(hostsManager.tint)
|
||||
if !NSUbiquitousKeyValueStore.default.bool(forKey: "shownOnboarding") {
|
||||
WelcomeView()
|
||||
} else {
|
||||
ContentView(
|
||||
handler: sshHandler,
|
||||
hostsManager: hostsManager,
|
||||
keyManager: keyManager
|
||||
)
|
||||
.transition(.opacity)
|
||||
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
|
||||
.tint(hostsManager.tint)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ struct AboutView: View {
|
||||
@ObservedObject var hostsManager: HostsManager
|
||||
|
||||
var body: some View {
|
||||
|
||||
ZStack {
|
||||
hostsManager.selectedTheme.background.suiColor.opacity(0.7)
|
||||
.ignoresSafeArea(.all)
|
||||
|
||||
@@ -38,6 +38,7 @@ struct WelcomeChunk: View {
|
||||
.foregroundStyle(.gray)
|
||||
.font(.footnote)
|
||||
.transition(.blurReplace)
|
||||
.lineLimit(nil)
|
||||
.multilineTextAlignment(.leading)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ struct WelcomeView: View {
|
||||
.transition(.blurReplace)
|
||||
}
|
||||
}
|
||||
.padding(.top, time > 3 ? 50 : 0)
|
||||
// .padding(.top, time > 3 ? 25 : 0)
|
||||
|
||||
if time > 3 {
|
||||
Spacer()
|
||||
@@ -90,13 +90,13 @@ struct WelcomeView: View {
|
||||
.clipShape(RoundedRectangle(cornerRadius: 50))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.frame(width: .infinity, height: 50)
|
||||
.frame(width: 300, height: 50)
|
||||
.padding(.horizontal, 75)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
|
||||
NSUbiquitousKeyValueStore.default.set(true, forKey: "shownOnboarding")
|
||||
}
|
||||
.animation(.spring, value: time)
|
||||
.preferredColorScheme(.dark)
|
||||
|
||||
Reference in New Issue
Block a user