Merge branch 'silenty4ng:master' into master

This commit is contained in:
sysuid 2024-06-18 21:57:32 +08:00 committed by GitHub
commit 87cff0b20b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 5 deletions

View file

@ -159,6 +159,8 @@ export default {
'idea.diy': 'LOSEHU DIY', 'idea.diy': 'LOSEHU DIY',
'diy.generate': 'Generate', 'diy.generate': 'Generate',
'cps.dtmfid': 'DTMF ID', 'cps.dtmfid': 'DTMF ID',
'global.upload': 'Upload',
'global.loginUpload': '(Login to upload and share)',
...localeSettings, ...localeSettings,
...localeMessageBox, ...localeMessageBox,
...localeLogin, ...localeLogin,

View file

@ -159,6 +159,8 @@ export default {
'idea.diy': '自定义萝卜固件', 'idea.diy': '自定义萝卜固件',
'diy.generate': '生成', 'diy.generate': '生成',
'cps.dtmfid': 'DTMF ID', 'cps.dtmfid': 'DTMF ID',
'global.upload': '上传',
'global.loginUpload': '(登录可上传分享)',
...localeSettings, ...localeSettings,
...localeMessageBox, ...localeMessageBox,
...localeLogin, ...localeLogin,

View file

@ -81,11 +81,12 @@ const useUserStore = defineStore('user', {
}, },
// Logout // Logout
async logout() { async logout() {
try { // try {
await userLogout(); // await userLogout();
} finally { // } finally {
this.logoutCallBack(); // this.logoutCallBack();
} // }
this.logoutCallBack();
}, },
}, },
}); });

View file

@ -8,11 +8,13 @@
<div style="margin-right: 20px;"> <div style="margin-right: 20px;">
<template v-if="userStore.name"> <template v-if="userStore.name">
<a-link @click="showPanel">&nbsp;&nbsp;{{ userStore.name }}&nbsp;&nbsp;</a-link> <a-link @click="showPanel">&nbsp;&nbsp;{{ userStore.name }}&nbsp;&nbsp;</a-link>
<a-link @click="showPanel">&nbsp;&nbsp;{{ $t('global.upload') }}&nbsp;&nbsp;</a-link>
<a-link @click="userStore.logout()">&nbsp;&nbsp;{{ $t('global.logout') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.logout()">&nbsp;&nbsp;{{ $t('global.logout') }}&nbsp;&nbsp;</a-link>
</template> </template>
<template v-else> <template v-else>
<a-link @click="userStore.setInfo({ showLogin: true })">&nbsp;&nbsp;{{ $t('global.login') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.setInfo({ showLogin: true })">&nbsp;&nbsp;{{ $t('global.login') }}&nbsp;&nbsp;</a-link>
<a-link @click="userStore.setInfo({ showRegister: true })">&nbsp;&nbsp;{{ $t('global.register') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.setInfo({ showRegister: true })">&nbsp;&nbsp;{{ $t('global.register') }}&nbsp;&nbsp;</a-link>
<span style="color: #373737; margin: 10px;">{{ $t('global.loginUpload') }}</span>
</template> </template>
</div> </div>
</template> </template>

View file

@ -8,11 +8,13 @@
<div style="margin-right: 20px;"> <div style="margin-right: 20px;">
<template v-if="userStore.name"> <template v-if="userStore.name">
<a-link @click="showPanel">&nbsp;&nbsp;{{ userStore.name }}&nbsp;&nbsp;</a-link> <a-link @click="showPanel">&nbsp;&nbsp;{{ userStore.name }}&nbsp;&nbsp;</a-link>
<a-link @click="showPanel">&nbsp;&nbsp;{{ $t('global.upload') }}&nbsp;&nbsp;</a-link>
<a-link @click="userStore.logout()">&nbsp;&nbsp;{{ $t('global.logout') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.logout()">&nbsp;&nbsp;{{ $t('global.logout') }}&nbsp;&nbsp;</a-link>
</template> </template>
<template v-else> <template v-else>
<a-link @click="userStore.setInfo({ showLogin: true })">&nbsp;&nbsp;{{ $t('global.login') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.setInfo({ showLogin: true })">&nbsp;&nbsp;{{ $t('global.login') }}&nbsp;&nbsp;</a-link>
<a-link @click="userStore.setInfo({ showRegister: true })">&nbsp;&nbsp;{{ $t('global.register') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.setInfo({ showRegister: true })">&nbsp;&nbsp;{{ $t('global.register') }}&nbsp;&nbsp;</a-link>
<span style="color: #373737; margin: 10px;">{{ $t('global.loginUpload') }}</span>
</template> </template>
</div> </div>
</template> </template>

View file

@ -8,11 +8,13 @@
<div style="margin-right: 20px;"> <div style="margin-right: 20px;">
<template v-if="userStore.name"> <template v-if="userStore.name">
<a-link @click="showPanel">&nbsp;&nbsp;{{ userStore.name }}&nbsp;&nbsp;</a-link> <a-link @click="showPanel">&nbsp;&nbsp;{{ userStore.name }}&nbsp;&nbsp;</a-link>
<a-link @click="showPanel">&nbsp;&nbsp;{{ $t('global.upload') }}&nbsp;&nbsp;</a-link>
<a-link @click="userStore.logout()">&nbsp;&nbsp;{{ $t('global.logout') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.logout()">&nbsp;&nbsp;{{ $t('global.logout') }}&nbsp;&nbsp;</a-link>
</template> </template>
<template v-else> <template v-else>
<a-link @click="userStore.setInfo({ showLogin: true })">&nbsp;&nbsp;{{ $t('global.login') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.setInfo({ showLogin: true })">&nbsp;&nbsp;{{ $t('global.login') }}&nbsp;&nbsp;</a-link>
<a-link @click="userStore.setInfo({ showRegister: true })">&nbsp;&nbsp;{{ $t('global.register') }}&nbsp;&nbsp;</a-link> <a-link @click="userStore.setInfo({ showRegister: true })">&nbsp;&nbsp;{{ $t('global.register') }}&nbsp;&nbsp;</a-link>
<span style="color: #373737; margin: 10px;">{{ $t('global.loginUpload') }}</span>
</template> </template>
</div> </div>
</template> </template>