添加静态资源,删除无用代码

This commit is contained in:
Aicirou 2020-05-22 01:53:30 +08:00
parent 9732f3323d
commit fd7dcda433
9 changed files with 18 additions and 163 deletions

View File

@ -1,12 +1,11 @@
// =======Options START=======
var authConfig = { var authConfig = {
siteName: "Achirou's Cloud", // 网站名称 siteName: "GoIndex-theme-acrou", // 网站名称
version: "1.1.0", // 程序版本 version: "1.1.0", // 程序版本
theme: "acrou", theme: "acrou",
/*"client_id": "202264815644.apps.googleusercontent.com",
"client_secret": "X4Z3ca8xfWDb1Voo-F9a7ZxJ",*/
// 强烈推荐使用自己的 client_id 和 client_secret // 强烈推荐使用自己的 client_id 和 client_secret
client_id: "", client_id: "202264815644.apps.googleusercontent.com",
client_secret: "", client_secret: "X4Z3ca8xfWDb1Voo-F9a7ZxJ",
refresh_token: "", // 授权 token refresh_token: "", // 授权 token
/** /**
* 设置要显示的多个云端硬盘按格式添加多个 * 设置要显示的多个云端硬盘按格式添加多个
@ -62,20 +61,31 @@ var authConfig = {
* 如果在全局认证的基础上仍需要给某些目录单独进行 .password 文件内的密码验证的话将此选项设置为 true; * 如果在全局认证的基础上仍需要给某些目录单独进行 .password 文件内的密码验证的话将此选项设置为 true;
* 注意如果开启了 .password 文件密码验证每次列目录都会额外增加查询目录内 .password 文件是否存在的开销 * 注意如果开启了 .password 文件密码验证每次列目录都会额外增加查询目录内 .password 文件是否存在的开销
*/ */
enable_password_file_verify: true, enable_password_file_verify: false,
}; };
var themeOptions = { var themeOptions = {
//可选默认系统语言:en/zh-chs/zh-cht //可选默认系统语言:en/zh-chs/zh-cht
languages: "en", languages: "en",
render: { render: {
/**
* 是否渲染HEAD.md文件
* Render HEAD.md file
*/
head_md: false, head_md: false,
/**
* 是否渲染README.md文件
* Render README.md file
*/
readme_md: false, readme_md: false,
// 是否显示文件/文件夹描述(默认不显示) /**
// Show file/folder description or not (not shown by default) * 是否渲染文件/文件夹描述
* Render file/folder description or not
*/
desc: false desc: false
}, },
}; };
// =======Options END=======
/** /**
* global functions * global functions

View File

@ -1,17 +0,0 @@
server {
listen 8082;
server_name localhost;
root /Users/momik/Documents/MyWork/OpenSource/go2index-theme-acrou/dist;
# location /0: {
# proxy_pass http://ossdev.achirou.workers.dev;
# }
location =/index.html{
index index.html;
}
location ?!(.*\.js|css) {
try_files '' /index.html;
}
}

BIN
public/images/airplane.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 KiB

BIN
public/images/eyes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
public/images/no-data.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -1,93 +0,0 @@
var ace = require('brace');
module.exports = {
render: function (h) {
var height = this.height ? this.px(this.height) : '100%'
var width = this.width ? this.px(this.width) : '100%'
return h('div',{
attrs: {
style: "height: " + height + '; width: ' + width,
}
})
},
props:{
value:String,
lang:true,
theme:String,
height:true,
width:true,
options:Object
},
data: function () {
return {
editor:null,
contentBackup:""
}
},
methods: {
px:function (n) {
if( /^\d*$/.test(n) ){
return n+"px";
}
return n;
}
},
watch:{
value:function (val) {
if(this.contentBackup !== val){
this.editor.session.setValue(val,1);
this.contentBackup = val;
}
},
theme:function (newTheme) {
this.editor.setTheme('ace/theme/'+newTheme);
},
lang:function (newLang) {
this.editor.getSession().setMode(typeof newLang === 'string' ? ( 'ace/mode/' + newLang ) : newLang);
},
options:function(newOption){
this.editor.setOptions(newOption);
},
height:function(){
this.$nextTick(function(){
this.editor.resize()
})
},
width:function(){
this.$nextTick(function(){
this.editor.resize()
})
}
},
beforeDestroy: function() {
this.editor.destroy();
this.editor.container.remove();
},
mounted: function () {
var vm = this;
var lang = this.lang||'text';
var theme = this.theme||'chrome';
require('brace/ext/emmet');
var editor = vm.editor = ace.edit(this.$el);
editor.$blockScrolling = Infinity;
this.$emit('init',editor);
//editor.setOption("enableEmmet", true);
editor.getSession().setMode(typeof lang === 'string' ? ( 'ace/mode/' + lang ) : lang);
editor.setTheme('ace/theme/'+theme);
if(this.value)
editor.setValue(this.value,1);
this.contentBackup = this.value;
editor.on('change',function () {
var content = editor.getValue();
vm.$emit('input',content);
vm.contentBackup = content;
});
if(vm.options)
editor.setOptions(vm.options);
}
}

View File

@ -1,29 +0,0 @@
class BuildAppJSPlugin {
apply(compiler) {
// emit 是异步 hook使用 tapAsync 触及它,还可以使用 tapPromise/tap(同步)
compiler.hooks.emit.tapAsync("BuildAppJSPlugin", (compilation, callback) => {
// 在生成文件中,创建一个头部字符串:
var filelist = "In this build:\n\n";
// 遍历所有编译过的资源文件,
// 对于每个文件名称,都添加一行内容。
for (var filename in compilation.assets) {
filelist += "- " + filename + "\n";
}
// 将这个列表作为一个新的文件资源,插入到 webpack 构建中:
compilation.assets["filelist.md"] = {
source: function() {
return filelist;
},
size: function() {
return filelist.length;
},
};
callback();
});
}
}
module.exports = BuildAppJSPlugin;

View File

@ -1,16 +0,0 @@
import { Notification } from 'element-ui';
export default function check() {
let g2index_verison = window.gdconfig.g2index_verison;
if (!g2index_verison || process.env.G2INDEX_VERSION !== g2index_verison) {
Notification.success({
title: "通知",
dangerouslyUseHTMLString: true,
message: `
检测到有新版本<a href="https://github.com/Aicirou/goindex-theme-acrou">前往GitHub</a></br>
New version detected, <a href="https://github.com/Aicirou/goindex-theme-acrou">Go to GitHub</a>
`,
duration: 0
});
}
}