mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-26 10:40:26 +08:00
✨ Feature: add interval for sync setting
This commit is contained in:
@@ -808,6 +808,15 @@
|
||||
:placeholder="$T('SETTINGS_SYNC_CONFIG_PROXY_PLACEHOLDER')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_SYNC_CONFIG_INTERVAL')"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="sync.interval"
|
||||
:min="10"
|
||||
:step="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button
|
||||
@@ -1252,7 +1261,8 @@ const sync = ref({
|
||||
repo: '',
|
||||
branch: '',
|
||||
token: '',
|
||||
proxy: ''
|
||||
proxy: '',
|
||||
interval: 60
|
||||
})
|
||||
|
||||
const syncType = [
|
||||
@@ -1278,7 +1288,8 @@ async function cancelSyncSetting () {
|
||||
repo: '',
|
||||
branch: '',
|
||||
token: '',
|
||||
proxy: ''
|
||||
proxy: '',
|
||||
interval: 60
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1354,7 +1365,8 @@ async function initData () {
|
||||
repo: '',
|
||||
branch: '',
|
||||
token: '',
|
||||
proxy: ''
|
||||
proxy: '',
|
||||
interval: 60
|
||||
}
|
||||
form.logFileSizeLimit = enforceNumber(settings.logFileSizeLimit) || 10
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
class LS {
|
||||
get (name: string) {
|
||||
if (localStorage.getItem(name)) {
|
||||
return JSON.parse(localStorage.getItem(name) as string)
|
||||
} else {
|
||||
return {}
|
||||
}
|
||||
const item = localStorage.getItem(name) as string
|
||||
return item ? JSON.parse(item) : {}
|
||||
}
|
||||
|
||||
set (name: string, value: any) {
|
||||
|
||||
Reference in New Issue
Block a user