├── .gitignore ├── LICENSE.md ├── README.md ├── app ├── css │ ├── antdv1.6.3.css │ ├── assets │ │ ├── logo.svg │ │ ├── pattern.png │ │ └── test.png │ ├── font │ │ ├── deadstar.otf │ │ ├── font_1463992151_360388.eot │ │ ├── font_1463992151_360388.svg │ │ ├── font_1463992151_360388.ttf │ │ ├── font_1463992151_360388.woff │ │ ├── iconfont.css │ │ ├── iconfont.woff │ │ └── ruixian.ttf │ ├── iconfont │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ ├── jeffui.css │ ├── jeffui_test.css │ ├── ruffhelper.css │ ├── ruffhelper_1.css │ └── ruffhelper_test.css ├── icon │ ├── icon.icns │ └── icon.ico ├── index.html ├── index.js ├── index_public.html ├── package.json ├── pages │ └── background │ │ ├── index.html │ │ ├── libs │ │ └── modules │ │ │ ├── egret │ │ │ ├── egret.min.js │ │ │ └── egret.web.min.js │ │ │ ├── game │ │ │ ├── game.min.js │ │ │ └── game.web.min.js │ │ │ ├── res │ │ │ └── res.min.js │ │ │ └── tween │ │ │ └── tween.min.js │ │ ├── main.min.js │ │ └── resource │ │ ├── default.res.json │ │ └── packs0 │ │ ├── preload-0sheet_2b549e82.json │ │ └── preload-0sheet_662dedb5.png ├── public │ ├── app.js │ └── vendors.js └── server │ ├── RapLogServer.js │ ├── package.json │ ├── raplog │ ├── raplog.css │ ├── raplog.html │ ├── raplog.js │ ├── socket.io-1.4.5.js │ └── xiangsu.ttf │ ├── test.js │ └── testing.txt ├── build ├── electronzip │ └── electron的对应版本zip包放这 ├── install │ ├── darwin │ │ ├── dmg.js │ │ └── media │ │ │ ├── background.png │ │ │ └── icon.icns │ └── win32 │ │ ├── inno.js │ │ ├── inno │ │ ├── Compil32.exe │ │ ├── Config.ini │ │ ├── Default.isl │ │ ├── ISCC.exe │ │ ├── ISCmplr.dll │ │ ├── ISCrypt.dll │ │ ├── ISPP.chm │ │ ├── ISPP.dll │ │ ├── ISPPBuiltins.iss │ │ ├── ISetup.chm │ │ ├── IsExtend.chm │ │ ├── Languages │ │ │ ├── BrazilianPortuguese.isl │ │ │ ├── Catalan.isl │ │ │ ├── ChineseSimplified.isl │ │ │ ├── ChineseTrad.isl │ │ │ ├── Corsican.isl │ │ │ ├── Czech.isl │ │ │ ├── Danish.isl │ │ │ ├── Dutch.isl │ │ │ ├── English.isl │ │ │ ├── Finnish.isl │ │ │ ├── French.isl │ │ │ ├── German.isl │ │ │ ├── Greek.isl │ │ │ ├── Hebrew.isl │ │ │ ├── Hungarian.isl │ │ │ ├── Italian.isl │ │ │ ├── Japanese.isl │ │ │ ├── Nepali.islu │ │ │ ├── Norwegian.isl │ │ │ ├── Polish.isl │ │ │ ├── Portuguese.isl │ │ │ ├── Russian.isl │ │ │ ├── ScottishGaelic.isl │ │ │ ├── SerbianCyrillic.isl │ │ │ ├── SerbianLatin.isl │ │ │ ├── Slovenian.isl │ │ │ ├── Spanish.isl │ │ │ ├── Turkish.isl │ │ │ └── Ukrainian.isl │ │ ├── Office2007.bmp │ │ ├── Office2007Gray.bmp │ │ ├── Setup.e32 │ │ ├── SetupLdr.e32 │ │ ├── WizModernImage-Is.bmp │ │ ├── WizModernImage.bmp │ │ ├── WizModernSmallImage-Is.bmp │ │ ├── WizModernSmallImage.bmp │ │ ├── isbunzip.dll │ │ ├── isbzip.dll │ │ ├── isfaq.htm │ │ ├── islzma.dll │ │ ├── islzma32.exe │ │ ├── islzma64.exe │ │ ├── isscint.dll │ │ ├── isunzlib.dll │ │ ├── iszlib.dll │ │ ├── license.txt │ │ ├── unins000.dat │ │ ├── unins000.exe │ │ ├── unins000.msg │ │ └── whatsnew.htm │ │ └── media │ │ ├── WizModernImage.bmp │ │ ├── WizModernSmallImage.bmp │ │ ├── signtool.exe │ │ ├── win32.iss │ │ └── win64.iss ├── prerelease │ └── 预发布文件夹 └── release │ └── 发布版本文件夹 ├── doc ├── ReleaseNotes.MD ├── RuffLink.MD ├── pic.png ├── publish.MD ├── version │ ├── v0.3.0.png │ ├── v0.4.0.png │ ├── v0.5.0.png │ └── v1.5.0.png ├── 发布流程说明.txt ├── 工作日志.txt ├── 说明.txt └── 遇到的一些问题.MD ├── gulpfile.js ├── index.js ├── npm-debug.log ├── package.json ├── pages └── background │ ├── .wing │ ├── launch.json │ └── tasks.json │ ├── bin-debug │ ├── Main.js │ └── Star.js │ ├── egretProperties.json │ ├── index.html │ ├── libs │ └── modules │ │ ├── egret │ │ ├── egret.d.ts │ │ ├── egret.js │ │ ├── egret.min.js │ │ ├── egret.native.js │ │ ├── egret.native.min.js │ │ ├── egret.web.js │ │ └── egret.web.min.js │ │ ├── game │ │ ├── game.d.ts │ │ ├── game.js │ │ ├── game.min.js │ │ ├── game.native.js │ │ ├── game.native.min.js │ │ ├── game.web.js │ │ └── game.web.min.js │ │ ├── res │ │ ├── res.d.ts │ │ ├── res.js │ │ └── res.min.js │ │ └── tween │ │ ├── tween.d.ts │ │ ├── tween.js │ │ └── tween.min.js │ ├── resource │ ├── assets │ │ ├── bg.png │ │ ├── c1-1.png │ │ ├── c1-2.png │ │ ├── c2.png │ │ ├── c3.png │ │ ├── c4.png │ │ ├── c5-1.png │ │ ├── c5-2.png │ │ ├── c5-3.png │ │ ├── c5-4.png │ │ ├── c6-1.png │ │ ├── c6-2.png │ │ ├── c6-3.png │ │ └── star.png │ └── default.res.json │ ├── src │ ├── Main.ts │ └── Star.ts │ ├── template │ └── runtime │ │ ├── native_loader.js │ │ ├── native_require.js │ │ └── runtime_loader.js │ ├── tsconfig.json │ └── wingProperties.json ├── psd ├── background.psd ├── cankao │ ├── css颜色表.gif │ └── ui.gif ├── clear │ ├── demo │ │ ├── main.js │ │ ├── question.js │ │ └── work.js │ └── demo1 │ │ ├── clear1.js │ │ ├── cluster-logger.js │ │ ├── data.txt │ │ ├── exec.js │ │ ├── exec2.js │ │ ├── execfile.js │ │ ├── fork.js │ │ ├── fork2.js │ │ ├── forkrap.js │ │ ├── listen1.js │ │ ├── listen2.js │ │ ├── listen3.js │ │ ├── package.json │ │ ├── spawn.js │ │ └── spawn2.js ├── css.css ├── icon_128.psd ├── icon_256.psd ├── icon_48.psd ├── icon_64.psd ├── newui.sketch ├── t1.js ├── test1.sketch ├── test1 │ └── index.html ├── ui2.psd └── 配色.txt ├── script ├── remove-use-strict.js ├── webpack.config.js ├── webpack.config_not_hot_loader.js └── webpack.production.config.js └── src ├── Main.jsx ├── Router.jsx ├── actions ├── AppActions.jsx └── AppActions_1.jsx ├── component ├── Alerts.jsx ├── LeftArea.jsx ├── Loading.jsx ├── MainShell.jsx ├── RightArea.jsx ├── Template.jsx ├── TestUI.jsx ├── _alerts │ ├── InputPanel.jsx │ ├── SDKSelecter.jsx │ ├── SaveLog.jsx │ ├── Selecter.jsx │ ├── SystemUpgrade.jsx │ └── WifiPanel.jsx ├── _left │ ├── NewProject.jsx │ ├── OpenProject.jsx │ ├── RapCommand.jsx │ ├── RuffSDK.jsx │ └── cp │ │ └── LocationSelector.jsx ├── _rights │ ├── CommandsArea.jsx │ ├── ExtraButton.jsx │ ├── ExtraQrCode.jsx │ └── LogsArea.jsx ├── _test │ └── Test1.jsx ├── alerts │ └── SaveLog.jsx ├── backup │ ├── Alerts_1.jsx │ ├── LeftArea_1.jsx │ ├── Loading_1.jsx │ ├── RightArea_1.jsx │ └── TestUI_1.jsx ├── left │ ├── C1_RapCommand.jsx │ ├── C2_OpenProject.jsx │ ├── C3_NewProject.jsx │ ├── LeftContainer.jsx │ └── openproject │ │ └── Item.jsx ├── right │ ├── ExtraButton.jsx │ ├── InfoArea.jsx │ └── LogContent.jsx └── ui │ ├── Button.jsx │ ├── FolderSelector.jsx │ ├── Input.jsx │ └── ToggleSwitch.jsx ├── config.js ├── lib ├── FileUtil.js ├── RapCommand.js ├── Utils.js ├── _Commands.js ├── locales │ ├── en_US.js │ └── zh_CN.js └── ~Files.js └── reducers ├── Reducers.jsx └── Reducers_1.jsx /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .idea/ 3 | .rap/ 4 | .wing/ 5 | test/ 6 | build/electronzip/ 7 | ~/ 8 | config/ 9 | pages/background/.wing 10 | pages/background/bin-debug 11 | pages/background/bin-release 12 | pages/background/wingProperties.json 13 | pages/background/libs -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015, ZhangYu. 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, 9 | this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the ZhangYu nor 12 | the names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY ZHANGYU AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZHANGYU AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #RuffHelper 2 | 一个 Ruff 开发辅助工具,把常用的 rap 命令可视化操作。 3 | 使用 React + Electron 框架,webpack 编译。 4 | 5 | [Ruff -- 用 js 开发智能硬件](https://ruff.io/zh-cn/) 6 | 7 |  8 | ###[发布日志 v1.5.0](doc/ReleaseNotes.MD) 9 | 10 | ###原理 11 | 工作原理很简单,就是使用 node 子进程调用 rap 的命令,然后把返回的消息显示出来。 12 | 13 | 14 | 15 | ###注意 16 | master 分支为开发调试版本,我在重构代码,重新制作动态UI。如果需要稳定的版本,请使用1.5.0的Tag 17 | 18 | ###调试开发流程 19 | 1. **npm install** 安装各种包,有的需要翻墙,可以使用 [cnpm](https://npm.taobao.org/) 20 | 2. **npm install electron@1.5.0 -g** 全局安装 electron 21 | 3. **npm run dev** 启动 webpack,自动编译 react 22 | 4. **npm run start** 启动 electron 23 | 5. happy coding 24 | 25 | ###[发布流程](doc/publish.MD) 26 | 27 | 28 | ###发布版本地址 29 | [git最大附件25M,只能放百度网盘了](http://pan.baidu.com/s/1kVRI98b#path=%252Fruffhelper) 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/css/assets/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/assets/pattern.png -------------------------------------------------------------------------------- /app/css/assets/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/assets/test.png -------------------------------------------------------------------------------- /app/css/font/deadstar.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/font/deadstar.otf -------------------------------------------------------------------------------- /app/css/font/font_1463992151_360388.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/font/font_1463992151_360388.eot -------------------------------------------------------------------------------- /app/css/font/font_1463992151_360388.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/font/font_1463992151_360388.ttf -------------------------------------------------------------------------------- /app/css/font/font_1463992151_360388.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/font/font_1463992151_360388.woff -------------------------------------------------------------------------------- /app/css/font/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.eot?t=1485683275103'); /* IE9*/ 4 | src: url('iconfont.eot?t=1485683275103#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('iconfont.woff?t=1485683275103') format('woff'), /* chrome, firefox */ 6 | url('iconfont.ttf?t=1485683275103') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1485683275103#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:12px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-delete:before { content: "\e605";font-size: 14px; } 19 | 20 | .icon-ellipsis:before { content: "\e8e5"; } 21 | 22 | .icon-save:before { content: "\e651"; } 23 | 24 | .icon-folder:before { content: "\e604"; } 25 | 26 | -------------------------------------------------------------------------------- /app/css/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/font/iconfont.woff -------------------------------------------------------------------------------- /app/css/font/ruixian.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/font/ruixian.ttf -------------------------------------------------------------------------------- /app/css/iconfont/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('iconfont.woff?t=1485338156711') format('woff') /* chrome, firefox */ 4 | } 5 | 6 | .iconfont { 7 | font-family:"iconfont" !important; 8 | font-size:16px; 9 | font-style:normal; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | 14 | .icon-ellipsis:before { content: "\e8e5"; } 15 | 16 | .icon-folder:before { content: "\e604"; } 17 | 18 | -------------------------------------------------------------------------------- /app/css/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/iconfont/iconfont.eot -------------------------------------------------------------------------------- /app/css/iconfont/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 46 | -------------------------------------------------------------------------------- /app/css/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /app/css/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/css/iconfont/iconfont.woff -------------------------------------------------------------------------------- /app/css/jeffui.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'ruixian'; 3 | src: url('font/ruixian.ttf') format('truetype'); 4 | } 5 | 6 | .JUI { 7 | font-family: ruixian; 8 | font-size: 12px; 9 | color: #5EFDFF; 10 | border-radius: 2px; 11 | border: 1px solid rgba(76, 193, 253, 0.6); 12 | background: rgba(76, 193, 253, 0.3); 13 | width: 100%; 14 | } 15 | 16 | .JInput { 17 | padding: 3px 4px 3px 4px; 18 | } 19 | 20 | input::-webkit-input-placeholder { 21 | color: rgba(94, 253, 255, 0.6) !important; 22 | } 23 | 24 | .JButton { 25 | cursor: pointer; 26 | text-align: center; 27 | display: flex; 28 | } 29 | 30 | .JButton:hover { 31 | background: rgba(76, 193, 253, 0.6); 32 | } 33 | 34 | .JButton:active { 35 | background: rgba(76, 193, 253, 1); 36 | } 37 | 38 | .JButton:disabled { 39 | color: rgba(94, 253, 255, 0.4); 40 | background: rgba(76, 193, 253, 0.1); 41 | } 42 | 43 | .JButton:focus { 44 | outline: none; 45 | } 46 | .JToggleSwitch{ 47 | text-align: center; 48 | font-weight: lighter; 49 | color: rgba(94, 253, 255, 0.8); 50 | } 51 | .JToggleSwitch .on{ 52 | background: rgba(76, 193, 253, 0.5); 53 | } 54 | .JToggleSwitch .off{ 55 | background: rgba(76, 193, 253, 0.3); 56 | } 57 | .JToggleSwitch:hover{ 58 | background: rgba(76, 193, 253, 0.6); 59 | } 60 | 61 | /*.JSelector{!*文件夹选择器*!*/ 62 | /*text-align: center;*/ 63 | /*}*/ 64 | /*.JSelector:hover{*/ 65 | /*background: rgba(76, 193, 253, 0.6);*/ 66 | /*}*/ -------------------------------------------------------------------------------- /app/css/jeffui_test.css: -------------------------------------------------------------------------------- 1 | .JUI { 2 | font-size: 12px; 3 | /*color: #5EFDFF;*/ 4 | border-radius: 2px; 5 | border: 1px solid rgba(76, 193, 253, 0.6); 6 | /*background: rgba(76, 193, 253, 0.3);*/ 7 | width: 100%; 8 | } 9 | 10 | .JInput { 11 | padding: 0 4px 0 4px; 12 | } 13 | 14 | .JButton { 15 | cursor: pointer; 16 | } 17 | 18 | .JButton:hover { 19 | background: rgba(76, 193, 253, 0.6); 20 | } 21 | 22 | .JButton:disabled { 23 | color: gray; 24 | /*background: gray;*/ 25 | /*color: rgba(94, 253, 255, 0.4);*/ 26 | /*background: rgba(76, 193, 253, 0.1);*/ 27 | background: rgba(0, 0, 0, 0.1); 28 | } 29 | 30 | .JButton:focus { 31 | outline: none; 32 | } 33 | 34 | .JSelector{/*文件夹选择器*/ 35 | text-align: center; 36 | } 37 | .JSelector:hover{ 38 | background: rgba(76, 193, 253, 0.6); 39 | } -------------------------------------------------------------------------------- /app/icon/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/icon/icon.icns -------------------------------------------------------------------------------- /app/icon/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/runinspring/ruffhelper/781d3f3330cbd434d5ba7c676836d703ace5b685/app/icon/icon.ico -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron'); 2 | const Menu = electron.Menu; 3 | const MenuItem = electron.MenuItem; 4 | const {app} = electron; // Module to control application life. 5 | const {BrowserWindow} = electron; // Module to create native browser window. 6 | var mainWindow = null; 7 | // var appIcon = null; 8 | // Quit when all windows are closed. 9 | app.on('window-all-closed', function () { 10 | // On OS X it is common for applications and their menu bar 11 | // to stay active until the user quits explicitly with Cmd + Q 12 | app.quit(); 13 | // if (process.platform != 'darwin') { 14 | // 15 | // } 16 | }); 17 | 18 | // var version = '0.1.0' 19 | // This method will be called when Electron has finished 20 | // initialization and is ready to create browser windows. 21 | app.on('ready', function () { 22 | // Create the browser window. 23 | //center 在屏幕中间显示 resizable 不可以调整大小 24 | //icon dock 区域显示的图标 25 | //appIcon = new Tray('./assets/images/icon.png'); 26 | //console.log(appIcon) 27 | //mainWindow = new BrowserWindow({width: 730, height: 530, 28 | var version = app.getVersion() 29 | mainWindow = new BrowserWindow({ 30 | width: 730, height: 530, 31 | title: "RuffHelper " + version, 32 | center: true, resizable: false, useContentSize: true 33 | }); 34 | //cosnole.log(123,Menu) 35 | var menu = new Menu(); 36 | menu.append(new MenuItem({ 37 | role: 'window', 38 | label: 'RuffHelper', 39 | submenu: [ 40 | {label: 'Copy',accelerator: 'CmdOrCtrl+C',role: 'copy'}, 41 | {label: 'Cut',accelerator: 'CmdOrCtrl+X',role: 'cut'}, 42 | {label: 'Paste',accelerator: 'CmdOrCtrl+V',role: 'paste'}, 43 | {label: 'Select All',accelerator: 'CmdOrCtrl+A',role: 'selectall'}, 44 | {label: 'Undo',accelerator: 'CmdOrCtrl+Z',role: 'undo'}, 45 | {label: 'Redo',accelerator: 'Shift+CmdOrCtrl+Z',role: 'redo'}, 46 | {type: 'separator'}, 47 | {label: 'author: coolgods@sina.com'}, 48 | {type: 'separator'}, 49 | ] 50 | })) 51 | if (process.platform == 'darwin') {//mac 平台替换菜单 52 | Menu.setApplicationMenu(menu); 53 | } 54 | 55 | mainWindow.on('page-title-updated', function (event) { 56 | //阻止替换标题 57 | event.preventDefault(); 58 | }) 59 | // 60 | //mainWindow.setRepresentedFilename('./assets/images/icon.png') 61 | //appIcon.setToolTip('This is my application.'); 62 | //console.log(1231,mainWindow.id) 63 | // and load the index.html of the app. 64 | //从指定位置加载 65 | mainWindow.loadURL('file://' + __dirname + '/index_public.html'); 66 | // mainWindow.title = "RuffHelper "+version; 67 | //var appIcon = new Tray('/assets/images/icon.png'); 68 | //从服务器位置加载 69 | // mainWindow.loadURL("http://localhost:8080"); 70 | //window.onresize = function(){ 71 | // var wid = document.documentElement.clientWidth; 72 | // var hei = document.documentElement.clientHeight; 73 | // console.log(wid,hei); 74 | //} 75 | // Open the DevTools. 76 | // mainWindow.openDevTools();//调试面板 77 | //mainWindow.setMenu(null);//清除菜单 78 | //mainWindow.setMenuBarVisibility(false);//隐藏顶部的选项条 79 | mainWindow.setContentSize(730, 530);//重新设置窗口大小 80 | 81 | // Emitted when the window is closed. 82 | mainWindow.on('closed', function () { 83 | // Dereference the window object, usually you would store windows 84 | // in an array if your app supports multi windows, this is the time 85 | // when you should delete the corresponding element. 86 | mainWindow = null; 87 | }); 88 | 89 | //mainWindow.on('resize', function() { 90 | // // Dereference the window object, usually you would store windows 91 | // // in an array if your app supports multi windows, this is the time 92 | // // when you should delete the corresponding element. 93 | // console.log(1212,app.getAppPath()) 94 | //}); 95 | 96 | }); 97 | -------------------------------------------------------------------------------- /app/index_public.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ruffhelper", 3 | "version": "1.5.0", 4 | "description": "", 5 | "main": "index.js" 6 | } 7 | -------------------------------------------------------------------------------- /app/pages/background/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |{ 65 | e.preventDefault(); 66 | e.stopPropagation(); 67 | command(REMOVE_RUFF_PROJECT, {path: item.path}) 68 | addLog(tr(211, item.name), COLOR_GREEN); 69 | }}>X
70 | {`+ ${cutCharByLength(item.name, 16)}`} 71 |