mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-07-10 23:21:27 +08:00
✨ Feature: add url encode setting
This commit is contained in:
@@ -335,6 +335,16 @@
|
||||
@change="useBuiltinClipboardChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_ENCODE_OUTPUT_URL')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.encodeOutputURL"
|
||||
:active-text="$T('SETTINGS_OPEN')"
|
||||
:inactive-text="$T('SETTINGS_CLOSE')"
|
||||
@change="handleEncodeOutputURL"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:style="{ marginRight: '-64px' }"
|
||||
:label="$T('CHOOSE_SHOWED_PICBED')"
|
||||
@@ -1040,7 +1050,8 @@ const form = reactive<ISettingForm>({
|
||||
deleteCloudFile: false,
|
||||
isCustomMiniIcon: false,
|
||||
customMiniIcon: '',
|
||||
isHideDock: false
|
||||
isHideDock: false,
|
||||
encodeOutputURL: true
|
||||
})
|
||||
|
||||
const languageList = i18nManager.languageList.map(item => ({
|
||||
@@ -1061,7 +1072,7 @@ const proxyVisible = ref(false)
|
||||
const mainWindowSizeVisible = ref(false)
|
||||
|
||||
const customLink = reactive({
|
||||
value: '$url'
|
||||
value: ''
|
||||
})
|
||||
|
||||
const shortKey = reactive<IShortKeyMap>({
|
||||
@@ -1132,13 +1143,14 @@ async function initData () {
|
||||
form.checkBetaUpdate = settings.checkBetaUpdate === undefined ? true : settings.checkBetaUpdate
|
||||
form.useBuiltinClipboard = settings.useBuiltinClipboard === undefined ? false : settings.useBuiltinClipboard
|
||||
form.language = settings.language ?? 'zh-CN'
|
||||
form.encodeOutputURL = settings.encodeOutputURL === undefined ? true : settings.encodeOutputURL
|
||||
form.deleteCloudFile = settings.deleteCloudFile || false
|
||||
form.isCustomMiniIcon = settings.isCustomMiniIcon || false
|
||||
form.customMiniIcon = settings.customMiniIcon || ''
|
||||
form.isHideDock = settings.isHideDock || false
|
||||
currentLanguage.value = settings.language ?? 'zh-CN'
|
||||
currentStartMode.value = settings.startMode || 'quiet'
|
||||
customLink.value = settings.customLink || '$url'
|
||||
customLink.value = settings.customLink || ''
|
||||
shortKey.upload = settings.shortKey.upload
|
||||
proxy.value = picBed.proxy || ''
|
||||
npmRegistry.value = settings.registry || ''
|
||||
@@ -1200,6 +1212,16 @@ function confirmCustomLink () {
|
||||
})
|
||||
}
|
||||
|
||||
function handleEncodeOutputURL (val: ICheckBoxValueType) {
|
||||
saveConfig('settings.encodeOutputURL', val)
|
||||
const successNotification = new Notification($T('SETTINGS_ENCODE_OUTPUT_URL'), {
|
||||
body: $T('TIPS_SET_SUCCEED')
|
||||
})
|
||||
successNotification.onclick = () => {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
async function cancelProxy () {
|
||||
proxyVisible.value = false
|
||||
proxy.value = await getConfig<string>('picBed.proxy') || ''
|
||||
|
||||
@@ -602,7 +602,7 @@ function ipcSendFiles (files: FileList) {
|
||||
|
||||
async function getPasteStyle () {
|
||||
pasteStyle.value = await getConfig('settings.pasteStyle') || 'markdown'
|
||||
customLink.value = await getConfig('settings.customLink') || '$url'
|
||||
customLink.value = await getConfig('settings.customLink') || ''
|
||||
}
|
||||
|
||||
function handlePasteStyleChange (val: string | number | boolean) {
|
||||
|
||||
Reference in New Issue
Block a user