landing screen

pull/891/head
ryanzhao 2 years ago
parent c9d97c10d0
commit e414f17a4d

@ -603,7 +603,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
switch Onboarding.State.current { switch Onboarding.State.current {
case .newUser: case .newUser:
DispatchQueue.main.async { DispatchQueue.main.async {
let viewController: LandingVC = LandingVC() let viewController = SessionHostingViewController(rootView: LandingView())
viewController.setUpNavBarSessionIcon()
populateHomeScreenTimer.invalidate() populateHomeScreenTimer.invalidate()
rootViewControllerSetupComplete(viewController) rootViewControllerSetupComplete(viewController)
} }

@ -17,43 +17,45 @@ struct LandingView: View {
alignment: .center, alignment: .center,
spacing: 16 spacing: 16
) { ) {
Spacer() Spacer(minLength: Values.massiveSpacing)
Text("onboarding_landing_title".localized()) Text("onboarding_landing_title".localized())
.bold() .bold()
.font(.system(size: 26)) .font(.system(size: Values.veryLargeFontSize))
.foregroundColor(themeColor: .textPrimary) .foregroundColor(themeColor: .textPrimary)
.padding(.vertical, Values.mediumSpacing)
FakeChat() FakeChat()
Spacer() Spacer(minLength: Values.massiveSpacing)
Button { Button {
} label: { } label: {
Text("onboarding_landing_register_button_title".localized()) Text("onboarding_landing_register_button_title".localized())
.bold() .bold()
.font(.system(size: 14)) .font(.system(size: Values.smallFontSize))
.foregroundColor(themeColor: .sessionButton_filledText) .foregroundColor(themeColor: .sessionButton_primaryFilledText)
.frame( .frame(
width: 262, maxWidth: .infinity,
height: 40, maxHeight: Values.largeButtonHeight,
alignment: .center alignment: .center
) )
.backgroundColor(themeColor: .sessionButton_filledBackground) .backgroundColor(themeColor: .sessionButton_primaryFilledBackground)
.cornerRadius(20) .cornerRadius(Values.largeButtonHeight / 2)
} }
.padding(.horizontal, Values.massiveSpacing)
Button { Button {
} label: { } label: {
Text("onboarding_landing_restore_button_title".localized()) Text("onboarding_landing_restore_button_title".localized())
.bold() .bold()
.font(.system(size: 14)) .font(.system(size: Values.smallFontSize))
.foregroundColor(themeColor: .sessionButton_text) .foregroundColor(themeColor: .sessionButton_text)
.frame( .frame(
width: 262, maxWidth: .infinity,
height: 40, maxHeight: Values.largeButtonHeight,
alignment: .center alignment: .center
) )
.overlay( .overlay(
@ -61,6 +63,7 @@ struct LandingView: View {
.stroke(themeColor: .sessionButton_border) .stroke(themeColor: .sessionButton_border)
) )
} }
.padding(.horizontal, Values.massiveSpacing)
Button { Button {
@ -78,9 +81,10 @@ struct LandingView: View {
}() }()
AttributedText(attributedText) AttributedText(attributedText)
.foregroundColor(themeColor: .textPrimary) .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_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerDark.withAlphaComponent(0.3), .sessionButton_destructiveHighlight: .dangerDark.withAlphaComponent(0.3),
.sessionButton_destructiveBorder: .dangerDark, .sessionButton_destructiveBorder: .dangerDark,
.sessionButton_primaryFilledText: .classicDark0,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .classicDark3, .solidButton_background: .classicDark3,
@ -183,6 +185,8 @@ internal enum Theme_ClassicDark: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerDark.opacity(0.3), .sessionButton_destructiveHighlight: .dangerDark.opacity(0.3),
.sessionButton_destructiveBorder: .dangerDark, .sessionButton_destructiveBorder: .dangerDark,
.sessionButton_primaryFilledText: .classicDark0,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .classicDark3, .solidButton_background: .classicDark3,

@ -65,6 +65,8 @@ internal enum Theme_ClassicLight: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerLight.withAlphaComponent(0.3), .sessionButton_destructiveHighlight: .dangerLight.withAlphaComponent(0.3),
.sessionButton_destructiveBorder: .dangerLight, .sessionButton_destructiveBorder: .dangerLight,
.sessionButton_primaryFilledText: .classicLight0,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .classicLight3, .solidButton_background: .classicLight3,
@ -183,6 +185,8 @@ internal enum Theme_ClassicLight: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerLight.opacity(0.3), .sessionButton_destructiveHighlight: .dangerLight.opacity(0.3),
.sessionButton_destructiveBorder: .dangerLight, .sessionButton_destructiveBorder: .dangerLight,
.sessionButton_primaryFilledText: .classicLight0,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .classicLight3, .solidButton_background: .classicLight3,

@ -65,6 +65,8 @@ internal enum Theme_OceanDark: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerDark.withAlphaComponent(0.3), .sessionButton_destructiveHighlight: .dangerDark.withAlphaComponent(0.3),
.sessionButton_destructiveBorder: .dangerDark, .sessionButton_destructiveBorder: .dangerDark,
.sessionButton_primaryFilledText: .oceanDark0,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .oceanDark2, .solidButton_background: .oceanDark2,
@ -183,6 +185,8 @@ internal enum Theme_OceanDark: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerDark.opacity(0.3), .sessionButton_destructiveHighlight: .dangerDark.opacity(0.3),
.sessionButton_destructiveBorder: .dangerDark, .sessionButton_destructiveBorder: .dangerDark,
.sessionButton_primaryFilledText: .oceanDark0,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .oceanDark2, .solidButton_background: .oceanDark2,

@ -65,6 +65,8 @@ internal enum Theme_OceanLight: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerLight.withAlphaComponent(0.3), .sessionButton_destructiveHighlight: .dangerLight.withAlphaComponent(0.3),
.sessionButton_destructiveBorder: .dangerLight, .sessionButton_destructiveBorder: .dangerLight,
.sessionButton_primaryFilledText: .oceanLight1,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .oceanLight5, .solidButton_background: .oceanLight5,
@ -183,6 +185,8 @@ internal enum Theme_OceanLight: ThemeColors {
.sessionButton_destructiveBackground: .clear, .sessionButton_destructiveBackground: .clear,
.sessionButton_destructiveHighlight: .dangerLight.opacity(0.3), .sessionButton_destructiveHighlight: .dangerLight.opacity(0.3),
.sessionButton_destructiveBorder: .dangerLight, .sessionButton_destructiveBorder: .dangerLight,
.sessionButton_primaryFilledText: .oceanLight1,
.sessionButton_primaryFilledBackground: .primary,
// SolidButton // SolidButton
.solidButton_background: .oceanLight5, .solidButton_background: .oceanLight5,

@ -177,6 +177,8 @@ public indirect enum ThemeValue: Hashable {
case sessionButton_destructiveBackground case sessionButton_destructiveBackground
case sessionButton_destructiveHighlight case sessionButton_destructiveHighlight
case sessionButton_destructiveBorder case sessionButton_destructiveBorder
case sessionButton_primaryFilledText
case sessionButton_primaryFilledBackground
// SolidButton // SolidButton
case solidButton_background case solidButton_background

Loading…
Cancel
Save