Add Authentication Flow WIP.

- Add Registration Screen.
- Add Server Selection Screen.
- Rename AuthenticationCoordinator to LegacyAuthenticationCoordinator.
- Add AuthenticationService and RegistrationWizard.
- Async extensions.
- Add global white and EMS colors to the themes.
- Add tests for server selection and registration screens.
- Accessibility and iPad layout tweaks.
- Remove MainActor from Auth Coordinators/VMs/Views.
(It broke the protocol conformances so now the methods and properties are marked individually.)
This commit is contained in:
Doug
2022-04-14 11:06:12 +01:00
committed by Doug
parent 60cff1d6bc
commit 282fe5c27e
53 changed files with 2870 additions and 66 deletions

View File

@@ -46,5 +46,9 @@ public struct ColorValues: Colors {
public let background: UIColor
public let white: UIColor
public let ems: UIColor
public let namesAndAvatars: [UIColor]
}

View File

@@ -55,7 +55,7 @@ public protocol Colors {
/// Separating line
var separator: ColorType { get }
// Cards, tiles
/// Cards, tiles
var tile: ColorType { get }
/// Top navigation background on iOS
@@ -64,6 +64,12 @@ public protocol Colors {
/// Background UI color
var background: ColorType { get }
/// Global color: The color white.
var white: ColorType { get }
/// Global color: The EMS brand's purple colour.
var ems: ColorType { get }
/// - Names in chat timeline
/// - Avatars default states that include first name letter
var namesAndAvatars: [ColorType] { get }

View File

@@ -47,6 +47,10 @@ public struct ColorSwiftUI: Colors {
public let background: Color
public var white: Color
public var ems: Color
public let namesAndAvatars: [Color]
init(values: ColorValues) {
@@ -62,6 +66,8 @@ public struct ColorSwiftUI: Colors {
tile = Color(values.tile)
navigation = Color(values.navigation)
background = Color(values.background)
white = Color(values.white)
ems = Color(values.ems)
namesAndAvatars = values.namesAndAvatars.map({ Color($0) })
}
}

View File

@@ -33,6 +33,8 @@ public class DarkColors {
tile: UIColor(rgb:0x394049),
navigation: UIColor(rgb:0x21262C),
background: UIColor(rgb:0x15191E),
white: UIColor(rgb: 0xFFFFFF),
ems: UIColor(rgb: 0x7E69FF),
namesAndAvatars: [
UIColor(rgb:0x368BD6),
UIColor(rgb:0xAC3BA8),

View File

@@ -34,6 +34,8 @@ public class LightColors {
tile: UIColor(rgb:0xF3F8FD),
navigation: UIColor(rgb:0xF4F6FA),
background: UIColor(rgb:0xFFFFFF),
white: UIColor(rgb: 0xFFFFFF),
ems: UIColor(rgb: 0x7E69FF),
namesAndAvatars: [
UIColor(rgb:0x368BD6),
UIColor(rgb:0xAC3BA8),