mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-03 14:50:57 +08:00
✨ Feature: add a new config item to close upload result notification
ISSUES CLOSED: #74
This commit is contained in:
@@ -287,6 +287,16 @@
|
||||
@change="handleUploadNotification"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_OPEN_UPLOAD_RESULT_TIPS')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.uploadResultNotification"
|
||||
:active-text="$T('SETTINGS_OPEN')"
|
||||
:inactive-text="$T('SETTINGS_CLOSE')"
|
||||
@change="handleUploadResultNotification"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_COMPRESS_AND_WATERMARK')"
|
||||
>
|
||||
@@ -1527,6 +1537,7 @@ const form = reactive<ISettingForm>({
|
||||
rename: false,
|
||||
autoRename: false,
|
||||
uploadNotification: false,
|
||||
uploadResultNotification: true,
|
||||
miniWindowOntop: false,
|
||||
logLevel: ['all'],
|
||||
autoCopyUrl: true,
|
||||
@@ -1680,6 +1691,7 @@ async function initData () {
|
||||
form.rename = settings.rename || false
|
||||
form.autoRename = settings.autoRename || false
|
||||
form.uploadNotification = settings.uploadNotification || false
|
||||
form.uploadResultNotification = settings.uploadResultNotification === undefined ? true : settings.uploadResultNotification
|
||||
form.miniWindowOntop = settings.miniWindowOntop || false
|
||||
form.logLevel = initLogLevel(settings.logLevel || [])
|
||||
form.autoCopyUrl = settings.autoCopy === undefined ? true : settings.autoCopy
|
||||
@@ -1952,6 +1964,12 @@ function handleUploadNotification (val: ICheckBoxValueType) {
|
||||
})
|
||||
}
|
||||
|
||||
function handleUploadResultNotification (val: ICheckBoxValueType) {
|
||||
saveConfig({
|
||||
'settings.uploadResultNotification': val
|
||||
})
|
||||
}
|
||||
|
||||
async function cancelWindowSize () {
|
||||
mainWindowSizeVisible.value = false
|
||||
mainWindowWidth.value = await getConfig<number>('settings.mainWindowWidth') || 1200
|
||||
|
||||
Reference in New Issue
Block a user