|
|
@ -184,7 +184,7 @@ import Proxy from '@/views/setting/panel/proxy/index.vue';
|
|
|
|
import Network from '@/views/setting/panel/default-network/index.vue';
|
|
|
|
import Network from '@/views/setting/panel/default-network/index.vue';
|
|
|
|
import HideMenu from '@/views/setting/panel/hidemenu/index.vue';
|
|
|
|
import HideMenu from '@/views/setting/panel/hidemenu/index.vue';
|
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
|
import { getXpackSetting, updateXpackSetting } from '@/utils/xpack';
|
|
|
|
import { getXpackSetting, updateXpackSettingByKey } from '@/utils/xpack';
|
|
|
|
|
|
|
|
|
|
|
|
const loading = ref(false);
|
|
|
|
const loading = ref(false);
|
|
|
|
const i18n = useI18n();
|
|
|
|
const i18n = useI18n();
|
|
|
@ -357,18 +357,11 @@ const onSave = async (key: string, val: any) => {
|
|
|
|
globalStore.themeConfig.theme = val;
|
|
|
|
globalStore.themeConfig.theme = val;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
switchTheme();
|
|
|
|
switchTheme();
|
|
|
|
if (isProductPro.value) {
|
|
|
|
updateXpackSettingByKey('Theme', val === 'dark-gold' ? 'dark-gold' : '');
|
|
|
|
let formData = new FormData();
|
|
|
|
if (val === 'dark-gold') {
|
|
|
|
formData.append('theme', val);
|
|
|
|
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
|
|
|
|
await updateXpackSetting(formData)
|
|
|
|
loading.value = false;
|
|
|
|
.then(async () => {
|
|
|
|
search();
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
MsgSuccess(i18n.t('commons.msg.operationSuccess'));
|
|
|
|
|
|
|
|
await search();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|