1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-10 23:40:58 +00:00

core: In sd-salt and webauthn error dialogs replace "X" button with "Close" button.

This commit is contained in:
Andrew Kozlik 2019-09-23 09:46:25 +02:00
parent de74750569
commit a7485c0840
3 changed files with 9 additions and 9 deletions

View File

@ -29,9 +29,9 @@ async def wrong_card_dialog(ctx: Optional[wire.Context]) -> None:
text.br_half()
text.normal("Please unplug the", "device and insert a", "different card.")
if ctx is None:
await Confirm(text, confirm=None)
await Confirm(text, confirm=None, cancel="Close")
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:
@ -40,9 +40,9 @@ async def insert_card_dialog(ctx: Optional[wire.Context]) -> None:
text.br_half()
text.normal("Please unplug the", "device and insert your", "SD card.")
if ctx is None:
await Confirm(text, confirm=None)
await Confirm(text, confirm=None, cancel="Close")
else:
await require_confirm(ctx, text, confirm=None)
await require_confirm(ctx, text, confirm=None, cancel="Close")
async def request_sd_salt(

View File

@ -599,7 +599,7 @@ class U2fConfirmRegister(U2fState):
text.normal(
"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:
content = ConfirmContent(self)
return await confirm(content)
@ -724,7 +724,7 @@ class Fido2ConfirmExcluded(Fido2ConfirmMakeCredential):
text = Text("FIDO2 Register", ui.ICON_WRONG, ui.RED)
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):
@ -797,7 +797,7 @@ class Fido2ConfirmNoPin(State):
async def confirm_dialog(self) -> bool:
text = Text("FIDO2 Verify User", ui.ICON_WRONG, ui.RED)
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):
@ -814,7 +814,7 @@ class Fido2ConfirmNoCredentials(Fido2ConfirmGetAssertion):
text.normal(
"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):

View File

@ -42,7 +42,7 @@ async def add_resident_credential(
"not belong to this",
"authenticator.",
)
await require_confirm(ctx, text, confirm=None)
await require_confirm(ctx, text, confirm=None, cancel="Close")
raise wire.ActionCancelled("Cancelled")
content = ConfirmContent(ConfirmAddCredential(cred))