Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Fix welcome view style
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallino16 committed Oct 6, 2020
1 parent a54cf13 commit 5a81412
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions Snip/Components/Welcome/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct WelcomeView: View {
@EnvironmentObject var settings: Settings

@Environment(\.themeSecondaryColor) var themeSecondaryColor
@Environment(\.themePrimaryColor) var themePrimaryColor
@Environment(\.themeTextColor) var themeTextColor
@Environment(\.themeShadowColor) var themeShadowColor

Expand Down Expand Up @@ -49,25 +50,25 @@ struct WelcomeView: View {
HStack {
Spacer()
Text("Welcome!")
.foregroundColor(themeShadowColor)
.foregroundColor(themeTextColor)
.font(.title)
Spacer()
}
Text("Changelog Ver. 1.2")
Text("Changelog Ver. 1.3.0")
.font(.subheadline)
.foregroundColor(themeShadowColor)
.foregroundColor(themeTextColor)
.padding(EdgeInsets(top: 16, leading: 0, bottom: 16, trailing: 0))
HStack {
Text("- Fix 'non clickable' area\n- Add snippet from StackOverflow via a Chrome Ext.\n- A StackOverflow snippet has a special top bar button to open the dedicated StackOverflow Post")
Text("- Added CodeView settings\n- Added app theme selection\n- Updated sidebar UI\n- Add atom file icons\n- GitHub scope updated to only request the minimum needed information")
.font(Font.custom("CourierNewPSMT", size: 12))
.foregroundColor(themeShadowColor)
.foregroundColor(themeTextColor)
Spacer()
}
.padding(EdgeInsets(top: 16, leading: 8, bottom: 16, trailing: 8))
.background(Color.BLACK_200)
.background(themePrimaryColor)
Text("We Need Your Help!")
.font(.subheadline)
.foregroundColor(themeShadowColor)
.foregroundColor(themeTextColor)
.padding(EdgeInsets(top: 16, leading: 0, bottom: 16, trailing: 0))
CodeView(code: .constant("Snip needs your help to grow!\n\nWant to translate snip into your native language?\nWant to have first-day in our next features?\n\nJOIN US now!"),
mode: .constant(CodeMode.text.mode()),
Expand All @@ -79,7 +80,7 @@ struct WelcomeView: View {
Button(action: self.viewModel.close) {
Text("Close")
.padding(EdgeInsets(top: 8, leading: 20, bottom: 8, trailing: 20))
.foregroundColor(themeShadowColor)
.foregroundColor(themeTextColor)
.background(Color.transparent)
}
.buttonStyle(PlainButtonStyle())
Expand Down
4 changes: 2 additions & 2 deletions Snip/Model/AppState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class AppState: ObservableObject {

@Published var shouldShowChangelogModel: Bool {
didSet {
UserDefaults.standard.set(Bundle.main.buildVersionNumber, forKey: "previous_launched_version")
UserDefaults.standard.set(Bundle.main.buildVersionNumber, forKey: "previous_launched_version_v1.3.0")
}
}

init() {
self.shouldShowChangelogModel = (UserDefaults.standard.object(forKey: "previous_launched_version") as? String ?? "") != Bundle.main.buildVersionNumber
self.shouldShowChangelogModel = (UserDefaults.standard.object(forKey: "previous_launched_version_v1.3.0") as? String ?? "") != Bundle.main.buildVersionNumber
}
}

0 comments on commit 5a81412

Please sign in to comment.