mirror of
https://github.com/twofas/2fas-ios.git
synced 2024-11-24 11:20:14 +01:00
TF-250 Dark mode colors, small formatting fixes
This commit is contained in:
parent
59cb71ee92
commit
7484802ec9
@ -29,6 +29,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0.137",
|
||||||
|
"green" : "0.110",
|
||||||
|
"red" : "0.898"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "watch"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
@ -29,6 +29,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "0x28",
|
||||||
|
"green" : "0x24",
|
||||||
|
"red" : "0x23"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "watch"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
@ -22,22 +22,22 @@ import PKHUD
|
|||||||
import Common
|
import Common
|
||||||
|
|
||||||
enum HUDNotification {
|
enum HUDNotification {
|
||||||
static func presentSuccess(title: String, completion: Callback? = nil) {
|
static func presentSuccess(title: String, on view: UIView? = nil, completion: Callback? = nil) {
|
||||||
HUD.dimsBackground = false
|
HUD.dimsBackground = false
|
||||||
HUD.allowsInteraction = false
|
HUD.allowsInteraction = false
|
||||||
PKHUD.sharedHUD.effect = UIBlurEffect(style: .dark)
|
PKHUD.sharedHUD.effect = UIBlurEffect(style: .dark)
|
||||||
let notification = NotificationIcon(title: title, iconKind: .success)
|
let notification = NotificationIcon(title: title, iconKind: .success)
|
||||||
HUD.flash(HUDContentType.customView(view: notification), delay: 1) { _ in
|
HUD.flash(HUDContentType.customView(view: notification), onView: view, delay: 1) { _ in
|
||||||
completion?()
|
completion?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static func presentFailure(title: String, completion: Callback? = nil) {
|
static func presentFailure(title: String, on view: UIView? = nil, completion: Callback? = nil) {
|
||||||
HUD.dimsBackground = false
|
HUD.dimsBackground = false
|
||||||
HUD.allowsInteraction = false
|
HUD.allowsInteraction = false
|
||||||
PKHUD.sharedHUD.effect = UIBlurEffect(style: .dark)
|
PKHUD.sharedHUD.effect = UIBlurEffect(style: .dark)
|
||||||
let notification = NotificationIcon(title: title, iconKind: .failure)
|
let notification = NotificationIcon(title: title, iconKind: .failure)
|
||||||
HUD.flash(HUDContentType.customView(view: notification), delay: 1) { _ in
|
HUD.flash(HUDContentType.customView(view: notification), onView: view, delay: 1) { _ in
|
||||||
completion?()
|
completion?()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,9 @@ extension RootViewController: RootViewControlling {
|
|||||||
func tokenCopied() {
|
func tokenCopied() {
|
||||||
func flashNotification() {
|
func flashNotification() {
|
||||||
VoiceOver.say(T.Notifications.tokenCopied)
|
VoiceOver.say(T.Notifications.tokenCopied)
|
||||||
HUDNotification.presentSuccess(title: T.Notifications.tokenCopied)
|
if let keyWindow = UIApplication.keyWindow {
|
||||||
|
HUDNotification.presentSuccess(title: T.Notifications.tokenCopied, on: keyWindow)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if UIApplication.keyWindow != nil && view != nil {
|
if UIApplication.keyWindow != nil && view != nil {
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
{
|
{
|
||||||
"colors" : [
|
"colors" : [
|
||||||
{
|
{
|
||||||
"color" : {
|
|
||||||
"color-space" : "srgb",
|
|
||||||
"components" : {
|
|
||||||
"alpha" : "1.000",
|
|
||||||
"blue" : "0.137",
|
|
||||||
"green" : "0.110",
|
|
||||||
"red" : "0.929"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"idiom" : "universal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
{
|
{
|
||||||
"colors" : [
|
"colors" : [
|
||||||
{
|
{
|
||||||
"color" : {
|
|
||||||
"color-space" : "srgb",
|
|
||||||
"components" : {
|
|
||||||
"alpha" : "1.000",
|
|
||||||
"blue" : "0x01",
|
|
||||||
"green" : "0x01",
|
|
||||||
"red" : "0x01"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"idiom" : "universal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
{
|
{
|
||||||
"colors" : [
|
"colors" : [
|
||||||
{
|
{
|
||||||
"color" : {
|
|
||||||
"color-space" : "srgb",
|
|
||||||
"components" : {
|
|
||||||
"alpha" : "1.000",
|
|
||||||
"blue" : "0xFE",
|
|
||||||
"green" : "0xFE",
|
|
||||||
"red" : "0xFE"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"idiom" : "universal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
{
|
{
|
||||||
"colors" : [
|
"colors" : [
|
||||||
{
|
{
|
||||||
"color" : {
|
|
||||||
"color-space" : "srgb",
|
|
||||||
"components" : {
|
|
||||||
"alpha" : "1.000",
|
|
||||||
"blue" : "0x96",
|
|
||||||
"green" : "0x96",
|
|
||||||
"red" : "0x96"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"idiom" : "universal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"appearances" : [
|
|
||||||
{
|
|
||||||
"appearance" : "luminosity",
|
|
||||||
"value" : "dark"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "srgb",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
|
@ -36,8 +36,8 @@ struct ServiceCellView: View {
|
|||||||
style: .continuous
|
style: .continuous
|
||||||
)
|
)
|
||||||
.fill(service.badgeColor)
|
.fill(service.badgeColor)
|
||||||
.preferredColorScheme(.dark)
|
|
||||||
.frame(width: 5)
|
.frame(width: 5)
|
||||||
|
|
||||||
IconRenderer(service: service)
|
IconRenderer(service: service)
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
Text(service.name)
|
Text(service.name)
|
||||||
@ -79,11 +79,11 @@ struct ServiceCellView: View {
|
|||||||
id: "ID",
|
id: "ID",
|
||||||
name: "2FAS Service",
|
name: "2FAS Service",
|
||||||
additionalInfo: "contact@2fas.com",
|
additionalInfo: "contact@2fas.com",
|
||||||
iconType: .brand,
|
iconType: .label,
|
||||||
iconTypeID: .default,
|
iconTypeID: .default,
|
||||||
labelColor: TintColor.green.color,
|
labelColor: TintColor.green.color,
|
||||||
labelTitle: "2F",
|
labelTitle: "2F",
|
||||||
badgeColor: TintColor.indigo.color
|
badgeColor: TintColor.default.color
|
||||||
))
|
))
|
||||||
.listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
|
.listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ struct PINTypeView: View {
|
|||||||
if showClose {
|
if showClose {
|
||||||
ToolbarItem(placement: .cancellationAction) {
|
ToolbarItem(placement: .cancellationAction) {
|
||||||
Button {
|
Button {
|
||||||
|
didClose?()
|
||||||
} label: {
|
} label: {
|
||||||
Label(T.Commons.close, systemImage: "xmark")
|
Label(T.Commons.close, systemImage: "xmark")
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,10 @@ struct SecurityView: View {
|
|||||||
path.append(SecurityPath.setPIN(.enterPIN(PINType)))
|
path.append(SecurityPath.setPIN(.enterPIN(PINType)))
|
||||||
}
|
}
|
||||||
case .enterPIN(let PINType):
|
case .enterPIN(let PINType):
|
||||||
PINKeyboardView(presenter: .init(interactor: InteractorFactory.shared.pinInteractor(variant: .enterNewPIN(PINType)), completion: { result in
|
PINKeyboardView(
|
||||||
|
presenter: .init(
|
||||||
|
interactor: InteractorFactory.shared.pinInteractor(variant: .enterNewPIN(PINType)
|
||||||
|
), completion: { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .closed: path.removeLast(2)
|
case .closed: path.removeLast(2)
|
||||||
case .entered(let appPIN): path.append(SecurityPath.setPIN(.verifyPIN(appPIN)))
|
case .entered(let appPIN): path.append(SecurityPath.setPIN(.verifyPIN(appPIN)))
|
||||||
@ -69,7 +72,10 @@ struct SecurityView: View {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
case .verifyPIN(let appPIN):
|
case .verifyPIN(let appPIN):
|
||||||
PINKeyboardView(presenter: .init(interactor: InteractorFactory.shared.pinInteractor(variant: .verifyPIN(appPIN)), completion: { result in
|
PINKeyboardView(
|
||||||
|
presenter: .init(
|
||||||
|
interactor: InteractorFactory.shared.pinInteractor(variant: .verifyPIN(appPIN)
|
||||||
|
), completion: { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .closed: path.removeLast(3)
|
case .closed: path.removeLast(3)
|
||||||
case .saved: path.append(SecurityPath.setPIN(.success))
|
case .saved: path.append(SecurityPath.setPIN(.success))
|
||||||
@ -84,7 +90,10 @@ struct SecurityView: View {
|
|||||||
case .disablePIN(let disablePIN):
|
case .disablePIN(let disablePIN):
|
||||||
switch disablePIN {
|
switch disablePIN {
|
||||||
case .verify:
|
case .verify:
|
||||||
PINKeyboardView(presenter: .init(interactor: InteractorFactory.shared.pinInteractor(variant: .PINValidationWithClose), completion: { result in
|
PINKeyboardView(
|
||||||
|
presenter: .init(
|
||||||
|
interactor: InteractorFactory.shared.pinInteractor(
|
||||||
|
variant: .PINValidationWithClose), completion: { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .closed: path.removeLast()
|
case .closed: path.removeLast()
|
||||||
case .verified:
|
case .verified:
|
||||||
@ -101,7 +110,10 @@ struct SecurityView: View {
|
|||||||
case .changePIN(let changePIN):
|
case .changePIN(let changePIN):
|
||||||
switch changePIN {
|
switch changePIN {
|
||||||
case .verify:
|
case .verify:
|
||||||
PINKeyboardView(presenter: .init(interactor: InteractorFactory.shared.pinInteractor(variant: .PINValidationWithClose), completion: { result in
|
PINKeyboardView(
|
||||||
|
presenter: .init(
|
||||||
|
interactor: InteractorFactory.shared.pinInteractor(
|
||||||
|
variant: .PINValidationWithClose), completion: { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .closed: path.removeLast()
|
case .closed: path.removeLast()
|
||||||
case .verified: path.append(SecurityPath.changePIN(.selectLength))
|
case .verified: path.append(SecurityPath.changePIN(.selectLength))
|
||||||
@ -115,7 +127,9 @@ struct SecurityView: View {
|
|||||||
path.removeLast(2)
|
path.removeLast(2)
|
||||||
}
|
}
|
||||||
case .enterPIN(let PINType):
|
case .enterPIN(let PINType):
|
||||||
PINKeyboardView(presenter: .init(interactor: InteractorFactory.shared.pinInteractor(variant: .enterNewPIN(PINType)), completion: { result in
|
PINKeyboardView(presenter: .init(
|
||||||
|
interactor: InteractorFactory.shared.pinInteractor(
|
||||||
|
variant: .enterNewPIN(PINType)), completion: { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .closed: path.removeLast(3)
|
case .closed: path.removeLast(3)
|
||||||
case .entered(let appPIN): path.append(SecurityPath.changePIN(.verifyPIN(appPIN)))
|
case .entered(let appPIN): path.append(SecurityPath.changePIN(.verifyPIN(appPIN)))
|
||||||
@ -123,7 +137,9 @@ struct SecurityView: View {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
case .verifyPIN(let appPIN):
|
case .verifyPIN(let appPIN):
|
||||||
PINKeyboardView(presenter: .init(interactor: InteractorFactory.shared.pinInteractor(variant: .verifyPIN(appPIN)), completion: { result in
|
PINKeyboardView(presenter: .init(
|
||||||
|
interactor: InteractorFactory.shared.pinInteractor(
|
||||||
|
variant: .verifyPIN(appPIN)), completion: { result in
|
||||||
switch result {
|
switch result {
|
||||||
case .closed: path.removeLast(4)
|
case .closed: path.removeLast(4)
|
||||||
case .saved: path.append(SecurityPath.changePIN(.success))
|
case .saved: path.append(SecurityPath.changePIN(.success))
|
||||||
|
Loading…
Reference in New Issue
Block a user