更新v1.2.1
Squashed commit of the following: commit 146f106fbece251606f358141bda3d9c524c3e93 Author: Sun <95302870@qq.com> Date: Thu Dec 28 19:39:36 2023 +0800 修改默认宽度 commit 827197e295b2b0997902b8f965d14ab2598c5c1b Author: Sun <95302870@qq.com> Date: Thu Dec 28 17:54:25 2023 +0800 修复升级掉登录的问题 commit 2e54326f5fe2b8fac4eed488a14b04b8133c41bb Author: Sun <95302870@qq.com> Date: Thu Dec 28 17:21:49 2023 +0800 优化边距等提示 commit 469c6fd644a2a23d96405d15456980edfdfb17b0 Author: Sun <95302870@qq.com> Date: Thu Dec 28 17:21:34 2023 +0800 搜索栏选择搜索引擎后关闭选择器 commit 632da9635a4a434d361495dfcb83f8b650cb4a3c Author: Sun <95302870@qq.com> Date: Thu Dec 28 16:54:28 2023 +0800 增加 内容左右边距和最大宽度 commit f1cc3dce2a51ec60c1b04f21954b99b284b2df61 Author: Sun <95302870@qq.com> Date: Thu Dec 28 14:24:23 2023 +0800 分组标题增加阴影 commit 7615a29678037362c18632f38caad72e07a32d1a Author: Sun <95302870@qq.com> Date: Thu Dec 28 14:18:41 2023 +0800 更改版本号1.2.1 commit b605374e951d3fb2ca52d36bd0fa82aec4a5e89b Author: Sun <95302870@qq.com> Date: Thu Dec 28 14:11:06 2023 +0800 优化小部分网站图标获取失败的问题 commit c8141184a14fb02f941bbec03ac98f59f8b12d4b Author: Sun <95302870@qq.com> Date: Thu Dec 28 13:00:56 2023 +0800 优化上传管理界面
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import type { UploadFileInfo } from 'naive-ui'
|
||||
import { NButton, NCard, NColorPicker, NGrid, NGridItem, NInput, NPopconfirm, NSelect, NSlider, NSwitch, NUpload, NUploadDragger, useMessage } from 'naive-ui'
|
||||
import { NButton, NCard, NColorPicker, NGrid, NGridItem, NInput, NInputGroup, NPopconfirm, NSelect, NSlider, NSwitch, NUpload, NUploadDragger, useMessage } from 'naive-ui'
|
||||
import { useAuthStore, usePanelState } from '@/store'
|
||||
import { set as setUserConfig } from '@/api/panel/userConfig'
|
||||
import { PanelPanelConfigStyleEnum } from '@/enums/panel'
|
||||
@@ -23,19 +23,24 @@ const iconTypeOptions = [
|
||||
},
|
||||
]
|
||||
|
||||
const maxWidthUnitOption = [
|
||||
{
|
||||
label: 'px',
|
||||
value: 'px',
|
||||
},
|
||||
{
|
||||
label: '%',
|
||||
value: '%',
|
||||
},
|
||||
]
|
||||
|
||||
watch(panelState.panelConfig, () => {
|
||||
if (!isSaveing.value) {
|
||||
isSaveing.value = true
|
||||
|
||||
setTimeout(() => {
|
||||
panelState.recordState()// 本地记录
|
||||
setUserConfig({ panel: panelState.panelConfig }).then((res) => {
|
||||
if (res.code === 0)
|
||||
ms.success('配置已保存')
|
||||
else
|
||||
ms.error(`配置保存失败${res.msg}`)
|
||||
isSaveing.value = false
|
||||
})
|
||||
uploadCloud()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
@@ -55,9 +60,9 @@ function handleUploadBackgroundFinish({
|
||||
function uploadCloud() {
|
||||
setUserConfig({ panel: panelState.panelConfig }).then((res) => {
|
||||
if (res.code === 0)
|
||||
ms.success('配置已同步到云端')
|
||||
ms.success('配置已保存')
|
||||
else
|
||||
ms.error(`配置同步到云端失败${res.msg}`)
|
||||
ms.error(`配置已保存${res.msg}`)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -199,10 +204,27 @@ function resetPanelConfig() {
|
||||
|
||||
<NCard style="border-radius:10px" class="mt-[10px]" size="small">
|
||||
<div class="text-slate-500 mb-[5px] font-bold">
|
||||
其他
|
||||
内容区域
|
||||
</div>
|
||||
|
||||
<NGrid cols="2">
|
||||
<NGridItem span="12 400:12">
|
||||
<div class="flex items-center mt-[10px]">
|
||||
<span class="mr-[10px]">最大宽度</span>
|
||||
<div class="flex">
|
||||
<NInputGroup>
|
||||
<NInput v-model:value="panelState.panelConfig.maxWidth" size="small" type="number" :maxlength="10" :style="{ width: '100px' }" placeholder="1200" />
|
||||
<NSelect v-model:value="panelState.panelConfig.maxWidthUnit" :style="{ width: '80px' }" :options="maxWidthUnitOption" size="small" />
|
||||
</NInputGroup>
|
||||
</div>
|
||||
</div>
|
||||
</NGridItem>
|
||||
<NGridItem span="12 400:12">
|
||||
<div class="flex items-center mt-[10px]">
|
||||
<span class="mr-[10px]">左右边距</span>
|
||||
<NSlider v-model:value="panelState.panelConfig.marginX" class="max-w-[200px]" :step="1" :max="100" />
|
||||
</div>
|
||||
</NGridItem>
|
||||
<NGridItem span="12 400:12">
|
||||
<div class="flex items-center mt-[10px]">
|
||||
<span class="mr-[10px]">上边距 (%)</span>
|
||||
@@ -231,7 +253,7 @@ function resetPanelConfig() {
|
||||
</NPopconfirm>
|
||||
|
||||
<NButton size="small" quaternary type="success" class="ml-[10px]" @click="uploadCloud">
|
||||
立即同步到云端
|
||||
立即保存
|
||||
</NButton>
|
||||
</NCard>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { NButton, NButtonGroup, NCard, NEllipsis, NGrid, NGridItem, NImage, NImageGroup, NSpin, useDialog, useMessage } from 'naive-ui'
|
||||
import { NAlert, NButton, NButtonGroup, NCard, NEllipsis, NGrid, NGridItem, NImage, NImageGroup, NSpin, useDialog, useMessage } from 'naive-ui'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { deletes, getList } from '@/api/system/file'
|
||||
import { set as savePanelConfig } from '@/api/panel/userConfig'
|
||||
@@ -86,8 +86,14 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="bg-slate-200 p-2 h-full">
|
||||
<NSpin v-show="loading" size="small" />
|
||||
<div class="flex justify-center">
|
||||
<NImageGroup>
|
||||
<NAlert type="info" :bordered="false">
|
||||
{{ $t('apps.uploadsFileManager.alertText') }}
|
||||
</NAlert>
|
||||
<div class="flex justify-center mt-2">
|
||||
<div v-if="imageList.length === 0 && !loading" class="flex">
|
||||
{{ $t('apps.uploadsFileManager.nothingText') }}
|
||||
</div>
|
||||
<NImageGroup v-else>
|
||||
<NGrid cols="2 300:2 600:4 900:6 1100:9" :x-gap="5" :y-gap="5">
|
||||
<NGridItem v-for=" item, index in imageList" :key="index">
|
||||
<NCard size="small" style="border-radius: 5px;" :bordered="true">
|
||||
|
||||
@@ -76,6 +76,7 @@ function handleEngineClick() {
|
||||
function handleEngineUpdate(engine: DeskModule.SearchBox.SearchEngine) {
|
||||
state.value.currentSearchEngine = engine
|
||||
moduleConfig.saveToCloud(moduleConfigName, state.value)
|
||||
searchSelectListShow.value = false
|
||||
}
|
||||
|
||||
function handleSearchClick() {
|
||||
|
||||
Reference in New Issue
Block a user