diff --git a/frontend/src/App.vue b/frontend/src/App.vue index f7e2a39..7798064 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -9,7 +9,8 @@ import {configModel} from "@/model.ts"; import Config = config.Config; // const serverUrl = ref('') -const token = ref('') +const hasVideoToken = ref('') +const noVideoToken = ref('') const checkDir = ref('') const concurrentFiles = ref(1) const uploadThreads = ref(1) @@ -71,8 +72,8 @@ const startRun = () => { // ElMessage.warning('请输入服务器地址') // return // } - if (!token.value) { - ElMessage.error('请输入Token') + if (!hasVideoToken.value || !noVideoToken.value) { + ElMessage.error('请输入两个上传 Token') return } if (!checkDir.value) { @@ -105,8 +106,11 @@ const clearLog = () => { // const writeServerUrl =() => { // WriteConfig("url", serverUrl.value) // } -const writeToken = () => { - WriteConfig(configModel.Token, token.value) +const writeHasVideoToken = () => { + WriteConfig(configModel.HasVideoToken, hasVideoToken.value) +} +const writeNoVideoToken = () => { + WriteConfig(configModel.NoVideoToken, noVideoToken.value) } const writeCheckDir = () => { WriteConfig(configModel.CheckDir, checkDir.value) @@ -125,7 +129,8 @@ const writeUploadThreads = () => { try { GetConfig().then((config: Config) => { // serverUrl.value = config.url - token.value = config.token + hasVideoToken.value = config.has_video_token + noVideoToken.value = config.no_video_token checkDir.value = config.check_dir concurrentFiles.value = config.handle_file_count uploadThreads.value = config.thread_count @@ -168,8 +173,15 @@ try {