├── static ├── .gitkeep ├── rocket.png ├── plugins │ ├── superPanel │ │ ├── assets │ │ │ ├── link.png │ │ │ ├── logo.png │ │ │ ├── new.png │ │ │ └── terminal.png │ │ ├── index.html │ │ └── index.js │ ├── picker │ │ ├── picker.js │ │ ├── picker.css │ │ └── index.html │ ├── tpl │ │ ├── doc.js │ │ ├── index.js │ │ ├── list.js │ │ └── index.html │ └── vue-router.min.js ├── utils.js └── preload.js ├── src ├── renderer │ ├── assets │ │ ├── .gitkeep │ │ ├── logo.png │ │ ├── imgs │ │ │ ├── help.png │ │ │ ├── lock.png │ │ │ ├── picker.png │ │ │ └── screenshot.png │ │ ├── api │ │ │ ├── config.js │ │ │ ├── index.js │ │ │ ├── list │ │ │ │ ├── banner.js │ │ │ │ └── plugin.js │ │ │ └── request.js │ │ ├── common │ │ │ ├── system.js │ │ │ ├── constans.js │ │ │ └── utils.js │ │ └── keycode.js │ ├── store │ │ ├── index.js │ │ └── modules │ │ │ ├── index.js │ │ │ ├── dev.js │ │ │ └── main.js │ ├── router │ │ └── index.js │ ├── main.js │ ├── pages │ │ ├── index │ │ │ └── index.vue │ │ ├── search │ │ │ ├── index.vue │ │ │ └── subpages │ │ │ │ ├── plugin.vue │ │ │ │ ├── market.vue │ │ │ │ ├── dev.vue │ │ │ │ └── settings.vue │ │ └── plugins │ │ │ └── index.vue │ └── App.vue ├── main │ ├── browsers │ │ ├── index.js │ │ ├── picker.js │ │ ├── separate.js │ │ ├── main.js │ │ └── superPanel.js │ ├── common │ │ ├── common.js │ │ ├── autoUpdate.js │ │ ├── config.js │ │ ├── utils.js │ │ ├── api.js │ │ └── listener.js │ ├── index.dev.js │ ├── index.js │ └── tray.js └── index.ejs ├── .gitignore ├── .github └── ISSUE_TEMPLATE │ ├── development-problem.md │ ├── feature_request.md │ └── bug-report.md ├── appveyor.yml ├── .babelrc ├── .travis.yml ├── LICENSE ├── .electron-vue ├── dev-client.js ├── webpack.main.config.js ├── build.js ├── webpack.web.config.js ├── dev-runner.js └── webpack.renderer.config.js ├── README.md └── package.json /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/static/rocket.png -------------------------------------------------------------------------------- /src/renderer/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/src/renderer/assets/logo.png -------------------------------------------------------------------------------- /src/renderer/assets/imgs/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/src/renderer/assets/imgs/help.png -------------------------------------------------------------------------------- /src/renderer/assets/imgs/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/src/renderer/assets/imgs/lock.png -------------------------------------------------------------------------------- /src/renderer/assets/imgs/picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/src/renderer/assets/imgs/picker.png -------------------------------------------------------------------------------- /src/renderer/assets/imgs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/src/renderer/assets/imgs/screenshot.png -------------------------------------------------------------------------------- /static/plugins/superPanel/assets/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/static/plugins/superPanel/assets/link.png -------------------------------------------------------------------------------- /static/plugins/superPanel/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/static/plugins/superPanel/assets/logo.png -------------------------------------------------------------------------------- /static/plugins/superPanel/assets/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/static/plugins/superPanel/assets/new.png -------------------------------------------------------------------------------- /static/plugins/superPanel/assets/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangrongding/dtools/HEAD/static/plugins/superPanel/assets/terminal.png -------------------------------------------------------------------------------- /src/renderer/assets/api/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | development: 'http://118.195.176.247:8080', 3 | production: 'http://118.195.176.247:8080', 4 | }; 5 | -------------------------------------------------------------------------------- /src/renderer/assets/api/index.js: -------------------------------------------------------------------------------- 1 | import plugin from './list/plugin'; 2 | import banner from './list/banner'; 3 | 4 | export default { 5 | plugin, 6 | banner 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | dist/electron/* 3 | dist/web/* 4 | build/ 5 | !build/icons 6 | node_modules/ 7 | npm-debug.log 8 | npm-debug.log.* 9 | thumbs.db 10 | !.gitkeep 11 | .idea 12 | dist/ 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/development-problem.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Development Problem 3 | about: 任何开发建议、使用问题、交流学习都可以 4 | title: '' 5 | labels: help wanted 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## 任何开发建议、交流学习都可以 11 | -------------------------------------------------------------------------------- /src/main/browsers/index.js: -------------------------------------------------------------------------------- 1 | module.exports = () => ({ 2 | picker: require("./picker")(), 3 | separator: require("./separate")(), 4 | superPanel: require("./superPanel")(), 5 | main: require("./main")(), 6 | }); 7 | -------------------------------------------------------------------------------- /src/renderer/assets/api/list/banner.js: -------------------------------------------------------------------------------- 1 | import instance from '../request'; 2 | 3 | export default { 4 | async query(params) { 5 | const result = await instance.get('/banner/query', {params}); 6 | return result.data; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/renderer/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | import modules from './modules' 5 | 6 | Vue.use(Vuex) 7 | export default new Vuex.Store({ 8 | modules, 9 | strict: process.env.NODE_ENV !== 'production' 10 | }) 11 | -------------------------------------------------------------------------------- /src/renderer/assets/api/request.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | import config from "./config"; 3 | 4 | const instance = axios.create({ 5 | baseURL: config[process.env.NODE_ENV], 6 | timeout: 10000, 7 | withCredentials: true 8 | }); 9 | 10 | export default instance; 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: 提交一个新特性/功能 4 | title: '' 5 | labels: feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **您的功能请求是否与问题相关? 请简单描述.** 11 | 清晰简明地描述问题是什么. Ex. I'm always frustrated when [...] 12 | 13 | **请描述一下您想要的解决方案** 14 | 清晰简明地描述您想要发生的事情。 15 | 16 | **描述你考虑过的替代方案** 17 | 清晰简洁地描述您所考虑的任何替代解决方案或功能。 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: 报告一个bug 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **描述一下这个bug** 11 | 清楚而简洁地描述了错误是什么 12 | 13 | **复现方式** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **预期行为** 21 | 清晰简明地描述了您预期的发生。 22 | 23 | **截图** 24 | 如果可以,请添加屏幕截图以帮助解释您的问题。 25 | -------------------------------------------------------------------------------- /src/renderer/store/modules/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The file enables `@/store/index.js` to import all vuex modules 3 | * in a one-shot manner. There should not be any reason to edit this file. 4 | */ 5 | 6 | const files = require.context('.', false, /\.js$/) 7 | const modules = {} 8 | 9 | files.keys().forEach(key => { 10 | if (key === './index.js') return 11 | modules[key.replace(/(\.\/|\.js)/g, '')] = files(key).default 12 | }) 13 | 14 | export default modules 15 | -------------------------------------------------------------------------------- /src/renderer/store/modules/dev.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | main: 0 3 | } 4 | 5 | const mutations = { 6 | DECREMENT_MAIN_COUNTER (state) { 7 | state.main-- 8 | }, 9 | INCREMENT_MAIN_COUNTER (state) { 10 | state.main++ 11 | } 12 | } 13 | 14 | const actions = { 15 | someAsyncTask ({ commit }) { 16 | // do something async 17 | commit('INCREMENT_MAIN_COUNTER') 18 | } 19 | } 20 | 21 | export default { 22 | state, 23 | mutations, 24 | actions 25 | } 26 | -------------------------------------------------------------------------------- /src/renderer/assets/api/list/plugin.js: -------------------------------------------------------------------------------- 1 | import instance from '../request'; 2 | 3 | export default { 4 | async add(params) { 5 | const result = await instance.post('/plugin/create', params); 6 | return result.data; 7 | }, 8 | async update(params) { 9 | const result = await instance.post('/plugin/update', params); 10 | return result.data; 11 | }, 12 | async query(params) { 13 | const result = await instance.get('/plugin/query', {params}); 14 | return result.data; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.1.{build} 2 | 3 | branches: 4 | only: 5 | - master 6 | 7 | image: Visual Studio 2017 8 | platform: 9 | - x64 10 | 11 | cache: 12 | - node_modules 13 | - '%APPDATA%\npm-cache' 14 | - '%USERPROFILE%\.electron' 15 | - '%USERPROFILE%\AppData\Local\Yarn\cache' 16 | 17 | init: 18 | - git config --global core.autocrlf input 19 | 20 | install: 21 | - ps: Install-Product node 8 x64 22 | - git reset --hard HEAD 23 | - yarn 24 | - node --version 25 | 26 | build_script: 27 | - yarn build 28 | 29 | test: off 30 | -------------------------------------------------------------------------------- /src/renderer/assets/common/system.js: -------------------------------------------------------------------------------- 1 | import {shell, ipcRenderer} from 'electron'; 2 | export default { 3 | 'rubick-help': { 4 | help() { 5 | shell.openExternal('https://u.tools/docs/guide/about-uTools.html') 6 | } 7 | }, 8 | 'rubick-color': { 9 | pick() { 10 | ipcRenderer.send('start-picker') 11 | } 12 | }, 13 | 'rubick-screen-short-cut': { 14 | shortCut() { 15 | ipcRenderer.send('capture-screen', {type: 'start'}) 16 | } 17 | }, 18 | 'rubick-lock': { 19 | lock() { 20 | ipcRenderer.send('lock-screen'); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "comments": false, 3 | "env": { 4 | "main": { 5 | "presets": [ 6 | ["env", { 7 | "targets": { "node": 7 } 8 | }], 9 | "stage-0" 10 | ] 11 | }, 12 | "renderer": { 13 | "presets": [ 14 | ["env", { 15 | "modules": false 16 | }], 17 | "stage-0" 18 | ] 19 | }, 20 | "web": { 21 | "presets": [ 22 | ["env", { 23 | "modules": false 24 | }], 25 | "stage-0" 26 | ] 27 | } 28 | }, 29 | "plugins": ["transform-runtime"] 30 | } 31 | -------------------------------------------------------------------------------- /static/utils.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | 3 | const getlocalDataFile = () => { 4 | let localDataFile = process.env.HOME; 5 | if (!localDataFile) { 6 | localDataFile = process.env.LOCALAPPDATA; 7 | } 8 | return localDataFile; 9 | }; 10 | 11 | function saveData(path, value) { 12 | fs.writeFileSync(path, JSON.stringify(value)); 13 | } 14 | 15 | function getData(path, defaultValue) { 16 | try { 17 | return JSON.parse(fs.readFileSync(path, 'utf8')); 18 | } catch (e) { 19 | return defaultValue || undefined; 20 | } 21 | } 22 | 23 | module.exports = { 24 | getlocalDataFile, 25 | saveData, 26 | getData 27 | } 28 | -------------------------------------------------------------------------------- /static/plugins/picker/picker.js: -------------------------------------------------------------------------------- 1 | const {ipcRenderer} = require("electron"); 2 | let colorDomBoxs = null; 3 | 4 | ipcRenderer.on("updatePicker", ((e, args) => { 5 | if (!colorDomBoxs) { 6 | colorDomBoxs = []; 7 | document.querySelectorAll(".content>div").forEach((e => { 8 | colorDomBoxs.push(e.querySelectorAll(":scope > div")) 9 | })); 10 | } 11 | for (let i = 0; i < 9; i ++){ 12 | for (let j = 0; j < 9; j ++) { 13 | colorDomBoxs[i][j].style.background = '#' + args[i][j] 14 | } 15 | } 16 | })); 17 | 18 | document.addEventListener( 19 | "keydown", 20 | (event) => { 21 | if (event.key === "Escape") ipcRenderer.send("closePicker"); 22 | }, 23 | false 24 | ); 25 | -------------------------------------------------------------------------------- /src/main/common/common.js: -------------------------------------------------------------------------------- 1 | import {app} from 'electron'; 2 | import './config'; 3 | import Listener from './listener'; 4 | 5 | export default function init(mainWindow) { 6 | const listener = new Listener(); 7 | 8 | // 注册快捷键 9 | listener.registerShortCut(mainWindow); 10 | listener.init(mainWindow); 11 | 12 | // 设置开机启动 13 | const config = global.opConfig.get(); 14 | app.setLoginItemSettings({ 15 | openAtLogin: config.perf.common.start, 16 | openAsHidden: true, 17 | }); 18 | 19 | mainWindow.once("ready-to-show", () => { 20 | // 非隐藏式启动需要显示主窗口 21 | if (!app.getLoginItemSettings().wasOpenedAsHidden) { 22 | mainWindow.show(); 23 | } 24 | }); 25 | 26 | // 打包后,失焦隐藏 27 | mainWindow.on('blur', () => { 28 | app.isPackaged && mainWindow.hide(); 29 | }); 30 | 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/index.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is used specifically and only for development. It installs 3 | * `electron-debug` & `vue-devtools`. There shouldn't be any need to 4 | * modify this file, but it can be used to extend your development 5 | * environment. 6 | */ 7 | 8 | /* eslint-disable */ 9 | 10 | // Install `electron-debug` with `devtron` 11 | require('electron-debug')({ showDevTools: true }) 12 | 13 | // Install `vue-devtools` 14 | require('electron').app.on('ready', () => { 15 | let installExtension = require('electron-devtools-installer') 16 | installExtension.default(installExtension.VUEJS_DEVTOOLS) 17 | .then(() => {}) 18 | .catch(err => { 19 | console.log('Unable to install `vue-devtools`: \n', err) 20 | }) 21 | }) 22 | 23 | // Require `main` process to boot app 24 | require('./index') -------------------------------------------------------------------------------- /static/plugins/tpl/doc.js: -------------------------------------------------------------------------------- 1 | export default { 2 | template: ` 3 |
4 | 10 |