landing screen
This commit is contained in:
parent
c9d97c10d0
commit
e414f17a4d
|
@ -603,7 +603,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|||
switch Onboarding.State.current {
|
||||
case .newUser:
|
||||
DispatchQueue.main.async {
|
||||
let viewController: LandingVC = LandingVC()
|
||||
let viewController = SessionHostingViewController(rootView: LandingView())
|
||||
viewController.setUpNavBarSessionIcon()
|
||||
populateHomeScreenTimer.invalidate()
|
||||
rootViewControllerSetupComplete(viewController)
|
||||
}
|
||||
|
|
|
@ -17,43 +17,45 @@ struct LandingView: View {
|
|||
alignment: .center,
|
||||
spacing: 16
|
||||
) {
|
||||
Spacer()
|
||||
Spacer(minLength: Values.massiveSpacing)
|
||||
|
||||
Text("onboarding_landing_title".localized())
|
||||
.bold()
|
||||
.font(.system(size: 26))
|
||||
.font(.system(size: Values.veryLargeFontSize))
|
||||
.foregroundColor(themeColor: .textPrimary)
|
||||
.padding(.vertical, Values.mediumSpacing)
|
||||
|
||||
FakeChat()
|
||||
|
||||
Spacer()
|
||||
Spacer(minLength: Values.massiveSpacing)
|
||||
|
||||
Button {
|
||||
|
||||
} label: {
|
||||
Text("onboarding_landing_register_button_title".localized())
|
||||
.bold()
|
||||
.font(.system(size: 14))
|
||||
.foregroundColor(themeColor: .sessionButton_filledText)
|
||||
.font(.system(size: Values.smallFontSize))
|
||||
.foregroundColor(themeColor: .sessionButton_primaryFilledText)
|
||||
.frame(
|
||||
width: 262,
|
||||
height: 40,
|
||||
maxWidth: .infinity,
|
||||
maxHeight: Values.largeButtonHeight,
|
||||
alignment: .center
|
||||
)
|
||||
.backgroundColor(themeColor: .sessionButton_filledBackground)
|
||||
.cornerRadius(20)
|
||||
.backgroundColor(themeColor: .sessionButton_primaryFilledBackground)
|
||||
.cornerRadius(Values.largeButtonHeight / 2)
|
||||
}
|
||||
.padding(.horizontal, Values.massiveSpacing)
|
||||
|
||||
Button {
|
||||
|
||||
} label: {
|
||||
Text("onboarding_landing_restore_button_title".localized())
|
||||
.bold()
|
||||
.font(.system(size: 14))
|
||||
.font(.system(size: Values.smallFontSize))
|
||||
.foregroundColor(themeColor: .sessionButton_text)
|
||||
.frame(
|
||||
width: 262,
|
||||
height: 40,
|
||||
maxWidth: .infinity,
|
||||
maxHeight: Values.largeButtonHeight,
|
||||
alignment: .center
|
||||
)
|
||||
.overlay(
|
||||
|
@ -61,6 +63,7 @@ struct LandingView: View {
|
|||
.stroke(themeColor: .sessionButton_border)
|
||||
)
|
||||
}
|
||||
.padding(.horizontal, Values.massiveSpacing)
|
||||
|
||||
Button {
|
||||
|
||||
|
@ -78,9 +81,10 @@ struct LandingView: View {
|
|||
}()
|
||||
AttributedText(attributedText)
|
||||
.foregroundColor(themeColor: .textPrimary)
|
||||
.frame(width: 262)
|
||||
}
|
||||
.padding(.horizontal, Values.massiveSpacing)
|
||||
}
|
||||
.padding(.vertical, Values.mediumSpacing)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@ internal enum Theme_ClassicDark: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerDark.withAlphaComponent(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerDark,
|
||||
.sessionButton_primaryFilledText: .classicDark0,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .classicDark3,
|
||||
|
@ -183,6 +185,8 @@ internal enum Theme_ClassicDark: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerDark.opacity(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerDark,
|
||||
.sessionButton_primaryFilledText: .classicDark0,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .classicDark3,
|
||||
|
|
|
@ -65,6 +65,8 @@ internal enum Theme_ClassicLight: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerLight.withAlphaComponent(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerLight,
|
||||
.sessionButton_primaryFilledText: .classicLight0,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .classicLight3,
|
||||
|
@ -183,6 +185,8 @@ internal enum Theme_ClassicLight: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerLight.opacity(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerLight,
|
||||
.sessionButton_primaryFilledText: .classicLight0,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .classicLight3,
|
||||
|
|
|
@ -65,6 +65,8 @@ internal enum Theme_OceanDark: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerDark.withAlphaComponent(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerDark,
|
||||
.sessionButton_primaryFilledText: .oceanDark0,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .oceanDark2,
|
||||
|
@ -183,6 +185,8 @@ internal enum Theme_OceanDark: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerDark.opacity(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerDark,
|
||||
.sessionButton_primaryFilledText: .oceanDark0,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .oceanDark2,
|
||||
|
|
|
@ -65,6 +65,8 @@ internal enum Theme_OceanLight: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerLight.withAlphaComponent(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerLight,
|
||||
.sessionButton_primaryFilledText: .oceanLight1,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .oceanLight5,
|
||||
|
@ -183,6 +185,8 @@ internal enum Theme_OceanLight: ThemeColors {
|
|||
.sessionButton_destructiveBackground: .clear,
|
||||
.sessionButton_destructiveHighlight: .dangerLight.opacity(0.3),
|
||||
.sessionButton_destructiveBorder: .dangerLight,
|
||||
.sessionButton_primaryFilledText: .oceanLight1,
|
||||
.sessionButton_primaryFilledBackground: .primary,
|
||||
|
||||
// SolidButton
|
||||
.solidButton_background: .oceanLight5,
|
||||
|
|
|
@ -177,6 +177,8 @@ public indirect enum ThemeValue: Hashable {
|
|||
case sessionButton_destructiveBackground
|
||||
case sessionButton_destructiveHighlight
|
||||
case sessionButton_destructiveBorder
|
||||
case sessionButton_primaryFilledText
|
||||
case sessionButton_primaryFilledBackground
|
||||
|
||||
// SolidButton
|
||||
case solidButton_background
|
||||
|
|
Loading…
Reference in New Issue