mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-02-23 05:41:05 +01:00
Fix twofaccounts not being selectable in management mode
This commit is contained in:
parent
89657bb5aa
commit
f473533bfb
@ -132,34 +132,34 @@
|
|||||||
* Shows rotating OTP for the provided account
|
* Shows rotating OTP for the provided account
|
||||||
*/
|
*/
|
||||||
function showOTP(account) {
|
function showOTP(account) {
|
||||||
// In Management mode, clicking an account does not show the otpDisplay, it selects the account
|
// Data that should be displayed quickly by the OtpDisplay
|
||||||
if(bus.inManagementMode) {
|
// component are passed using props.
|
||||||
twofaccounts.select(account.id)
|
otpDisplayProps.value.otp_type = account.otp_type
|
||||||
}
|
otpDisplayProps.value.service = account.service
|
||||||
else {
|
otpDisplayProps.value.account = account.account
|
||||||
// Data that should be displayed quickly by the OtpDisplay
|
otpDisplayProps.value.icon = account.icon
|
||||||
// component are passed using props.
|
|
||||||
otpDisplayProps.value.otp_type = account.otp_type
|
|
||||||
otpDisplayProps.value.service = account.service
|
|
||||||
otpDisplayProps.value.account = account.account
|
|
||||||
otpDisplayProps.value.icon = account.icon
|
|
||||||
|
|
||||||
nextTick().then(() => {
|
nextTick().then(() => {
|
||||||
showOtpInModal.value = true
|
showOtpInModal.value = true
|
||||||
otpDisplay.value.show(account.id);
|
otpDisplay.value.show(account.id);
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows an OTP in a modal or directly copies it to the clipboard
|
* Shows an OTP in a modal or directly copies it to the clipboard
|
||||||
*/
|
*/
|
||||||
function showOrCopy(account) {
|
function showOrCopy(account) {
|
||||||
if (!user.preferences.getOtpOnRequest && account.otp_type.includes('totp')) {
|
// In Management mode, clicking an account does not show/copy, it selects the account
|
||||||
copyToClipboard(account.otp.password)
|
if(bus.inManagementMode) {
|
||||||
|
twofaccounts.select(account.id)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showOTP(account)
|
if (!user.preferences.getOtpOnRequest && account.otp_type.includes('totp')) {
|
||||||
|
copyToClipboard(account.otp.password)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showOTP(account)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user