From 5a63385d20e52fb0e211866f2deda449b8e7445a Mon Sep 17 00:00:00 2001 From: Xmader Date: Tue, 25 Sep 2018 22:29:39 +0800 Subject: [PATCH] =?UTF-8?q?v1.3.1=20-=20=E6=9B=B4=E6=94=B9=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E4=B8=8A=E7=9A=84=E5=B8=AE=E5=8A=A9=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.js | 12 +- app/check_update.js | 12 ++ app/edit_conf.js | 12 ++ app/package.json | 2 +- app/pages/index.html | 193 ++++++++++++++++++++++++++- app/pages/js/open_download_folder.js | 30 +++++ app/pre.js | 12 ++ 7 files changed, 270 insertions(+), 3 deletions(-) create mode 100644 app/pages/js/open_download_folder.js diff --git a/app/app.js b/app/app.js index 36c432b..7d15190 100644 --- a/app/app.js +++ b/app/app.js @@ -1,3 +1,13 @@ +/*! + * AriaNg GUI + * + * Copyright (c) 2018 Xmader + * Released under the MIT license + * + * Source Code: https://github.com/Xmader/aria-ng-gui + * +*/ + const os = require('os'); const electron = require('electron'); const path = require('path'); @@ -60,7 +70,7 @@ app.on('ready', function () { const aria2_dir = path.join(__dirname, "aria2", platform, aria2_bin) const conf_path = path.join(__dirname, "aria2", "aria2.conf") - edit_conf() // 根据用户的操作系统动态编辑aria2配置文件 + edit_conf() // 根据用户的操作系统动态编辑aria2的配置文件 //打开主程序 fs.chmodSync(aria2_dir, 0o777) diff --git a/app/check_update.js b/app/check_update.js index 6ed20f0..060cee4 100644 --- a/app/check_update.js +++ b/app/check_update.js @@ -1,3 +1,15 @@ +/*! + * AriaNg GUI + * + * Copyright (c) 2018 Xmader + * Released under the MIT license + * + * Source Code: https://github.com/Xmader/aria-ng-gui + * + * check_update.js - 检查更新 + * +*/ + const path = require('path'); const { dialog, shell, app } = require('electron').remote diff --git a/app/edit_conf.js b/app/edit_conf.js index decf087..9fedab1 100644 --- a/app/edit_conf.js +++ b/app/edit_conf.js @@ -1,3 +1,15 @@ +/*! + * AriaNg GUI + * + * Copyright (c) 2018 Xmader + * Released under the MIT license + * + * Source Code: https://github.com/Xmader/aria-ng-gui + * + * edit_conf.js - 根据用户的操作系统动态编辑aria2的配置文件 + * +*/ + const os = require('os'); const fs = require('fs') const path = require('path') diff --git a/app/package.json b/app/package.json index 4bb0ad4..8680838 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "ariang-gui", - "version": "1.3.0", + "version": "1.3.1", "private": true, "description": "AriaNg GUI", "main": "app.js", diff --git a/app/pages/index.html b/app/pages/index.html index a5b0a59..646af95 100644 --- a/app/pages/index.html +++ b/app/pages/index.html @@ -1 +1,192 @@ -AriaNg
\ No newline at end of file + + + + + + + + + + + + + + + + + + AriaNg + + + + + + + + + +
+
+ + +
+ +
+
+
+
+
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/app/pages/js/open_download_folder.js b/app/pages/js/open_download_folder.js new file mode 100644 index 0000000..c4ba2cc --- /dev/null +++ b/app/pages/js/open_download_folder.js @@ -0,0 +1,30 @@ +/*! + * AriaNg GUI + * + * Copyright (c) 2018 Xmader + * Released under the MIT license + * + * Source Code: https://github.com/Xmader/aria-ng-gui + * +*/ + +// 更改工具栏上的帮助按钮的链接 +const toolbars = $(".toolbar") +toolbars[toolbars.length - 1].href = "https://github.com/Xmader/aria-ng-gui" + +const init = () => { + // 判断是否是 已完成/已停止 页面 + const hash = location.hash.split("/")[1]; + if (hash == "stopped") { + + } + else { + + + } +} + +// 检测浏览器是否支持onhashchange事件 +if (("onhashchange" in window) && ((typeof document.documentMode === "undefined") || document.documentMode == 8)) { + window.onhashchange = init; +} diff --git a/app/pre.js b/app/pre.js index c0688a3..1d031c5 100644 --- a/app/pre.js +++ b/app/pre.js @@ -1,3 +1,15 @@ +/*! + * AriaNg GUI + * + * Copyright (c) 2018 Xmader + * Released under the MIT license + * + * Source Code: https://github.com/Xmader/aria-ng-gui + * + * pre.js - 用于内置的AriaNg页面的预加载脚本 + * +*/ + const { ipcRenderer } = require('electron'); const check_update = require('./check_update.js')