调整版本号

This commit is contained in:
Aicirou 2020-05-31 02:03:23 +08:00
parent 8eab534d75
commit bcce066a72
3 changed files with 29 additions and 18 deletions

View File

@ -1,7 +1,7 @@
// =======Options START======= // =======Options START=======
var authConfig = { var authConfig = {
siteName: "GoIndex-theme-acrou", // 网站名称 siteName: "GoIndex-theme-acrou", // 网站名称
version: "1.1.0", // 程序版本 version: "1.1.1", // 程序版本
theme: "acrou", theme: "acrou",
// 强烈推荐使用自己的 client_id 和 client_secret // 强烈推荐使用自己的 client_id 和 client_secret
client_id: "202264815644.apps.googleusercontent.com", client_id: "202264815644.apps.googleusercontent.com",
@ -65,6 +65,9 @@ var authConfig = {
}; };
var themeOptions = { var themeOptions = {
cdn: "https://cdn.jsdelivr.net/gh/Aicirou/goindex-theme-acrou",
// 主题版本号
version: "2.0.5",
//可选默认系统语言:en/zh-chs/zh-cht //可选默认系统语言:en/zh-chs/zh-cht
languages: "en", languages: "en",
render: { render: {
@ -82,7 +85,18 @@ var themeOptions = {
* 是否渲染文件/文件夹描述 * 是否渲染文件/文件夹描述
* Render file/folder description or not * Render file/folder description or not
*/ */
desc: false desc: false,
},
/**
* 播放器选项
* Player options
*/
player: {
/**
* 播放器api不指定则使用浏览器默认播放器
* Player api(Use browser default player if not specified)
*/
api: "https://api.jsonpop.cn/demo/blplyaer/?url=",
}, },
}; };
// =======Options END======= // =======Options END=======
@ -132,7 +146,7 @@ function html(current_drive_order = 0, model = {}) {
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/> <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<title>${authConfig.siteName}</title> <title>${authConfig.siteName}</title>
<style> <style>
@import url(https://cdn.jsdelivr.net/gh/Aicirou/goindex-theme-acrou@master/dist/style.min.css); @import url(${themeOptions.cdn}@${themeOptions.version}/dist/style.min.css);
</style> </style>
<script> <script>
window.gdconfig = JSON.parse('${JSON.stringify({ window.gdconfig = JSON.parse('${JSON.stringify({
@ -149,7 +163,9 @@ function html(current_drive_order = 0, model = {}) {
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="https://cdn.jsdelivr.net/gh/Aicirou/goindex-theme-acrou@master/dist/app.min.js"></script> <script src="${themeOptions.cdn}@${
themeOptions.version
}/dist/app.min.js"></script>
</body> </body>
</html> </html>
`; `;
@ -184,7 +200,7 @@ async function handleRequest(request) {
// 并根据 drive order 获取对应的 gd instance // 并根据 drive order 获取对应的 gd instance
let gd; let gd;
let url = new URL(request.url); let url = new URL(request.url);
let path = url.pathname; let path = decodeURI(url.pathname);
/** /**
* 重定向至起始页 * 重定向至起始页
@ -291,12 +307,7 @@ async function handleRequest(request) {
}) })
); );
} else { } else {
if ( if (path.split("/").pop().toLowerCase() == ".password") {
path
.split("/")
.pop()
.toLowerCase() == ".password"
) {
return basic_auth_res || new Response("", { status: 404 }); return basic_auth_res || new Response("", { status: 404 });
} }
let file = await gd.file(path); let file = await gd.file(path);

View File

@ -1,7 +1,7 @@
{ {
"name": "go2index-theme-acrou", "name": "go2index-theme-acrou",
"version": "2.0.5bate", "version": "2.0.5",
"g2index": "1.1.0", "g2index": "1.1.1",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",

View File

@ -14,7 +14,7 @@ process.env.VUE_APP_G2INDEX_VERSION = require("./package.json").g2index;
process.env.VUE_APP_CDN_PATH = process.env.VUE_APP_CDN_PATH =
process.env.VUE_APP_CDN_PATH.replace( process.env.VUE_APP_CDN_PATH.replace(
"@master", "@master",
"@" + process.env.VUE_APP_VERSION "@v" + process.env.VUE_APP_VERSION
) || "/"; ) || "/";
// 基础路径 注意发布之前要先修改这里 // 基础路径 注意发布之前要先修改这里