mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-12 14:16:06 +00:00
core: In sd-salt and webauthn error dialogs replace "X" button with "Close" button.
This commit is contained in:
parent
c8fbcd8b76
commit
e23dadc010
@ -29,9 +29,9 @@ async def wrong_card_dialog(ctx: Optional[wire.Context]) -> None:
|
|||||||
text.br_half()
|
text.br_half()
|
||||||
text.normal("Please unplug the", "device and insert a", "different card.")
|
text.normal("Please unplug the", "device and insert a", "different card.")
|
||||||
if ctx is None:
|
if ctx is None:
|
||||||
await Confirm(text, confirm=None)
|
await Confirm(text, confirm=None, cancel="Close")
|
||||||
else:
|
else:
|
||||||
await require_confirm(ctx, text, confirm=None)
|
await require_confirm(ctx, text, confirm=None, cancel="Close")
|
||||||
|
|
||||||
|
|
||||||
async def insert_card_dialog(ctx: Optional[wire.Context]) -> None:
|
async def insert_card_dialog(ctx: Optional[wire.Context]) -> None:
|
||||||
@ -40,9 +40,9 @@ async def insert_card_dialog(ctx: Optional[wire.Context]) -> None:
|
|||||||
text.br_half()
|
text.br_half()
|
||||||
text.normal("Please unplug the", "device and insert your", "SD card.")
|
text.normal("Please unplug the", "device and insert your", "SD card.")
|
||||||
if ctx is None:
|
if ctx is None:
|
||||||
await Confirm(text, confirm=None)
|
await Confirm(text, confirm=None, cancel="Close")
|
||||||
else:
|
else:
|
||||||
await require_confirm(ctx, text, confirm=None)
|
await require_confirm(ctx, text, confirm=None, cancel="Close")
|
||||||
|
|
||||||
|
|
||||||
async def request_sd_salt(
|
async def request_sd_salt(
|
||||||
|
@ -599,7 +599,7 @@ class U2fConfirmRegister(U2fState):
|
|||||||
text.normal(
|
text.normal(
|
||||||
"Another U2F device", "was used to register", "in this application."
|
"Another U2F device", "was used to register", "in this application."
|
||||||
)
|
)
|
||||||
return await confirm(text, confirm=None)
|
return await confirm(text, confirm=None, cancel="Close")
|
||||||
else:
|
else:
|
||||||
content = ConfirmContent(self)
|
content = ConfirmContent(self)
|
||||||
return await confirm(content)
|
return await confirm(content)
|
||||||
@ -724,7 +724,7 @@ class Fido2ConfirmExcluded(Fido2ConfirmMakeCredential):
|
|||||||
|
|
||||||
text = Text("FIDO2 Register", ui.ICON_WRONG, ui.RED)
|
text = Text("FIDO2 Register", ui.ICON_WRONG, ui.RED)
|
||||||
text.normal("This device is already", "registered with", self._cred.rp_id + ".")
|
text.normal("This device is already", "registered with", self._cred.rp_id + ".")
|
||||||
await confirm(text, confirm=None)
|
await confirm(text, confirm=None, cancel="Close")
|
||||||
|
|
||||||
|
|
||||||
class Fido2ConfirmGetAssertion(Fido2State, ConfirmInfo, Pageable):
|
class Fido2ConfirmGetAssertion(Fido2State, ConfirmInfo, Pageable):
|
||||||
@ -797,7 +797,7 @@ class Fido2ConfirmNoPin(State):
|
|||||||
async def confirm_dialog(self) -> bool:
|
async def confirm_dialog(self) -> bool:
|
||||||
text = Text("FIDO2 Verify User", ui.ICON_WRONG, ui.RED)
|
text = Text("FIDO2 Verify User", ui.ICON_WRONG, ui.RED)
|
||||||
text.normal("Unable to verify user.", "Please enable PIN", "protection.")
|
text.normal("Unable to verify user.", "Please enable PIN", "protection.")
|
||||||
return await confirm(text, confirm=None)
|
return await confirm(text, confirm=None, cancel="Close")
|
||||||
|
|
||||||
|
|
||||||
class Fido2ConfirmNoCredentials(Fido2ConfirmGetAssertion):
|
class Fido2ConfirmNoCredentials(Fido2ConfirmGetAssertion):
|
||||||
@ -814,7 +814,7 @@ class Fido2ConfirmNoCredentials(Fido2ConfirmGetAssertion):
|
|||||||
text.normal(
|
text.normal(
|
||||||
"This device is not", "registered with", self._creds[0].app_name() + "."
|
"This device is not", "registered with", self._creds[0].app_name() + "."
|
||||||
)
|
)
|
||||||
await confirm(text, confirm=None)
|
await confirm(text, confirm=None, cancel="Close")
|
||||||
|
|
||||||
|
|
||||||
class Fido2ConfirmReset(Fido2State):
|
class Fido2ConfirmReset(Fido2State):
|
||||||
|
@ -42,7 +42,7 @@ async def add_resident_credential(
|
|||||||
"not belong to this",
|
"not belong to this",
|
||||||
"authenticator.",
|
"authenticator.",
|
||||||
)
|
)
|
||||||
await require_confirm(ctx, text, confirm=None)
|
await require_confirm(ctx, text, confirm=None, cancel="Close")
|
||||||
raise wire.ActionCancelled("Cancelled")
|
raise wire.ActionCancelled("Cancelled")
|
||||||
|
|
||||||
content = ConfirmContent(ConfirmAddCredential(cred))
|
content = ConfirmContent(ConfirmAddCredential(cred))
|
||||||
|
Loading…
Reference in New Issue
Block a user