Merge remote-tracking branch 'main/master' into dev-tcsnzh

合并主分支.
This commit is contained in:
tcsnzh 2021-09-24 11:21:33 +08:00
commit f9559ac1b0
11 changed files with 237 additions and 40 deletions

13
.versionrc Normal file
View File

@ -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}}"
}

12
CHANGELOG.md Normal file
View File

@ -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))

46
CONTRIBUTING.md Normal file
View File

@ -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.

View File

@ -1,3 +1,5 @@
English | [简体中文](https://github.com/clouDr-f2e/rubick/blob/master/README.zh-CN.md)
<div align= "center">
<img align="center" width=200 src="https://user-images.githubusercontent.com/21073039/128333805-73e086f0-5523-46a3-a096-cba80b904c46.png" />
</div>
@ -16,82 +18,89 @@
<a href="https://github.com/clouDr-f2e/rubick/blob/master/LICENSE">
<img alt="npm" src="https://img.shields.io/github/license/clouDr-f2e/rubick" />
</a>
<img alt="star" src="https://img.shields.io/github/stars/clouDr-f2e/rubick?style=social"></a>
<a href="https://github.com/clouDr-f2e/rubick/stargazers">
<img alt="star" src="https://img.shields.io/github/stars/clouDr-f2e/rubick?style=social">
</a>
<a href="https://gitee.com/monkeyWang/rubick">
<img alt="码云" src="https://img.shields.io/badge/Gitee--yellow.svg?style=social&logo=data:image/svg+xml;base64,PHN2ZyB0PSIxNTc0ODM3MTM4ODM3IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE3NzAiICAgICB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPiAgICA8cGF0aCBkPSJNODkxIDQyOC44SDQ2NS44Yy0yMC40IDAtMzcgMTYuNS0zNyAzN3Y5Mi40YzAgMjAuNCAxNi41IDM3IDM3IDM3aDI1OC45YzIwLjQgMCAzNyAxNi42IDM3IDM3djE4LjRjMCA2MS4zLTQ5LjcgMTEwLjktMTEwLjkgMTEwLjlIMjk5LjRjLTIwLjQgMC0zNy0xNi42LTM3LTM3VjM3My4yYzAtNjEuMyA0OS43LTExMC45IDExMC45LTExMC45aDUxNy42YzIwLjQgMCAzNy0xNi41IDM3LTM3bDAuMS05Mi4zYzAtMjAuNC0xNi41LTM3LTM3LTM3SDM3My4zQzIyMC4yIDk2IDk2IDIyMC4yIDk2IDM3My4zVjg5MWMwIDIwLjQgMTYuNiAzNyAzNyAzN2g1NDUuNEM4MTYuMiA5MjggOTI4IDgxNi4zIDkyOCA2NzguNFY0NjUuOGMwLTIwLjQtMTYuNi0zNy0zNy0zN3oiICAgICAgICAgIGZpbGw9IiNkODFlMDYiIHAtaWQ9IjE3NzEiPjwvcGF0aD48L3N2Zz4="/>
</a>
</div>
基于 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-insFinished the walk 。Very consistent with the design concept of this toolSo 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 environmentRun `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.
<img src=https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0b113ad547974699b9c73c28bc09b9b1~tplv-k3u1fbpfcp-watermark.image width=500 />
### 系统命令
#### 取色
基于 `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
<img src=https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/18023dab52e1420c9e87362cefddb2a1~tplv-k3u1fbpfcp-watermark.image width=500 />
#### 全局快捷键
#### Global Hotkeys
<img src=https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/62cc424eacac4c9eb178f0e055e87d9a~tplv-k3u1fbpfcp-watermark.image width=500 />
### 最后
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. <a href="https://github.com/clouDr-f2e/rubick/graphs/contributors"><img src="https://opencollective.com/rubick/contributors.svg?width=890&button=false" /></a>
## 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.

107
README.zh-CN.md Normal file
View File

@ -0,0 +1,107 @@
[English](https://github.com/clouDr-f2e/rubick/blob/master/README.md) | 简体中文
<div align= "center">
<img align="center" width=200 src="https://user-images.githubusercontent.com/21073039/128333805-73e086f0-5523-46a3-a096-cba80b904c46.png" />
</div>
<div align= "center">
<h1>Rubick</h1>
<img alt="release" src="https://img.shields.io/github/downloads/clouDr-f2e/rubick/total" />
<a href="https://github.com/clouDr-f2e/rubick/releases">
<img alt="release" src="https://img.shields.io/github/package-json/v/clouDr-f2e/rubick" />
</a>
<a href="https://github.com/clouDr-f2e/rubick/actions">
<img alt=building src=https://img.shields.io/github/workflow/status/clouDr-f2e/rubick/Build>
</a>
<a href="https://github.com/clouDr-f2e/rubick/blob/master/LICENSE">
<img alt="npm" src="https://img.shields.io/github/license/clouDr-f2e/rubick" />
</a>
<a href="https://github.com/clouDr-f2e/rubick/stargazers">
<img alt="star" src="https://img.shields.io/github/stars/clouDr-f2e/rubick?style=social">
</a>
<a href="https://gitee.com/monkeyWang/rubick">
<img alt="码云" src="https://img.shields.io/badge/Gitee--yellow.svg?style=social&logo=data:image/svg+xml;base64,PHN2ZyB0PSIxNTc0ODM3MTM4ODM3IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjE3NzAiICAgICB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPiAgICA8cGF0aCBkPSJNODkxIDQyOC44SDQ2NS44Yy0yMC40IDAtMzcgMTYuNS0zNyAzN3Y5Mi40YzAgMjAuNCAxNi41IDM3IDM3IDM3aDI1OC45YzIwLjQgMCAzNyAxNi42IDM3IDM3djE4LjRjMCA2MS4zLTQ5LjcgMTEwLjktMTEwLjkgMTEwLjlIMjk5LjRjLTIwLjQgMC0zNy0xNi42LTM3LTM3VjM3My4yYzAtNjEuMyA0OS43LTExMC45IDExMC45LTExMC45aDUxNy42YzIwLjQgMCAzNy0xNi41IDM3LTM3bDAuMS05Mi4zYzAtMjAuNC0xNi41LTM3LTM3LTM3SDM3My4zQzIyMC4yIDk2IDk2IDIyMC4yIDk2IDM3My4zVjg5MWMwIDIwLjQgMTYuNiAzNyAzNyAzN2g1NDUuNEM4MTYuMiA5MjggOTI4IDgxNi4zIDkyOCA2NzguNFY0NjUuOGMwLTIwLjQtMTYuNi0zNy0zNy0zN3oiICAgICAgICAgIGZpbGw9IiNkODFlMDYiIHAtaWQ9IjE3NzEiPjwvcGF0aD48L3N2Zz4="/>
</a>
</div>
基于 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 样式的功能插件。
<img src=https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0b113ad547974699b9c73c28bc09b9b1~tplv-k3u1fbpfcp-watermark.image width=500 />
### 系统命令
#### 取色
基于 `robot.js` 以及 `iohook` 实现。未使用 C++ 扩展。
![image](https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3036ae85bf3549fc8bbbe2926ecbad55~tplv-k3u1fbpfcp-watermark.image)
#### 截屏
<img src=https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/18023dab52e1420c9e87362cefddb2a1~tplv-k3u1fbpfcp-watermark.image width=500 />
#### 全局快捷键
<img src=https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/62cc424eacac4c9eb178f0e055e87d9a~tplv-k3u1fbpfcp-watermark.image width=500 />
## 贡献
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. <a href="https://github.com/clouDr-f2e/rubick/graphs/contributors"><img src="https://opencollective.com/rubick/contributors.svg?width=890&button=false" /></a>
## 反馈
对本项目有兴趣或者想要交流学习的同学可以扫码加下面的微信,备注 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.

View File

@ -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: [
{

View File

@ -1,5 +1,4 @@
## windows 本地启动项目
**windows 项目地址目前在 `feat-win` 分支,需要切换到 `feat-win`。**
如果您是在 `windows` 系统下使用本项目进行启动的话,如果出现了一些跑不起的情况,下面的一些经验或许可以帮助您。
### 安装依赖

View File

@ -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",

View File

@ -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 `<div>${result[0]}<span style="color: red">${this.searchValue}</span>${result[1]}</div>`;
} else {

View File

@ -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;
});
}

View File

@ -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';