Skip to content

Commit

Permalink
Temporarily removed light theme, updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrighetti committed Oct 20, 2021
1 parent db33fe8 commit 9e90448
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
HNReader/GoogleService-Info.plist
30 changes: 15 additions & 15 deletions HNReader/HNReaderApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ struct HNReaderApp: App {
WindowGroup {
HomeView()
.onAppear {
displayMode = appState.getColorScheme()
displayMode = .dark
}
.preferredColorScheme(displayMode)
.environmentObject(appState)
}

Settings {
VStack {
Form {
Picker(selection: displayModeBind, label: Text("Theme")) {
Text("Dark").tag(ColorScheme.dark)
Text("Light").tag(ColorScheme.light)
}
.pickerStyle(SegmentedPickerStyle())
.frame(maxWidth: 100)
}
}
.frame(minWidth: 300, minHeight: 100)
.preferredColorScheme(displayMode)
}
// Settings {
// VStack {
// Form {
// Picker(selection: displayModeBind, label: Text("Theme")) {
// Text("Dark").tag(ColorScheme.dark)
// Text("Light").tag(ColorScheme.light)
// }
// .pickerStyle(SegmentedPickerStyle())
// .frame(maxWidth: 100)
// }
// }
// .frame(minWidth: 300, minHeight: 100)
// .preferredColorScheme(displayMode)
// }
}
}
2 changes: 1 addition & 1 deletion HNReader/ViewModel/AppState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import HackerNews
import SwiftUI

class AppState: ObservableObject {
@AppStorage("displayMode") var displayMode: DisplayMode = .system
@AppStorage("displayMode") var displayMode: DisplayMode = .dark
@Published var sidebarSelection: SidebarSelection? = SidebarSelection.top {
willSet {
switch newValue {
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ The application is still in beta for the moment and needs optimizations. When th
</a>
</p>

[Temporary source code repo](https://github.com/mattrighetti/HNReader)

## Application preview
### Dark mode
<img width="1021" alt="Screenshot 2021-06-14 at 18 14 16" src="https://user-images.githubusercontent.com/16304728/121924591-56078f80-cd3c-11eb-899f-a19b3176cea1.png">

### Light mode
<img width="1021" alt="Screenshot 2021-06-14 at 21 13 59" src="https://user-images.githubusercontent.com/16304728/121946681-77c14080-cd55-11eb-88c0-1457ac45ecd0.png">
<img width="1021" alt="Screenshot 2021-06-14 at 18 14 16" src="resources/main.png">
<img width="1021" alt="Screenshot 2021-06-14 at 18 14 16" src="resources/mainwithdetailview.png">

## License
[MIT](LICENSE) or [APACHE 2.0](LICENSE)
Binary file added resources/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/mainwithdetailview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/screenshot.png
Binary file not shown.

0 comments on commit 9e90448

Please sign in to comment.