ui: tfa: improve button text for webAuthn
So users now what to press for starting off a webauthn challenge. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
dceecb0bbf
commit
2dbc1a9a55
@ -254,6 +254,7 @@ Ext.define('PBS.login.TfaWindow', {
|
|||||||
|
|
||||||
viewModel: {
|
viewModel: {
|
||||||
data: {
|
data: {
|
||||||
|
confirmText: gettext('Confirm Second Factor'),
|
||||||
canConfirm: false,
|
canConfirm: false,
|
||||||
availabelChallenge: {},
|
availabelChallenge: {},
|
||||||
},
|
},
|
||||||
@ -324,6 +325,10 @@ Ext.define('PBS.login.TfaWindow', {
|
|||||||
newField.focus();
|
newField.focus();
|
||||||
newField.validate();
|
newField.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let confirmText = newCard.confirmText || gettext('Confirm Second Factor');
|
||||||
|
this.getViewModel().set('confirmText', confirmText);
|
||||||
|
|
||||||
this.saveLastTabUsed(tabPanel, newCard);
|
this.saveLastTabUsed(tabPanel, newCard);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -483,6 +488,7 @@ Ext.define('PBS.login.TfaWindow', {
|
|||||||
xtype: 'panel',
|
xtype: 'panel',
|
||||||
title: 'WebAuthn',
|
title: 'WebAuthn',
|
||||||
iconCls: 'fa fa-fw fa-shield',
|
iconCls: 'fa fa-fw fa-shield',
|
||||||
|
confirmText: gettext('Start WebAuthn challenge'),
|
||||||
handler: 'loginWebauthn',
|
handler: 'loginWebauthn',
|
||||||
bind: {
|
bind: {
|
||||||
disabled: '{!availabelChallenge.webauthn}',
|
disabled: '{!availabelChallenge.webauthn}',
|
||||||
@ -567,11 +573,11 @@ Ext.define('PBS.login.TfaWindow', {
|
|||||||
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: gettext('Confirm Second Factor'),
|
|
||||||
handler: 'loginTFA',
|
handler: 'loginTFA',
|
||||||
reference: 'tfaButton',
|
reference: 'tfaButton',
|
||||||
disabled: true,
|
disabled: true,
|
||||||
bind: {
|
bind: {
|
||||||
|
text: '{confirmText}',
|
||||||
disabled: '{!canConfirm}',
|
disabled: '{!canConfirm}',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user