mirror of
https://github.com/twofas/2fas-ios.git
synced 2024-11-21 17:59:53 +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"
|
||||
},
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.137",
|
||||
"green" : "0.110",
|
||||
"red" : "0.898"
|
||||
}
|
||||
},
|
||||
"idiom" : "watch"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
@ -29,6 +29,18 @@
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x28",
|
||||
"green" : "0x24",
|
||||
"red" : "0x23"
|
||||
}
|
||||
},
|
||||
"idiom" : "watch"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
@ -22,22 +22,22 @@ import PKHUD
|
||||
import Common
|
||||
|
||||
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.allowsInteraction = false
|
||||
PKHUD.sharedHUD.effect = UIBlurEffect(style: .dark)
|
||||
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?()
|
||||
}
|
||||
}
|
||||
|
||||
static func presentFailure(title: String, completion: Callback? = nil) {
|
||||
static func presentFailure(title: String, on view: UIView? = nil, completion: Callback? = nil) {
|
||||
HUD.dimsBackground = false
|
||||
HUD.allowsInteraction = false
|
||||
PKHUD.sharedHUD.effect = UIBlurEffect(style: .dark)
|
||||
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?()
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,9 @@ extension RootViewController: RootViewControlling {
|
||||
func tokenCopied() {
|
||||
func flashNotification() {
|
||||
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 {
|
||||
|
@ -1,24 +1,6 @@
|
||||
{
|
||||
"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-space" : "srgb",
|
||||
"components" : {
|
||||
|
@ -1,24 +1,6 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x01",
|
||||
"green" : "0x01",
|
||||
"red" : "0x01"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
|
@ -1,24 +1,6 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xFE",
|
||||
"green" : "0xFE",
|
||||
"red" : "0xFE"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
|
@ -1,24 +1,6 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x96",
|
||||
"green" : "0x96",
|
||||
"red" : "0x96"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
|
@ -36,8 +36,8 @@ struct ServiceCellView: View {
|
||||
style: .continuous
|
||||
)
|
||||
.fill(service.badgeColor)
|
||||
.preferredColorScheme(.dark)
|
||||
.frame(width: 5)
|
||||
|
||||
IconRenderer(service: service)
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(service.name)
|
||||
@ -79,11 +79,11 @@ struct ServiceCellView: View {
|
||||
id: "ID",
|
||||
name: "2FAS Service",
|
||||
additionalInfo: "contact@2fas.com",
|
||||
iconType: .brand,
|
||||
iconType: .label,
|
||||
iconTypeID: .default,
|
||||
labelColor: TintColor.green.color,
|
||||
labelTitle: "2F",
|
||||
badgeColor: TintColor.indigo.color
|
||||
badgeColor: TintColor.default.color
|
||||
))
|
||||
.listRowInsets(.init(top: 0, leading: 0, bottom: 0, trailing: 0))
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ struct PINTypeView: View {
|
||||
if showClose {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button {
|
||||
|
||||
didClose?()
|
||||
} label: {
|
||||
Label(T.Commons.close, systemImage: "xmark")
|
||||
}
|
||||
|
@ -61,7 +61,10 @@ struct SecurityView: View {
|
||||
path.append(SecurityPath.setPIN(.enterPIN(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 {
|
||||
case .closed: path.removeLast(2)
|
||||
case .entered(let appPIN): path.append(SecurityPath.setPIN(.verifyPIN(appPIN)))
|
||||
@ -69,7 +72,10 @@ struct SecurityView: View {
|
||||
}
|
||||
}))
|
||||
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 {
|
||||
case .closed: path.removeLast(3)
|
||||
case .saved: path.append(SecurityPath.setPIN(.success))
|
||||
@ -84,7 +90,10 @@ struct SecurityView: View {
|
||||
case .disablePIN(let disablePIN):
|
||||
switch disablePIN {
|
||||
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 {
|
||||
case .closed: path.removeLast()
|
||||
case .verified:
|
||||
@ -101,7 +110,10 @@ struct SecurityView: View {
|
||||
case .changePIN(let changePIN):
|
||||
switch changePIN {
|
||||
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 {
|
||||
case .closed: path.removeLast()
|
||||
case .verified: path.append(SecurityPath.changePIN(.selectLength))
|
||||
@ -115,7 +127,9 @@ struct SecurityView: View {
|
||||
path.removeLast(2)
|
||||
}
|
||||
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 {
|
||||
case .closed: path.removeLast(3)
|
||||
case .entered(let appPIN): path.append(SecurityPath.changePIN(.verifyPIN(appPIN)))
|
||||
@ -123,7 +137,9 @@ struct SecurityView: View {
|
||||
}
|
||||
}))
|
||||
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 {
|
||||
case .closed: path.removeLast(4)
|
||||
case .saved: path.append(SecurityPath.changePIN(.success))
|
||||
|
Loading…
Reference in New Issue
Block a user