5720: Rework some location sharing related view

This commit is contained in:
MaximeE
2022-03-23 15:48:19 +01:00
parent 8e3107095f
commit 7f140388a1
35 changed files with 218 additions and 126 deletions

View File

@@ -47,4 +47,10 @@ public struct ColorValues: Colors {
public let background: UIColor
public let namesAndAvatars: [UIColor]
// MARK: - Others colors
public let white: UIColor
public let purple: UIColor
}

View File

@@ -68,4 +68,11 @@ public protocol Colors {
/// - Avatars default states that include first name letter
var namesAndAvatars: [ColorType] { get }
// MARK: - Others colors
/// White
var white: ColorType { get }
/// Purple
var purple: ColorType { get }
}

View File

@@ -49,6 +49,12 @@ public struct ColorSwiftUI: Colors {
public let namesAndAvatars: [Color]
// MARK: - Others colors
public let white: Color
public let purple: Color
init(values: ColorValues) {
accent = Color(values.accent)
alert = Color(values.alert)
@@ -63,5 +69,7 @@ public struct ColorSwiftUI: Colors {
navigation = Color(values.navigation)
background = Color(values.background)
namesAndAvatars = values.namesAndAvatars.map({ Color($0) })
white = Color(values.white)
purple = Color(values.purple)
}
}

View File

@@ -48,6 +48,12 @@ import UIKit
public let namesAndAvatars: [UIColor]
// MARK: - Others colors
public let white: UIColor
public let purple: UIColor
init(values: ColorValues) {
accent = values.accent
alert = values.alert
@@ -62,6 +68,8 @@ import UIKit
navigation = values.navigation
background = values.background
namesAndAvatars = values.namesAndAvatars
white = values.white
purple = values.purple
}
}

View File

@@ -42,7 +42,9 @@ public class DarkColors {
UIColor(rgb:0x2DC2C5),
UIColor(rgb:0x5C56F5),
UIColor(rgb:0x74D12C)
]
],
white: UIColor(rgb: 0xFFFFFF),
purple: UIColor(rgb: 0x5C56F5)
)
public static var uiKit = ColorsUIKit(values: values)

View File

@@ -43,7 +43,9 @@ public class LightColors {
UIColor(rgb:0x2DC2C5),
UIColor(rgb:0x5C56F5),
UIColor(rgb:0x74D12C)
]
],
white: UIColor(rgb: 0xFFFFFF),
purple: UIColor(rgb: 0x5C56F5)
)
public static var uiKit = ColorsUIKit(values: values)