mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-07-13 00:21:25 +08:00
✨ Feature: add authoration key for built-in server
This commit is contained in:
@@ -1055,6 +1055,16 @@
|
||||
:placeholder="$T('SETTINGS_TIP_PLACEHOLDER_PORT')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_SET_SERVER_KEY')"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.serverKey"
|
||||
type="input"
|
||||
:placeholder="$T('SETTINGS_TIP_PLACEHOLDER_KEY')"
|
||||
@change="handleServerKeyChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@@ -1691,7 +1701,8 @@ const form = reactive<ISettingForm>({
|
||||
shortUrlServer: 'c1n',
|
||||
yourlsDomain: '',
|
||||
yourlsSignature: '',
|
||||
deleteLocalFile: false
|
||||
deleteLocalFile: false,
|
||||
serverKey: ''
|
||||
})
|
||||
|
||||
const languageList = i18nManager.languageList.map(item => ({
|
||||
@@ -1848,6 +1859,7 @@ async function initData () {
|
||||
form.yourlsDomain = settings.yourlsDomain || ''
|
||||
form.yourlsSignature = settings.yourlsSignature || ''
|
||||
form.deleteLocalFile = settings.deleteLocalFile || false
|
||||
form.serverKey = settings.serverKey || ''
|
||||
currentLanguage.value = settings.language ?? 'zh-CN'
|
||||
currentStartMode.value = settings.startMode || 'quiet'
|
||||
customLink.value = settings.customLink || ''
|
||||
@@ -2100,6 +2112,10 @@ function cancelCheckVersion () {
|
||||
checkUpdateVisible.value = false
|
||||
}
|
||||
|
||||
function handleServerKeyChange (val: string) {
|
||||
saveConfig('settings.serverKey', val)
|
||||
}
|
||||
|
||||
function handleUploadNotification (val: ICheckBoxValueType) {
|
||||
saveConfig({
|
||||
'settings.uploadNotification': val
|
||||
|
||||
Reference in New Issue
Block a user