mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
show confirm dialog before re-login
This commit is contained in:
@@ -429,6 +429,7 @@ export default {
|
||||
'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',
|
||||
'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',
|
||||
'Last Updated': 'Last Updated',
|
||||
|
||||
@@ -429,6 +429,7 @@ export default {
|
||||
'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认证没有启用',
|
||||
'Are you sure you want to re-login?': '您确定要重新登录?',
|
||||
'Exchange Rates Data': '汇率数据',
|
||||
'Base Currency': '基准货币',
|
||||
'Last Updated': '最后更新',
|
||||
|
||||
@@ -108,15 +108,18 @@ export default {
|
||||
}
|
||||
},
|
||||
relogin() {
|
||||
const router = this.$f7router;
|
||||
const self = this;
|
||||
const router = self.$f7router;
|
||||
|
||||
this.$user.clearTokenAndUserInfo();
|
||||
this.$exchangeRates.clearExchangeRates();
|
||||
this.$settings.clearSettings();
|
||||
this.$locale.init();
|
||||
self.$confirm('Are you sure you want to re-login?', () => {
|
||||
self.$user.clearTokenAndUserInfo();
|
||||
self.$exchangeRates.clearExchangeRates();
|
||||
self.$settings.clearSettings();
|
||||
self.$locale.init();
|
||||
|
||||
router.navigate('/login', {
|
||||
clearPreviousHistory: true
|
||||
router.navigate('/login', {
|
||||
clearPreviousHistory: true
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user