mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-06 07:56:56 +08:00
✨ Feature: support short url now
This commit is contained in:
@@ -312,6 +312,16 @@
|
||||
@change="handleAutoCopyUrl"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_SHORT_URL')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.useShortUrl"
|
||||
:active-text="$T('SETTINGS_OPEN')"
|
||||
:inactive-text="$T('SETTINGS_CLOSE')"
|
||||
@change="handleUseShortUrl"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<el-row align="middle">
|
||||
@@ -1062,7 +1072,8 @@ const form = reactive<ISettingForm>({
|
||||
customMiniIcon: '',
|
||||
isHideDock: false,
|
||||
encodeOutputURL: true,
|
||||
isAutoListenClipboard: false
|
||||
isAutoListenClipboard: false,
|
||||
useShortUrl: false
|
||||
})
|
||||
|
||||
const languageList = i18nManager.languageList.map(item => ({
|
||||
@@ -1160,6 +1171,7 @@ async function initData () {
|
||||
form.isCustomMiniIcon = settings.isCustomMiniIcon || false
|
||||
form.customMiniIcon = settings.customMiniIcon || ''
|
||||
form.isHideDock = settings.isHideDock || false
|
||||
form.useShortUrl = settings.useShortUrl || false
|
||||
currentLanguage.value = settings.language ?? 'zh-CN'
|
||||
currentStartMode.value = settings.startMode || 'quiet'
|
||||
customLink.value = settings.customLink || ''
|
||||
@@ -1414,6 +1426,16 @@ function handleAutoCopyUrl (val: ICheckBoxValueType) {
|
||||
}
|
||||
}
|
||||
|
||||
function handleUseShortUrl (val: ICheckBoxValueType) {
|
||||
saveConfig('settings.useShortUrl', val)
|
||||
const successNotification = new Notification($T('SETTINGS_SHORT_URL'), {
|
||||
body: $T('TIPS_SET_SUCCEED')
|
||||
})
|
||||
successNotification.onclick = () => {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
function confirmLogLevelSetting () {
|
||||
if (form.logLevel.length === 0) {
|
||||
return $message.error($T('TIPS_PLEASE_CHOOSE_LOG_LEVEL'))
|
||||
|
||||
Reference in New Issue
Block a user