Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added one more state and change inset what fixes dark mode #7

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Course/Course/Presentation/Unit/CourseUnitView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ public struct CourseUnitView: View {
.frame(
width: reader.size.width,
height: isHorizontal ?
(viewModel.courseUnitProgressEnabled ? 85 : 75) :
(viewModel.courseUnitProgressEnabled ? 60 : 50)
(viewModel.courseUnitProgressEnabled ? 78 : 75) :
(viewModel.courseUnitProgressEnabled ? 68 : 50)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ struct LessonLineProgressView: View {
let data = Array(vertical.childs.enumerated())
ForEach(data, id: \.offset) { index, item in
let selected = viewModel.verticals[viewModel.verticalIndex].childs[index]
if selected == viewModel.selectedLesson() {
let isSelected = selected == viewModel.selectedLesson()
let isDone = item.completion == 1.0 || vertical.completion == 1.0
if isSelected && isDone {
Theme.Colors.progressSelectedAndDone
.frame(height: 7)
} else if isSelected {
Theme.Colors.onProgress
} else if item.completion == 1.0 || vertical.completion == 1.0 {
.frame(height: 7)
} else if isDone {
Theme.Colors.progressDone
} else {
Theme.Colors.progressSkip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0xD2",
"red" : "0xF1"
"green" : "0xCC",
"red" : "0xF0"
}
},
"idiom" : "universal"
Expand All @@ -24,8 +24,8 @@
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0xD2",
"red" : "0xF1"
"green" : "0xCC",
"red" : "0xF0"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x7D",
"green" : "0xAA",
"red" : "0x34"
"blue" : "0xD7",
"green" : "0xE6",
"red" : "0xBB"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x7D",
"green" : "0xAA",
"red" : "0x34"
"blue" : "0x71",
"green" : "0xA1",
"red" : "0x30"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x71",
"green" : "0xA1",
"red" : "0x30"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x4D",
"green" : "0x7D",
"red" : "0x0D"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
1 change: 1 addition & 0 deletions Theme/Theme/SwiftGen/ThemeAssets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public enum ThemeAssets {
public static let onProgress = ColorAsset(name: "OnProgress")
public static let progressDone = ColorAsset(name: "ProgressDone")
public static let progressSkip = ColorAsset(name: "ProgressSkip")
public static let selectedAndDone = ColorAsset(name: "SelectedAndDone")
public static let appLogo = ImageAsset(name: "appLogo")
}
// swiftlint:enable identifier_name line_length nesting type_body_length type_name
Expand Down
1 change: 1 addition & 0 deletions Theme/Theme/Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public struct Theme {
public private(set) static var onProgress = ThemeAssets.onProgress.swiftUIColor
public private(set) static var progressDone = ThemeAssets.progressDone.swiftUIColor
public private(set) static var progressSkip = ThemeAssets.progressSkip.swiftUIColor
public private(set) static var progressSelectedAndDone = ThemeAssets.selectedAndDone.swiftUIColor
public private(set) static var loginNavigationText = ThemeAssets.loginNavigationText.swiftUIColor

public static func update(
Expand Down
Loading