From 0aab140452c70d334df39db18e10aff586864817 Mon Sep 17 00:00:00 2001 From: Aicirou <2643053021@qq.com> Date: Tue, 30 Jun 2020 19:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Add=20language=20cache=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 45 +------------------ public/setting.js | 41 +++++++++++++++++ .../components/header-setting/index.vue | 6 ++- 3 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 public/setting.js diff --git a/public/index.html b/public/index.html index 114c9ce..247a77c 100644 --- a/public/index.html +++ b/public/index.html @@ -12,50 +12,7 @@ <% } %> <%= htmlWebpackPlugin.options.title %> - + <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %> diff --git a/public/setting.js b/public/setting.js new file mode 100644 index 0000000..f393a64 --- /dev/null +++ b/public/setting.js @@ -0,0 +1,41 @@ +var authConfig = { + version: '1.1.1', + roots: [ + { + id: "", + name: "TeamDrive", + pass: "", + }, + { + id: "root", + name: "PriveDrive", + pass: "", + }, + { + id: "", + name: "folder1", + pass: "", + } + ], + }; + var themeOptions = { + // en/zh-chs/zh-cht + languages: 'en', + render: { + head_md: true, + readme_md: true, + // 是否显示文件/文件夹描述(默认不显示) + // Show file/folder description or not (not shown by default) + desc: true, + }, + player: { + api: "", + autoplay: true + } + } + window.gdconfig = JSON.parse(JSON.stringify({ version: authConfig.version, themeOptions: themeOptions })); + window.themeOptions = themeOptions; + window.gds = JSON.parse( + JSON.stringify(authConfig.roots.map((it) => it.name)) + ); + window.current_drive_order = 0; \ No newline at end of file diff --git a/src/layout/header-aside/components/header-setting/index.vue b/src/layout/header-aside/components/header-setting/index.vue index a760da2..58713a8 100644 --- a/src/layout/header-aside/components/header-setting/index.vue +++ b/src/layout/header-aside/components/header-setting/index.vue @@ -15,18 +15,20 @@