mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-26 10:40:26 +08:00
✨ Feature: auto import of manage page can be closed now
This commit is contained in:
@@ -569,6 +569,10 @@ function isImported (alias: string) {
|
||||
}
|
||||
|
||||
async function transUpToManage (config: IUploaderConfigListItem, picBedName: string) {
|
||||
const autoImport = await getConfig<boolean>('settings.autoImport') || false
|
||||
if (!autoImport) {
|
||||
return
|
||||
}
|
||||
let alias: string = ''
|
||||
const resultMap: IStringKeyMap = {}
|
||||
switch (picBedName) {
|
||||
|
||||
@@ -195,6 +195,16 @@
|
||||
{{ $T('SETTINGS_CLICK_TO_SET') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_AUTO_IMPORT')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.autoImport"
|
||||
:active-text="$T('SETTINGS_OPEN')"
|
||||
:inactive-text="$T('SETTINGS_CLOSE')"
|
||||
@change="autoImportChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_CHECK_UPDATE')"
|
||||
>
|
||||
@@ -1196,6 +1206,7 @@ const form = reactive<ISettingForm>({
|
||||
isCustomMiniIcon: false,
|
||||
customMiniIcon: '',
|
||||
isHideDock: false,
|
||||
autoImport: false,
|
||||
encodeOutputURL: true,
|
||||
isAutoListenClipboard: false,
|
||||
useShortUrl: false,
|
||||
@@ -1341,6 +1352,7 @@ async function initData () {
|
||||
form.language = settings.language ?? 'zh-CN'
|
||||
form.encodeOutputURL = settings.encodeOutputURL === undefined ? true : settings.encodeOutputURL
|
||||
form.deleteCloudFile = settings.deleteCloudFile || false
|
||||
form.autoImport = settings.autoImport || false
|
||||
form.isCustomMiniIcon = settings.isCustomMiniIcon || false
|
||||
form.customMiniIcon = settings.customMiniIcon || ''
|
||||
form.isHideDock = settings.isHideDock || false
|
||||
@@ -1470,6 +1482,10 @@ function updateHelperChange (val: ICheckBoxValueType) {
|
||||
saveConfig('settings.showUpdateTip', val)
|
||||
}
|
||||
|
||||
function autoImportChange (val: ICheckBoxValueType) {
|
||||
saveConfig('settings.autoImport', val)
|
||||
}
|
||||
|
||||
function handleHideDockChange (val: ICheckBoxValueType) {
|
||||
if (val && currentStartMode.value === 'no-tray') {
|
||||
ElMessage.warning($T('SETTINGS_ISHIDEDOCK_TIPS'))
|
||||
|
||||
Reference in New Issue
Block a user