diff --git a/package.json b/package.json index 64328f84..0a1a0e9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moviepilot", - "version": "2.0.6", + "version": "2.0.7", "private": true, "bin": "dist/service.js", "scripts": { @@ -101,4 +101,4 @@ "resolutions": { "postcss": "8" } -} \ No newline at end of file +} diff --git a/src/components/dialog/UserAuthDialog.vue b/src/components/dialog/UserAuthDialog.vue new file mode 100644 index 00000000..c222256a --- /dev/null +++ b/src/components/dialog/UserAuthDialog.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/layouts/components/UserProfile.vue b/src/layouts/components/UserProfile.vue index 6d75286a..f05e470c 100644 --- a/src/layouts/components/UserProfile.vue +++ b/src/layouts/components/UserProfile.vue @@ -6,6 +6,7 @@ import router from '@/router' import avatar1 from '@images/avatars/avatar-1.png' import api from '@/api' import ProgressDialog from '@/components/dialog/ProgressDialog.vue' +import UserAuthDialog from '@/components/dialog/UserAuthDialog.vue' // Vuex Store const store = useStore() @@ -19,6 +20,9 @@ const $toast = useToast() // 进度框 const progressDialog = ref(false) +// 站点认证对话框 +const siteAuthDialog = ref(false) + // 执行注销操作 function logout() { // 清除登录状态信息 @@ -56,10 +60,22 @@ async function restart() { } } +// 显示站点认证对话框 +function showSiteAuthDialog() { + siteAuthDialog.value = true +} + +// 用户站点认证成功 +function siteAuthDone() { + siteAuthDialog.value = false + logout() +} + // 从Vuex Store中获取信息 const superUser = computed(() => store.state.auth.superUser) const userName = computed(() => store.state.auth.userName) const avatar = computed(() => store.state.auth.avatar || avatar1) +const userLevel = computed(() => store.state.auth.level)