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 {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
ContentView(
|
if !NSUbiquitousKeyValueStore.default.bool(forKey: "shownOnboarding") {
|
||||||
handler: sshHandler,
|
WelcomeView()
|
||||||
hostsManager: hostsManager,
|
} else {
|
||||||
keyManager: keyManager
|
ContentView(
|
||||||
)
|
handler: sshHandler,
|
||||||
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
|
hostsManager: hostsManager,
|
||||||
.tint(hostsManager.tint)
|
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
|
@ObservedObject var hostsManager: HostsManager
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
|
||||||
ZStack {
|
ZStack {
|
||||||
hostsManager.selectedTheme.background.suiColor.opacity(0.7)
|
hostsManager.selectedTheme.background.suiColor.opacity(0.7)
|
||||||
.ignoresSafeArea(.all)
|
.ignoresSafeArea(.all)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ struct WelcomeChunk: View {
|
|||||||
.foregroundStyle(.gray)
|
.foregroundStyle(.gray)
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
.transition(.blurReplace)
|
.transition(.blurReplace)
|
||||||
|
.lineLimit(nil)
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ struct WelcomeView: View {
|
|||||||
.transition(.blurReplace)
|
.transition(.blurReplace)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.top, time > 3 ? 50 : 0)
|
// .padding(.top, time > 3 ? 25 : 0)
|
||||||
|
|
||||||
if time > 3 {
|
if time > 3 {
|
||||||
Spacer()
|
Spacer()
|
||||||
@@ -90,13 +90,13 @@ struct WelcomeView: View {
|
|||||||
.clipShape(RoundedRectangle(cornerRadius: 50))
|
.clipShape(RoundedRectangle(cornerRadius: 50))
|
||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
.frame(width: .infinity, height: 50)
|
.frame(width: 300, height: 50)
|
||||||
.padding(.horizontal, 75)
|
.padding(.horizontal, 75)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onDisappear {
|
.onDisappear {
|
||||||
|
NSUbiquitousKeyValueStore.default.set(true, forKey: "shownOnboarding")
|
||||||
}
|
}
|
||||||
.animation(.spring, value: time)
|
.animation(.spring, value: time)
|
||||||
.preferredColorScheme(.dark)
|
.preferredColorScheme(.dark)
|
||||||
|
|||||||
Reference in New Issue
Block a user