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

Yann/fix/lekaupdater/colors #573

Merged
merged 5 commits into from
Jan 15, 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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct ConnectionView: View {
.bold()
Text(l10n.main.appDescription)
}
.foregroundColor(.accentColor)
.foregroundColor(.lkNavigationTitle)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ struct InformationView: View {
.padding()
.overlay(
RoundedRectangle(cornerRadius: 20)
.stroke(DesignKitAsset.Colors.lightGray.swiftUIColor, lineWidth: 3)
.stroke(.lkStroke, lineWidth: 3)
)
.padding([.horizontal], 3)
.padding([.vertical], 10)

DisclosureGroup {
Expand All @@ -74,8 +75,9 @@ struct InformationView: View {
.padding()
.overlay(
RoundedRectangle(cornerRadius: 20)
.stroke(DesignKitAsset.Colors.lightGray.swiftUIColor, lineWidth: 3)
.stroke(.lkStroke, lineWidth: 3)
)
.padding([.horizontal], 3)
.padding([.vertical], 10)

if self.viewModel.showRobotNeedsUpdate {
Expand All @@ -94,6 +96,7 @@ struct InformationView: View {
.padding([.horizontal], 20)
}
.foregroundColor(DesignKitAsset.Colors.darkGray.swiftUIColor)
.background(.lkBackground)
.onChange(of: self.isViewVisible) { isVisible in
if isVisible { self.viewModel.onViewReappear() }
}
Expand All @@ -105,7 +108,7 @@ struct InformationView: View {
.bold()
Text(l10n.main.appDescription)
}
.foregroundColor(.accentColor)
.foregroundColor(.lkNavigationTitle)
}

ToolbarItem(placement: .navigationBarLeading) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct RobotCannotBeUpdatedIllustration: View {
var body: some View {
ZStack {
Circle()
.fill(.white)
.fill(.lkBackground)
.frame(width: self.illustrationSize)

Circle()
Expand All @@ -42,7 +42,7 @@ struct RobotCannotBeUpdatedIllustration: View {
Spacer()

ZStack {
Circle().fill(.white)
Circle().fill(.lkBackground)
.frame(height: self.checkmarkSize)

Image(systemName: "xmark.circle")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct RobotNeedsUpdateIllustration: View {
var body: some View {
ZStack {
Circle()
.fill(.white)
.fill(.lkBackground)
.frame(width: self.illustrationSize)

Circle()
Expand All @@ -42,7 +42,7 @@ struct RobotNeedsUpdateIllustration: View {
Spacer()

ZStack {
Circle().fill(.white)
Circle().fill(.lkBackground)
.frame(height: self.checkmarkSize)

Image(systemName: "exclamationmark.circle")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct RobotUpToDateIllustration: View {
var body: some View {
ZStack {
Circle()
.fill(.white)
.fill(.lkBackground)
.frame(width: self.illustrationSize)

Circle()
Expand All @@ -41,7 +41,7 @@ struct RobotUpToDateIllustration: View {
Spacer()

ZStack {
Circle().fill(.white)
Circle().fill(.lkBackground)
.frame(height: self.checkmarkSize)

Image(systemName: "checkmark.circle")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SwiftUI
struct UpdateFinishedIllustration: View {
var body: some View {
ZStack {
Circle().fill(.white)
Circle().fill(.lkBackground)

Circle().strokeBorder(DesignKitAsset.Colors.lekaGreen.swiftUIColor, lineWidth: 5)

Expand All @@ -24,7 +24,7 @@ struct UpdateFinishedIllustration: View {
Spacer()

ZStack {
Circle().fill(.white)
Circle().fill(.lkBackground)
.frame(height: 56)

Image(systemName: "checkmark.circle")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct UpdateStatusView: View {
.padding(35)
}
.foregroundColor(DesignKitAsset.Colors.darkGray.swiftUIColor)
.background(.lkBackground)
.onAppear(perform: self.viewModel.startUpdate)
.toolbar {
ToolbarItem(placement: .principal) {
Expand All @@ -91,7 +92,7 @@ struct UpdateStatusView: View {
.bold()
Text(l10n.main.appDescription)
}
.foregroundColor(.accentColor)
.foregroundColor(.lkNavigationTitle)
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions Modules/DesignKit/Sources/Colors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import SwiftUI

public extension Color {
static let lkBackground: Color = .init(uiColor: .systemGray6)
static let lkStroke: Color = .init(uiColor: .systemGray)
static let lkNavigationTitle: Color = DesignKitAsset.Colors.lekaDarkBlue.swiftUIColor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

}

public extension ShapeStyle where Self == Color {
static var lkBackground: Color { .lkBackground }
static var lkStroke: Color { .lkStroke }
static var lkNavigationTitle: Color { .lkNavigationTitle }
}
Loading