update prompt text

This commit is contained in:
MaysWind
2023-04-22 17:05:52 +08:00
parent 4038b6bc51
commit dab7728138
7 changed files with 39 additions and 35 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
floating-label
clear-button
class="no-margin no-padding-bottom"
:label="$t('Password')"
:label="$t('Passcode')"
:placeholder="$t('Passcode')"
v-model:value="currentPasscode"
@keyup.enter="confirm()"
+2 -2
View File
@@ -16,8 +16,8 @@
floating-label
clear-button
class="no-margin no-padding-bottom"
:label="$t('Password')"
:placeholder="$t('Password')"
:label="$t('Current Password')"
:placeholder="$t('Current Password')"
v-model:value="currentPassword"
@keyup.enter="confirm()"
></f7-list-input>
+9 -9
View File
@@ -899,6 +899,7 @@ export default {
'User registration is disabled': 'User registration is disabled',
'Unable to get user profile': 'Unable to get user profile',
'Current Password': 'Current Password',
'Modify Password': 'Modify Password',
'Please enter your current password when modifying your password': 'Please enter your current password when modifying your password',
'Nothing has been modified': 'Nothing has been modified',
'Your profile has been successfully updated': 'Your profile has been successfully updated',
@@ -994,17 +995,16 @@ export default {
'Application lock is not enabled': 'Application lock is not enabled',
'PIN Code': 'PIN Code',
'Unlock By PIN Code': 'Unlock By PIN Code',
'Unlock By Face ID/Touch ID': 'Unlock By Face ID/Touch ID',
'Please input a new PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.': 'Please input a new PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.',
'Unlock By WebAuthn': 'Unlock By WebAuthn',
'Please input a new 6-digit PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.': 'Please input a new 6-digit PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.',
'Please enter your current PIN code when disable application lock': 'Please enter your current PIN code when disable application lock',
'Face ID / Touch ID': 'Face ID / Touch ID',
'You have enabled Face ID/Touch ID successfully': 'You have enabled Face ID/Touch ID successfully',
'This device does not support Face ID/Touch ID': 'This device does not support Face ID/Touch ID',
'Failed to enable Face ID/Touch ID': 'Failed to enable Face ID/Touch ID',
'You have enabled WebAuthn successfully': 'You have enabled WebAuthn successfully',
'This device does not support WebAuthn': 'This device does not support WebAuthn',
'Failed to enable WebAuthn': 'Failed to enable WebAuthn',
'User has canceled authentication': 'User has canceled authentication',
'User has canceled or this device does not support Face ID/Touch ID': 'User has canceled or this device does not support Face ID/Touch ID',
'Failed to authenticate by Face ID/Touch ID': 'Failed to authenticate by Face ID/Touch ID',
'Face ID/Touch ID authentication is not enabled': 'Face ID/Touch ID authentication is not enabled',
'User has canceled or this device does not support WebAuthn': 'User has canceled or this device does not support WebAuthn',
'Failed to authenticate by WebAuthn': 'Failed to authenticate by WebAuthn',
'WebAuthn is not enabled': 'WebAuthn is not enabled',
'Are you sure you want to re-login?': 'Are you sure you want to re-login?',
'Exchange Rates Data': 'Exchange Rates Data',
'Base Currency': 'Base Currency',
+9 -9
View File
@@ -899,6 +899,7 @@ export default {
'User registration is disabled': '用户注册已禁用',
'Unable to get user profile': '无法获取用户信息',
'Current Password': '当前密码',
'Modify Password': '修改密码',
'Please enter your current password when modifying your password': '修改密码时请输入您的当前密码',
'Nothing has been modified': '没有修改的项目',
'Your profile has been successfully updated': '您的用户信息更新成功',
@@ -994,17 +995,16 @@ export default {
'Application lock is not enabled': '应用锁没有启用',
'PIN Code': 'PIN码',
'Unlock By PIN Code': '使用PIN码解锁',
'Unlock By Face ID/Touch ID': '使用面容ID/指纹ID解锁',
'Please input a new PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.': '请输入一个新的PIN码,PIN码会加密你的本地数据,所以您每次打开应用时都需要输入PIN码。如果您忘记了PIN码,您需要重新登录。',
'Unlock By WebAuthn': '使用WebAuthn解锁',
'Please input a new 6-digit PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.': '请输入一个新的6位数字PIN码,PIN码会加密你的本地数据,所以您每次打开应用时都需要输入PIN码。如果您忘记了PIN码,您需要重新登录。',
'Please enter your current PIN code when disable application lock': '禁用应用锁时需要输入当前的PIN码',
'Face ID / Touch ID': '面容ID / 指纹ID',
'You have enabled Face ID/Touch ID successfully': '您已经成功开启面容ID/指纹ID',
'This device does not support Face ID/Touch ID': '当前设备不支持面容ID或指纹ID',
'Failed to enable Face ID/Touch ID': '启用面容ID或指纹ID失败',
'You have enabled WebAuthn successfully': '您已经成功开启 WebAuth',
'This device does not support WebAuthn': '当前设备不支持 WebAuth',
'Failed to enable WebAuthn': '启用 WebAuth 失败',
'User has canceled authentication': '用户已经取消认证',
'User has canceled or this device does not support Face ID/Touch ID': '用户已取消或当前设备不支持面容ID/指纹ID',
'Failed to authenticate by Face ID/Touch ID': '使用面容ID或指纹ID认证失败',
'Face ID/Touch ID authentication is not enabled': '面容ID或指纹ID认证没有启用',
'User has canceled or this device does not support WebAuthn': '用户已取消或当前设备不支持 WebAuthn',
'Failed to authenticate by WebAuthn': '使用 WebAuthn 认证失败',
'WebAuthn is not enabled': 'WebAuthn 没有启用',
'Are you sure you want to re-login?': '您确定要重新登录?',
'Exchange Rates Data': '汇率数据',
'Base Currency': '基准货币',
+11 -7
View File
@@ -7,8 +7,12 @@
<f7-list strong inset dividers class="margin-top">
<f7-list-item :title="$t('Status')" :after="$t(isEnableApplicationLock ? 'Enabled' : 'Disabled')"></f7-list-item>
<f7-list-item v-if="isEnableApplicationLock">
<span>{{ $t('Unlock By PIN Code') }}</span>
<f7-toggle checked disabled></f7-toggle>
</f7-list-item>
<f7-list-item v-if="isEnableApplicationLock && isSupportedWebAuthn">
<span>{{ $t('Face ID / Touch ID') }}</span>
<span>{{ $t('Unlock By WebAuthn') }}</span>
<f7-toggle :checked="isEnableApplicationLockWebAuthn" @toggle:change="isEnableApplicationLockWebAuthn = $event"></f7-toggle>
</f7-list-item>
<f7-list-button v-if="isEnableApplicationLock" @click="disable(null)">{{ $t('Disable') }}</f7-list-button>
@@ -16,7 +20,7 @@
</f7-list>
<pin-code-input-sheet :title="$t('PIN Code')"
:hint="$t('Please input a new PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.')"
:hint="$t('Please input a new 6-digit PIN code. PIN code would encrypt your local data, so you need input this PIN code when you launch this app. If this PIN code is lost, you should re-login.')"
v-model:show="showInputPinCodeSheetForEnable"
v-model="currentPinCodeForEnable"
@pincode:confirm="enable">
@@ -59,20 +63,20 @@ export default {
self.$user.saveWebAuthnConfig(id);
self.$settings.setEnableApplicationLockWebAuthn(true);
self.$toast('You have enabled Face ID/Touch ID successfully');
self.$toast('You have enabled WebAuthn successfully');
}).catch(error => {
self.$logger.error('failed to enable FaceID/Touch ID', error);
self.$logger.error('failed to enable WebAuthn', error);
self.$hideLoading();
if (error.notSupported) {
self.$toast('This device does not support Face ID/Touch ID');
self.$toast('This device does not support WebAuthn');
} else if (error.name === 'NotAllowedError') {
self.$toast('User has canceled authentication');
} else if (error.invalid) {
self.$toast('Failed to enable Face ID/Touch ID');
self.$toast('Failed to enable WebAuthn');
} else {
self.$toast('User has canceled or this device does not support Face ID/Touch ID');
self.$toast('User has canceled or this device does not support WebAuthn');
}
self.isEnableApplicationLockWebAuthn = false;
+6 -6
View File
@@ -18,7 +18,7 @@
<f7-list>
<f7-list-button :class="{ 'disabled': !isPinCodeValid(pinCode) }" :text="$t('Unlock By PIN Code')" @click="unlockByPin"></f7-list-button>
<f7-list-button v-if="isWebAuthnAvailable" :text="$t('Unlock By Face ID/Touch ID')" @click="unlockByWebAuthn"></f7-list-button>
<f7-list-button v-if="isWebAuthnAvailable" :text="$t('Unlock By WebAuthn')" @click="unlockByWebAuthn"></f7-list-button>
<f7-block-footer>
<f7-link :text="$t('Re-login')" @click="relogin"></f7-link>
</f7-block-footer>
@@ -95,12 +95,12 @@ export default {
const router = self.f7router;
if (!self.$settings.isEnableApplicationLockWebAuthn() || !self.$user.getWebAuthnCredentialId()) {
self.$toast('Face ID/Touch ID authentication is not enabled');
self.$toast('WebAuthn is not enabled');
return;
}
if (!self.$webauthn.isSupported()) {
self.$toast('This device does not support Face ID/Touch ID');
self.$toast('This device does not support WebAuthn');
return;
}
@@ -125,13 +125,13 @@ export default {
self.$logger.error('failed to use webauthn to verify', error);
if (error.notSupported) {
self.$toast('This device does not support Face ID/Touch ID');
self.$toast('This device does not support WebAuthn');
} else if (error.name === 'NotAllowedError') {
self.$toast('User has canceled authentication');
} else if (error.invalid) {
self.$toast('Failed to authenticate by Face ID/Touch ID');
self.$toast('Failed to authenticate by WebAuthn');
} else {
self.$toast('User has canceled or this device does not support Face ID/Touch ID');
self.$toast('User has canceled or this device does not support WebAuthn');
}
});
},
+1 -1
View File
@@ -132,7 +132,7 @@
<f7-list-item class="ebk-list-item-error-info" v-if="extendInputIsInvalid" :footer="$t(extendInputInvalidProblemMessage)"></f7-list-item>
</f7-list>
<password-input-sheet :title="$t('Current Password')"
<password-input-sheet :title="$t('Modify Password')"
:hint="$t('Please enter your current password when modifying your password')"
:confirm-disabled="saving"
:cancel-disabled="saving"