From 07b767deaa4f6950ef00e7b869f3ae8c020d2a83 Mon Sep 17 00:00:00 2001
From: limengnan <420004014@qq.com>
Date: Tue, 24 Jun 2025 11:06:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=89=8D=E7=AB=AFsrc/views/a?=
=?UTF-8?q?bout=E7=9B=AE=E5=BD=95=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core-frontend/src/views/about/index.vue | 34 +++++++++++++++++---
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/core/core-frontend/src/views/about/index.vue b/core/core-frontend/src/views/about/index.vue
index af8e2e5..31ad12f 100644
--- a/core/core-frontend/src/views/about/index.vue
+++ b/core/core-frontend/src/views/about/index.vue
@@ -4,12 +4,13 @@ import aboutBg from '@/assets/img/about-bg.png'
import { ref, reactive, onMounted } from 'vue'
import { useUserStoreWithOut } from '@/store/modules/user'
import { F2CLicense } from './index'
-import { validateApi, buildVersionApi, updateInfoApi } from '@/api/about'
-import { ElMessage } from 'element-plus-secondary'
+import { validateApi, buildVersionApi, updateInfoApi, revertApi } from '@/api/about'
+import { ElMessage, ElMessageBox } from 'element-plus-secondary'
import { useI18n } from '@/hooks/web/useI18n'
import { useEmitt } from '@/hooks/web/useEmitt'
import { useCache } from '@/hooks/web/useCache'
-
+import { logoutApi } from '@/api/login'
+import { logoutHandler } from '@/utils/logout'
const dialogVisible = ref(false)
const { wsCache } = useCache('localStorage')
const { t } = useI18n()
@@ -58,7 +59,29 @@ const support = () => {
const openType = wsCache.get('open-backend') === '1' ? '_self' : '_blank'
window.open(url, openType)
}
-
+const back2Community = () => {
+ ElMessageBox.confirm(t('about.confirm_tips'), {
+ confirmButtonType: 'danger',
+ type: 'warning',
+ confirmButtonText: t('common.sure'),
+ cancelButtonText: t('dataset.cancel'),
+ autofocus: false,
+ showClose: false
+ })
+ .then(() => {
+ revertApi().then(() => {
+ ElMessage.success(t('about.update_success'))
+ logout()
+ })
+ })
+ .catch(e => {
+ console.error(e)
+ })
+}
+const logout = async () => {
+ await logoutApi()
+ logoutHandler()
+}
const getLicenseInfo = () => {
validateHandler({}, res => {
const info = getLicense(res.data)
@@ -203,6 +226,9 @@ const update = (licKey: string) => {
{{ $t('about.update_license') }}
{{ $t('about.support') }}
+
+ {{ $t('about.back_community') }}
+