Skip to content

Commit

Permalink
v1.4.1 - 增加“显示文件已移动或删除“的功能 (仅限使用本地RPC时)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Sep 26, 2018
1 parent 2b71d5d commit 08019aa
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/OutApp
/dist
node_modules
node_modules
todo.md
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

> 一个 Aria2 图形界面客户端
[![构建状态](https://dev.azure.com/xmader/aria-ng-gui/_apis/build/status/aria-ng-gui-darwin)](https://dev.azure.com/xmader/aria-ng-gui/_build/latest?definitionId=1)

![](https://aria-ng.xmader.com/Screenshot1.png)

## 特性
Expand All @@ -28,6 +30,8 @@

> An Aria2 GUI for Windows & Linux & MacOS
[![Build Status](https://dev.azure.com/xmader/aria-ng-gui/_apis/build/status/aria-ng-gui-darwin)](https://dev.azure.com/xmader/aria-ng-gui/_build/latest?definitionId=1)

![](https://aria-ng.xmader.com/en/Screenshot1.png)

## Features
Expand Down
5 changes: 3 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ const isDev = process.argv.pop() == "dev";
// 增加右键菜单
const contextMenuTemplate = [
{ label: "撤销", role: 'undo', accelerator: "CmdOrCtrl+Z" },
{ label: "重做", role: 'redo', accelerator: "CmdOrCtrl+Y" },
{ label: "恢复", role: 'redo', accelerator: "CmdOrCtrl+Y" },
{ type: 'separator' }, //分隔线
{ label: "剪切", role: 'cut', accelerator: "CmdOrCtrl+X" }, //Cut菜单项
{ label: "复制", role: 'copy', accelerator: "CmdOrCtrl+C" }, //Copy菜单项
{ label: "粘贴", role: 'paste', accelerator: "CmdOrCtrl+V" }, //Paste菜单项
{ label: "删除", role: 'delete', accelerator: "Delete" }, //Delete菜单项
{ type: 'separator' }, //分隔线
{ label: "全选", role: 'selectall', accelerator: "CmdOrCtrl+A" }, //Select All菜单项
];
Expand All @@ -45,6 +44,8 @@ if (isDev) {
const contextMenu = Menu.buildFromTemplate(contextMenuTemplate);


app.commandLine.appendSwitch('ignore-certificate-errors') // 忽略证书相关错误, 适用于使用自签名证书将Aria2的RPC配置成HTTPS协议的情况

app.on('window-all-closed', function () {
app.quit();
});
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ariang-gui",
"version": "1.4.0",
"version": "1.4.1",
"private": true,
"description": "AriaNg GUI",
"main": "app.js",
Expand Down
2 changes: 1 addition & 1 deletion app/pages/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/pages/index.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ css/aria-ng-c609d5bccb.min.css
css/bootstrap-3.3.7.min.css
css/plugins-acd93e5a25.min.css
js/angular-packages-1.6.10.min.js
js/aria-ng-f649286704.min.js
js/aria-ng-462d1fa281.min.js
js/bootstrap-3.3.7.min.js
js/echarts-common-3.8.5.min.js
js/jquery-3.3.1.min.js
Expand All @@ -20,4 +20,4 @@ NETWORK:
SETTINGS:
prefer-online

# hash: ac0bff2b1a093c112d2f2c9d44672a92f805d4723c002d5ca832f5bbc4568f97
# hash: 2e9ae3a8fff221856ba6a6ca244611e03e567f29223e7870b222db593d126bb0
12 changes: 12 additions & 0 deletions app/pages/js/aria-ng-462d1fa281.min.js

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions app/pages/js/aria-ng-f649286704.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions app/pages/langs/zh_Hans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ Tap to configure and get started with AriaNg.=您还没有进行过设置, 点
Cannot initialize WebSocket!=无法初始化 WebSocket!
Access Denied!=拒绝访问!
You cannot use AriaNg because this browser does not support data storage.=您无法使用 AriaNg, 您的浏览器不支持数据存储.
Show the file in a file manager=在文件管理器中显示文件

[error]
unknown=未知错误.
Expand Down Expand Up @@ -259,6 +260,7 @@ option.bad=设置错误.
server.overload=远程服务器繁忙, 无法处理当前请求.
rpc.request.parse.failed=处理 RPC 请求失败.
checksum.failed=文件校验失败.
file.deleted=文件已被移动或删除

[format]
longdate=YYYY年MM月DD日 HH:mm:ss
Expand Down
2 changes: 2 additions & 0 deletions app/pages/langs/zh_Hant.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ Tap to configure and get started with AriaNg.=您還沒有進行過設定, 點
Cannot initialize WebSocket!=無法初始化 WebSocket!
Access Denied!=拒絕訪問!
You cannot use AriaNg because this browser does not support data storage.=您無法使用 AriaNg, 您的瀏覽器不支援資料儲存.
Show the file in a file manager=在檔案管理器中顯示檔案

[error]
unknown=不詳錯誤.
Expand Down Expand Up @@ -259,6 +260,7 @@ option.bad=設定錯誤.
server.overload=遠端伺服器繁忙, 無法處理目前要求.
rpc.request.parse.failed=處理 RPC 要求失敗.
checksum.failed=檔案校驗失敗.
file.deleted=檔案已被移動或刪除

[format]
longdate=YYYY年MM月DD日 HH:mm:ss
Expand Down
10 changes: 8 additions & 2 deletions app/pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*
*/

const fs = require("fs")
const { resolve } = require("path")
const { ipcRenderer, shell, remote: { app } } = require('electron');
const check_update = require('./check_update.js')

Expand All @@ -30,20 +32,24 @@ check_update()

// 打开下载路径
const open_download_dir = (dir) => {
shell.openItem(dir)
shell.openItem(resolve(dir))
shell.beep()
}

window.open_download_dir = open_download_dir

// 在文件管理器中显示文件
const show_file = (path) => {
shell.showItemInFolder(path)
shell.showItemInFolder(resolve(path))
shell.beep()
}

window.show_file = show_file

// 检测文件或目录是否已被移动或删除
const file_exists = (path) => fs.existsSync(path)
window.file_exists = file_exists

// 显示AriaNg GUI的版本号
window.onload = () => {
const version = app.getVersion()
Expand Down

0 comments on commit 08019aa

Please sign in to comment.