From b3fa5b1e9100a93f85a9e00ae8b1a0f26a8d56ed Mon Sep 17 00:00:00 2001 From: expdsn <18111002318@163.com> Date: Fri, 15 Nov 2024 14:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE-=E7=BC=BA=E5=B0=91=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/bg/addBorder.png | Bin 0 -> 15829 bytes src/layout/background/BackgroundPage.tsx | 6 +-- src/layout/grid/Reset.tsx | 52 ++++++++++++++++++++--- src/layout/useLayoutStore.ts | 15 ++++++- src/settings/SettingsOverlay.tsx | 21 ++++++--- src/settings/SettingsOverlayContent.tsx | 2 +- 6 files changed, 79 insertions(+), 17 deletions(-) create mode 100644 public/bg/addBorder.png diff --git a/public/bg/addBorder.png b/public/bg/addBorder.png new file mode 100644 index 0000000000000000000000000000000000000000..20d98e148f1218fb0143b5922b14a702c6470ab5 GIT binary patch literal 15829 zcmeHuXH=706Rs#lL7E6CT~tu2G*PMwN(U7}Z_*J7NDB};(iKFcOClXY2^|82Dk4pK zCq#O$fdmNUMh|$t`~R-{>->SWvhrrXd-lxiXP$W`?76xEB{>uMxpU_zl@#S)o;!D5 z_uM%m;6+lxCq@NUTZDf^&My_7oGbjvvUKho$2leW$6D^jYbXjYL)Vm(lkSBtZJ9wY zN8)OfA77;*qK%F48z9Minwz5ZBsp%aGoxTpLx-jXTC>7*Qe8bw;)ViLs96PPs@-V& za#6X1(~kCIgg65Y?F;>#RwQ4~lVq+$%swXNmL*ftecP8-4?O0!M!Yj-J8|2G@1t7r zTheHZG!J->JH{4`uB{W{|7`wr^^TB7O^zyK@m)@dmQEOMlg5UPh?wTlIU-`N1V0!y zbcBl*b&HExevX>+pvZIkYjE*+-%_wO?pD}(*!TDaZAb=*t!S*X)@+JZg~Guooq4v} zKabOdR`|h^!Vb07e9Y>~_>~0qc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Y9>?4zQT0))CKoee~wLBHoSIlz=;F@Ov_b%%7n4A!^eY8=i~(656}LKyBz;a z$)Qo)#3AHZG(*|RokGK~iK6b$%kFY=&FYvAfeUdf8P`gTmyhBM+MG_@n9=>Y`|%%I z`-7YXYZuQsV20?P?tFW`DlZ0($XVs>JMp!8*`f2d^Kp%nrdrZ;U7m1fHfo)$hE4LC z;euoA*4KU)1K)Y(Aq<^_fj{Gk9%C=f55~oWu|y~uP{m^`ne-C{;UkPI9xrs7UkQ^pIkl}{gCYs3x(!IsUS@=~b?SNk)hoBm;B!|nxJd8 zC!Z20VDsL#WrCq>OY(@b`5T&%{`2cCU0G8)cr^ba5VO>sX9oBnDY5Wc$9%NFZ;r{8 zyROng=Qdz98K~f0d~*=GZ-$mR+>~=jdgyG0E|gfUvDUoB~%GHkP4(sD-R^u3Ejh#1o<-h`=LYA(=}-}xF4 zq!9Mwh1rx6ms549D%)W#?C__m@Z`?jj->g{QBk&%8HOTdvQnwa?OXhc>A7FhIX7G? z=~~T;%KmoY-UAv?Si;~DtWBdczJf4Z1EjSv^u@Ywwponf#NivN6mzx4P&b4pLu { const settings = useSettingsStore() return () => (
-
所属模式
@@ -38,7 +38,7 @@ export default defineComponent(() => { ]} v-model:value={selected.value} /> -
+ */}
{layout.background.video && layout.background.type !== 'own' ? ( diff --git a/src/layout/grid/Reset.tsx b/src/layout/grid/Reset.tsx index ce91683..f2bd9ff 100644 --- a/src/layout/grid/Reset.tsx +++ b/src/layout/grid/Reset.tsx @@ -1,23 +1,65 @@ import SettingItem from '@/settings/SettingItem' import useSettingsStore from '@/settings/useSettingsStore' -import { Button, Switch } from 'ant-design-vue' +import { Button, Modal, Switch } from 'ant-design-vue' import clsx from 'clsx' -import { defineComponent } from 'vue' +import { computed, defineComponent, ref } from 'vue' +import useLayoutStore from '../useLayoutStore' export default defineComponent({ setup() { const settings = useSettingsStore() + const open = ref(false) + const layout = useLayoutStore() + const isGame = computed(() => { + return layout.state.current === 0 + }) return () => (
重置
+ label: () =>
重置
}} > - +

将会把您的历史调整清空,恢复成最初的样式

-
+ { + open.value && +
+ +
+ 恢复提醒 +
+ 此操作会将您的历史调整的数据清空,为防止您的误操作,请再次确认是否要进行重置 +
+ + + +
+
+
+ } + +
) } }) diff --git a/src/layout/useLayoutStore.ts b/src/layout/useLayoutStore.ts index a05c391..766b523 100644 --- a/src/layout/useLayoutStore.ts +++ b/src/layout/useLayoutStore.ts @@ -26,7 +26,7 @@ const defaultLayout: Layout = { export default defineStore('layout', () => { const settings = useSettingsStore() const user = useUserStore() - const state = reactive(defaultLayout) + const state = reactive({ ...defaultLayout }) const ready = ref(false) db.getItem('layout').then((res) => { @@ -112,7 +112,17 @@ export default defineStore('layout', () => { } return block.label || '' } + const resetAll = () => { + request('GET', '/api/app/desktop').then((res: any) => { + if (!res) return + state.dir = res.dir + state.content = res.content + }).catch(() => { + Object.assign(state, defaultLayout) + + }) + } const changeBackground = (url: string) => { state.content[state.current].background = url } @@ -161,6 +171,7 @@ export default defineStore('layout', () => { openDir, checkDir, getLabel, - changeBackground + changeBackground, + resetAll } }) diff --git a/src/settings/SettingsOverlay.tsx b/src/settings/SettingsOverlay.tsx index 596616e..253b68e 100644 --- a/src/settings/SettingsOverlay.tsx +++ b/src/settings/SettingsOverlay.tsx @@ -4,7 +4,6 @@ import useUserStore from '@/user/useUserStore' import useRouterStore from '@/useRouterStore' import asyncLoader from '@/utils/asyncLoader' import clsx from 'clsx' -import { OhVueIcon } from 'oh-vue-icons' import { computed, defineComponent, Transition } from 'vue' import SettingLineImg from '~/icons/settingLine.png' const Content = asyncLoader(() => import('./SettingsOverlayContent')) @@ -58,7 +57,7 @@ export default defineComponent(() => { return layout.state.current === 0 }) return () => ( -
+
{/* 背景遮罩 */} {show.value && (
{ {show.value && (
@@ -107,7 +113,7 @@ export default defineComponent(() => { onClick={() => { if (profile.id) { router.go('settings-user') - }else { + } else { router.go('global-login') } // router.go('settings-user') @@ -135,7 +141,10 @@ export default defineComponent(() => {
- +
+ + +
)} diff --git a/src/settings/SettingsOverlayContent.tsx b/src/settings/SettingsOverlayContent.tsx index 2958cb3..4e9792d 100644 --- a/src/settings/SettingsOverlayContent.tsx +++ b/src/settings/SettingsOverlayContent.tsx @@ -15,7 +15,7 @@ export default defineComponent(() => { const router = useRouterStore() return () => ( -
+
{router.path === 'settings-user' ? (