diff --git a/.versionrc b/.versionrc new file mode 100644 index 0000000..3bfbf28 --- /dev/null +++ b/.versionrc @@ -0,0 +1,13 @@ +{ + "header": "变更日志", + "types": [ + {"type":"feat","section":"新增功能", "hidden": false}, + {"type":"fix","section":"Bug 修复", "hidden": false}, + {"type":"ref","section":"重构", "hidden": false}, + {"type":"docs","section":"文档", "hidden": false} + ], + "compareUrlFormat": "https://github.com/clouDr-f2e/rubick/compare/{{previousTag}}...{{currentTag}}", + "commitUrlFormat": "https://github.com/clouDr-f2e/rubick/commit/{{hash}}", + "issueUrlFormat": "https://github.com/clouDr-f2e/rubick/issues/{{id}}", + "userUrlFormat": "https://github.com/{{user}}" +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b8ffd2d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +变更日志 +### [0.0.10](https://github.com/clouDr-f2e/rubick/compare/v0.0.9...v0.0.10) (2021-09-23) + + +### 新增功能 + +* 增加 changelog 功能 ([69626ed](https://github.com/clouDr-f2e/rubick/commit/69626ed69e4a19d6e85388591a5c1273806893f3)) + + +### 文档 + +* 增加 changelog 功能 ([3bd9271](https://github.com/clouDr-f2e/rubick/commit/3bd927140366da9f4b3a3e6e81cad04d92c76c55)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a1c4313 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,46 @@ +# Contributing to Rubick + +## Set up + +Install dev deps after git clone the repo. + +```bash +$ npm install +$ npm run rebuild +$ npm run dev +``` + +## Build + +Transform with babel and webpack. + +```bash +# macos +$ npm run build + +# other system +$ npm run build_win +``` + +## Docs + +```bash +# add doc +$ cd docs +$ npm i +$ npm run docs:dev +``` + +## Pull requests +**Working on your first Pull Request?** You can learn how from this *free* series +[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) + +All pull requests are welcome. Thanks for taking the time to contribute. + +- Create an issue about the features, such as new components. +- Fork the repo to your own account. +- Clone your fork. +- Create a new branch base on `dev`, if you want to add new component, the branch name should be formatted as `component-[Component Name]`. (e.g. `component-steps`) And the commit info should be formatted as `[Component Name]: Info about commit`. +- Make sure that running `npm run build_win` outputs the correct files. +- Rebase before creating a PR to keep commit history clear. (Merge request to branch `dev`) +- Provide some description about your PR. diff --git a/README.md b/README.md index 1ad0437..e444ec7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +English | [简体中文](https://github.com/clouDr-f2e/rubick/blob/master/README.zh-CN.md) +
@@ -16,82 +18,89 @@ npm - star - + + star + + + 码云 + -基于 electron 的开源工具箱,自由集成丰富插件,打造极致的桌面端效能工具。Rubick(拉比克) 是 dota 里面的英雄之一,其核心技能是插件化使用其他英雄的技能,用完即走。非常符合本工具的设计理念,所以取名 Rubick。 +Based on electron open source toolbox, free integration of rich plug-ins, to create the ultimate desktop efficiency tool。Rubick is one of the heroes of Dota ,The core skill is the ability to use other heroes as plug-ins,Finished the walk 。Very consistent with the design concept of this tool,So named Rubick。 -## 安装包 +## Installation package * [Rubick Mac OS](https://github.com/clouDr-f2e/rubick/releases) * [Rubick Windows](https://github.com/clouDr-f2e/rubick/releases) * [Rubick Linux](https://github.com/clouDr-f2e/rubick/releases) -## 支持能力 -- [x] 支持远程下载安装插件,支持插件开发者模式 -- [x] 支持插件分离 -- [x] 支持系统命令取色、截屏、帮助 -- [x] 支持超级面板,长按右击呼出 -- [x] 支持全局快捷键设置 -- [x] 支持搜索本地已安装 app 或 偏好设置 -- [x] macos touchBar 唤起插件 -- [x] 支持 Windows(目前是 mac 的 alpha 版本,功能尚不全,正在迁移中) -- [x] 支持 Linux +## Feature list +- [x] Support remote download plug-in installation, support plug-in developer mode +- [x] Support plug-in separation +- [x] Support system command color picker、screen capture、 help +- [x] Support super panel, long press and right click to make a call +- [x] Support global shortcut key Settings +- [x] You can search for locally installed APPS or preferences +- [x] Support macos touchBar arouse the plug-in +- [x] Support Windows +- [x] Support Linux ![example.gif](https://user-images.githubusercontent.com/21073039/128359309-2377d3cf-7b70-4e8f-9973-ae8f337a8006.gif) -## 使用文档 +## Docs [Rubick Docs](https://cloudr-f2e.github.io/rubick/) -## 使用问题 -1. 依赖于 `robotjs` dev 环境运行请在 `install` 后执行 `npm run rebuild` -2. windows 版本目前有了一个最基础的可用版,代码在 [feat-win](https://github.com/clouDr-f2e/rubick/tree/feat-win) 分支。完整版正在开发中,敬请期待 -3. linux 开发分支 cross-platform 的 iohook 开发模式下可能需要手动下载并放入node_modules, 将在未来修复 +## Tips +If you're in a development environment,Run `npm run rebuild` after install。 -## 目前支持能力 +## Current support capability -### touchBar 唤起插件 -macOS 支持 touchbar 快速唤起插件 +### touchBar +macOS support touchbar Quick recall plug-in ![2oyn8-wu97m (3)](https://user-images.githubusercontent.com/21073039/129894362-1dbb8436-921c-4138-be9c-072dc2e62549.gif) - -### 超级面板 -长按鼠标右键,即可呼起超级面板,可以根据当前鼠标选择内容,匹配对应插件能力。比如当前选择图片后长按右击,则会呼起上传图床插件: +### Super Panel +Long press the right mouse button to call up the super panel. You can select content according to the current mouse and match the ability of the plug-in. For example, after selecting a picture, long press and right click to call up the plug-in to upload the picture bed. ![image.png](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1706cc730f1f46078cb700a445211317~tplv-k3u1fbpfcp-watermark.image) -### 模板 -模板即是一个内置 UI 样式的功能插件。 +### Template +A template is a built-in UI-style function plug-in. -### 系统命令 -#### 取色 -基于 `robot.js` 以及 `iohook` 实现。未使用 C++ 扩展。 +### System Command +#### Color picker +Based on `robot.js` and `iohook`。 ![image](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3036ae85bf3549fc8bbbe2926ecbad55~tplv-k3u1fbpfcp-watermark.image) -#### 截屏 +#### Screen capture -#### 全局快捷键 +#### Global Hotkeys -### 最后 +## Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. +## Feedback 对本项目有兴趣或者想要交流学习的同学可以扫码加下面的微信,备注 rubick,帮助我们更好的成长: ![image](https://user-images.githubusercontent.com/21073039/127327603-9796f246-ee4b-4950-a69d-ce3205ec9569.png) +## ChangeLog +[CHANGELOG](https://github.com/clouDr-f2e/rubick/blob/master/CHANGELOG.md) + ## License This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/clouDr-f2e/rubick/blob/master/LICENSE) file for details. diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 0000000..5ccf924 --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,107 @@ +[English](https://github.com/clouDr-f2e/rubick/blob/master/README.md) | 简体中文 + + +
+ +
+ + +
+

Rubick

+ + release + + release + + + building + + + npm + + + star + + + 码云 + +
+ + +基于 electron 的开源工具箱,自由集成丰富插件,打造极致的桌面端效能工具。Rubick(拉比克) 是 dota 里面的英雄之一,其核心技能是插件化使用其他英雄的技能,用完即走。非常符合本工具的设计理念,所以取名 Rubick。 + +## 安装包 +* [Rubick Mac OS](https://github.com/clouDr-f2e/rubick/releases) +* [Rubick Windows](https://github.com/clouDr-f2e/rubick/releases) +* [Rubick Linux](https://github.com/clouDr-f2e/rubick/releases) + +## 支持能力 +- [x] 支持远程下载安装插件,支持插件开发者模式 +- [x] 支持插件分离 +- [x] 支持系统命令取色、截屏、帮助 +- [x] 支持超级面板,长按右击呼出 +- [x] 支持全局快捷键设置 +- [x] 支持搜索本地已安装 app 或 偏好设置 +- [x] macos touchBar 唤起插件 +- [x] 支持 Windows +- [x] 支持 Linux + + + +![example.gif](https://user-images.githubusercontent.com/21073039/128359309-2377d3cf-7b70-4e8f-9973-ae8f337a8006.gif) + +## 使用文档 + +[Rubick Docs](https://cloudr-f2e.github.io/rubick/) + + +## 使用问题 +依赖于 `robotjs` dev 环境运行请在 `install` 后执行 `npm run rebuild` + +## 目前支持能力 + +### touchBar 唤起插件 +macOS 支持 touchbar 快速唤起插件 + +![2oyn8-wu97m (3)](https://user-images.githubusercontent.com/21073039/129894362-1dbb8436-921c-4138-be9c-072dc2e62549.gif) + + +### 超级面板 +长按鼠标右键,即可呼起超级面板,可以根据当前鼠标选择内容,匹配对应插件能力。比如当前选择图片后长按右击,则会呼起上传图床插件: + +![image.png](https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1706cc730f1f46078cb700a445211317~tplv-k3u1fbpfcp-watermark.image) + +### 模板 +模板即是一个内置 UI 样式的功能插件。 + + + +### 系统命令 +#### 取色 +基于 `robot.js` 以及 `iohook` 实现。未使用 C++ 扩展。 + +![image](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3036ae85bf3549fc8bbbe2926ecbad55~tplv-k3u1fbpfcp-watermark.image) + +#### 截屏 + + + + +#### 全局快捷键 + + + +## 贡献 +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + +## 反馈 +对本项目有兴趣或者想要交流学习的同学可以扫码加下面的微信,备注 rubick,帮助我们更好的成长: + +![image](https://user-images.githubusercontent.com/21073039/127327603-9796f246-ee4b-4950-a69d-ce3205ec9569.png) + +## 更新日志 +[ChangeLog](https://github.com/clouDr-f2e/rubick/blob/master/CHANGELOG.md) + +## License +This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/clouDr-f2e/rubick/blob/master/LICENSE) file for details. + diff --git a/docs/docs/.vuepress/config.js b/docs/docs/.vuepress/config.js index 072a127..8b1fe93 100644 --- a/docs/docs/.vuepress/config.js +++ b/docs/docs/.vuepress/config.js @@ -13,6 +13,7 @@ module.exports = { nav: [ { text: '使用文档', link: '/guide/' }, { text: '开发者', link: '/dev/' }, + { text: 'ChangeLog', link: 'https://github.com/clouDr-f2e/rubick/blob/master/CHANGELOG.md' }, ], sidebar: [ { diff --git a/docs/docs/qs/README.md b/docs/docs/qs/README.md index bdf8a3b..af2b852 100644 --- a/docs/docs/qs/README.md +++ b/docs/docs/qs/README.md @@ -1,5 +1,4 @@ ## windows 本地启动项目 -**windows 项目地址目前在 `feat-win` 分支,需要切换到 `feat-win`。** 如果您是在 `windows` 系统下使用本项目进行启动的话,如果出现了一些跑不起的情况,下面的一些经验或许可以帮助您。 ### 安装依赖 diff --git a/package.json b/package.json index 39d965d..8e9af1b 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { "name": "rubick2", - "version": "0.0.6-beta.1", + "version": "0.0.10", "author": "muwoo <2424880409@qq.com>", "description": "An electron-vue project", "license": null, "main": "./dist/electron/main.js", "scripts": { + "version": "standard-version", "release": "node .electron-vue/build.js && electron-builder --publish always", "build": "node .electron-vue/build.js && electron-builder", "dev": "node .electron-vue/dev-runner.js", @@ -129,6 +130,7 @@ "node-abi": "^2.30.0", "node-loader": "^0.6.0", "react": "^17.0.2", + "standard-version": "^9.3.1", "style-loader": "^0.21.0", "url-loader": "^1.0.1", "vue-html-loader": "^1.2.4", diff --git a/src/renderer/App.vue b/src/renderer/App.vue index a7b6277..468598e 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -305,7 +305,7 @@ export default { renderTitle(title) { if (typeof title !== "string") return; - const result = title.split(this.searchValue); + const result = title.toLowerCase().split(this.searchValue.toLowerCase()); if (result && result.length > 1) { return `
${result[0]}${this.searchValue}${result[1]}
`; } else { diff --git a/src/renderer/assets/common/utils.js b/src/renderer/assets/common/utils.js index cabf5fe..138c8ba 100644 --- a/src/renderer/assets/common/utils.js +++ b/src/renderer/assets/common/utils.js @@ -24,8 +24,8 @@ function getWindowHeight(searchList) { function searchKeyValues(lists, value) { return lists.filter((item) => { - if (typeof item === 'string') return item.indexOf(value) >= 0; - return item.type.indexOf(value) >= 0; + if (typeof item === 'string') return item.toLowerCase().indexOf(value.toLowerCase()) >= 0; + return item.type.toLowerCase().indexOf(value.toLowerCase()) >= 0; }); } diff --git a/static/preload.js b/static/preload.js index b7d329b..7a81156 100644 --- a/static/preload.js +++ b/static/preload.js @@ -1,5 +1,5 @@ const {getData, getlocalDataFile, saveData} = require("./utils"); - +const axios = require('axios'); const marked = require("marked"); const rendererMD = new marked.Renderer(); const path = require('path'); @@ -22,7 +22,7 @@ function getQueryVariable(variable) { if (location.href.indexOf('targetFile') > -1) { filePath = decodeURIComponent(getQueryVariable('targetFile')); } else { - filePath = process.platform === 'win32' ? location.pathname.split(':')[1] : location.pathname.replace('file://', ''); + filePath = process.platform === 'win32' ? location.pathname.replace('/', '') : location.pathname.replace('file://', ''); } const {ipcRenderer, nativeImage, clipboard, remote, shell} = require('electron'); @@ -255,6 +255,14 @@ window.rubick = { shellOpenPath(path) { shell.openPath(path) + }, + + request(config = {}) { + return axios.create({ + timeout: 10000, + withCredentials: true, + ...config, + }); } } const preloadPath = getQueryVariable('preloadPath') || './preload.js';