mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-07 19:14:11 +08:00
🐛 修复销毁 BrowserView 的bug
This commit is contained in:
parent
3f7285b177
commit
9663232864
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# 确保脚本抛出遇到的错误
|
||||
set -e
|
||||
|
||||
# 生成静态文件
|
||||
cd docs && npm run docs:build
|
||||
# 进入生成的文件夹
|
||||
cd docs/.vuepress/dist
|
||||
|
||||
# 如果是发布到自定义域名
|
||||
# echo 'www.example.com' > CNAME
|
||||
|
||||
git init
|
||||
git add -A
|
||||
git commit -m 'deploy'
|
||||
|
||||
# 如果发布到 https://<USERNAME>.github.io
|
||||
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
|
||||
|
||||
# 如果发布到 https://<USERNAME>.github.io/<REPO>
|
||||
git push -f git@github.com:rubickCenter/rubick.git master:gh-pages
|
||||
|
||||
cd -
|
@ -1,50 +0,0 @@
|
||||
module.exports = {
|
||||
title: 'Rubick',
|
||||
description: '你的开源桌面插件应用',
|
||||
base: '/rubick/',
|
||||
themeConfig: {
|
||||
themeColor: {
|
||||
blue: "#2196f3",
|
||||
red: "#2196f3",
|
||||
green: "#2196f3",
|
||||
orange: "#2196f3",
|
||||
},
|
||||
logo: '/images/logo.png',
|
||||
nav: [
|
||||
{ text: '使用文档', link: '/guide/' },
|
||||
{ text: '开发者', link: '/dev/' },
|
||||
],
|
||||
sidebar: [
|
||||
{
|
||||
title: '使用文档', // 必要的
|
||||
path: '/guide/', // 可选的, 标题的跳转链接,应为绝对路径且必须存在
|
||||
sidebarDepth: 1, // 可选的, 默认值是 1
|
||||
},
|
||||
{
|
||||
title: '插件开发',
|
||||
path: '/dev/',
|
||||
},
|
||||
{
|
||||
title: '特殊服务',
|
||||
path: '/super/',
|
||||
},
|
||||
{
|
||||
title: 'API',
|
||||
path: '/api/',
|
||||
},
|
||||
{
|
||||
title: '贡献 rubick',
|
||||
path: '/run/',
|
||||
}
|
||||
],
|
||||
// 假定是 GitHub. 同时也可以是一个完整的 GitLab URL
|
||||
repo: 'https://github.com/rubickCenter/rubick',
|
||||
// 自定义仓库链接文字。默认从 `themeConfig.repo` 中自动推断为
|
||||
// "GitHub"/"GitLab"/"Bitbucket" 其中之一,或是 "Source"。
|
||||
repoLabel: 'Github',
|
||||
// 默认是 false, 设置为 true 来启用
|
||||
editLinks: true,
|
||||
// 默认为 "Edit this page"
|
||||
editLinkText: '帮助我们改善此页面!'
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
Subproject commit 7b52f0fb4a06d8036a35e125368cf2ddd67dbaa8
|
Binary file not shown.
Before Width: | Height: | Size: 47 KiB |
@ -1,7 +0,0 @@
|
||||
$accentColor = #ff4ea4//默认主题颜色
|
||||
$codeBgColor = #282c34//默认背景颜色
|
||||
|
||||
//示例修改相关样式f12找到需要修改的地方找到对应class类拿过来直接用就行了
|
||||
.sidebar-group.is-sub-group > .sidebar-heading:not(.clickable){
|
||||
opacity :1
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
home: true
|
||||
heroImage: /images/logo.png
|
||||
heroText: Rubick
|
||||
tagline: 基于 Electron 开源的插件化工具箱
|
||||
actionText: 快速上手 →
|
||||
actionLink: /guide/
|
||||
features:
|
||||
- title: 极其轻量
|
||||
details: rubick 仅仅包含插件运行所需要的API,本身不内置任何插件,可以看成是 electron 的二次封装框架。
|
||||
- title: 更强大的插件能力
|
||||
details: 不仅仅支持ui插件(需要搜索呼起使用),还支持系统插件(不需要搜索,只要rubick在运行,系统插件即可用)
|
||||
- title: 更便捷的插件管理
|
||||
details: rubick 插件全部托管在 npm 仓库,rubick 插件的安装、使用、删除就是 npm 包的安装、使用、删除
|
||||
footer: MIT Licensed | Copyright (c) 2021 muwoo
|
||||
---
|
@ -1,261 +0,0 @@
|
||||
## 事件
|
||||
|
||||
### onPluginReady(callback)、onPluginEnter(callback)
|
||||
|
||||
* `callback` Function
|
||||
|
||||
`callback` 内会返回一个 `object` 对象,来描述进入当前插件的环境信息:
|
||||
|
||||
* `code` String
|
||||
|
||||
> plugin.json 配置的 feature.code
|
||||
|
||||
* `type` String
|
||||
|
||||
> plugin.json 配置的 feature.cmd.type,可以为 "text"、"img"、 "files"、 "regex"、 "over"、"window"
|
||||
|
||||
* payload String | Object | Array
|
||||
|
||||
> feature.cmd.type 对应匹配的数据
|
||||
|
||||
当插件装载成功,rubick 将会主动调用这个方法, 所有的 `api` 都应该在 `onPluginReady` 之后进行调用。
|
||||
|
||||
#### 示例
|
||||
|
||||
```js
|
||||
rubick.onPluginReady(({ code, type, payload }) => {
|
||||
console.log('插件装配完成,已准备好')
|
||||
})
|
||||
/*
|
||||
type 为 "files" 时, payload 值示例
|
||||
[
|
||||
{
|
||||
"isFile": true,
|
||||
"isDirectory": false,
|
||||
"name": "demo.js",
|
||||
"path": "C:\\demo.js"
|
||||
}
|
||||
]
|
||||
|
||||
type 为 "img" 时, payload 值示例
|
||||
data:image/png;base64,...
|
||||
|
||||
type 为 "text"、"regex"、 "over" 时, payload 值为进入插件时的主输入框文本
|
||||
*/
|
||||
```
|
||||
|
||||
### onPluginOut(callback)
|
||||
|
||||
* `callback` Function
|
||||
|
||||
每当插件从前台进入到后台时,rubick 将会主动调用这个方法。
|
||||
|
||||
## 窗口交互
|
||||
|
||||
### hideMainWindow()
|
||||
|
||||
隐藏主窗口
|
||||
|
||||
### showMainWindow()
|
||||
|
||||
显示主窗口
|
||||
|
||||
### setExpendHeight(height)
|
||||
|
||||
执行该方法将会修改插件窗口的高度。
|
||||
|
||||
* `height` Integer
|
||||
* 返回 `Boolean`
|
||||
|
||||
#### 示例
|
||||
|
||||
```js
|
||||
rubick.setExpendHeight(100)
|
||||
```
|
||||
|
||||
### setSubInput(onChange, placeholder)
|
||||
|
||||
设置插件输入框监听,当进入插件后,用户搜索会触发`onChange` 函数
|
||||
|
||||
* `onChange` Function
|
||||
* `Object`
|
||||
* `text` String
|
||||
|
||||
> 子输入框文本修改时触发
|
||||
|
||||
* `placeholder` String (可选)
|
||||
|
||||
> 子输入框占位符
|
||||
|
||||
* `isFocus` Boolean (可选)
|
||||
|
||||
> 子输入框是否获得焦点,默认 true
|
||||
|
||||
`返回 Boolean`
|
||||
|
||||
#### 示例
|
||||
|
||||
```js
|
||||
rubick.setSubInput(({ text }) => {
|
||||
console.log(text)
|
||||
}, '搜索')
|
||||
```
|
||||
|
||||
### setSubInputValue(value)
|
||||
|
||||
直接对子输入框的值进行设置。
|
||||
|
||||
* `value` String
|
||||
* `返回` Boolean
|
||||
|
||||
#### 示例
|
||||
|
||||
```js
|
||||
rubick.setSubInputValue('rubick')
|
||||
```
|
||||
|
||||
## 系统
|
||||
### showNotification(body)
|
||||
显示系统通知
|
||||
|
||||
* `body` String
|
||||
```js
|
||||
rubick.showNotification('Hi, rubick')
|
||||
```
|
||||
|
||||
### shellOpenPath(fullPath)
|
||||
打开给定路径的文件
|
||||
|
||||
* `fullPath` String
|
||||
|
||||
```js
|
||||
rubick.shellOpenPath('/path/file')
|
||||
```
|
||||
|
||||
### shellOpenExternal(url)
|
||||
浏览器打开URL
|
||||
|
||||
* `url` String
|
||||
|
||||
```js
|
||||
rubick.shellOpenExternal('https://www.baidu.com')
|
||||
```
|
||||
|
||||
### getPath(name)
|
||||
electron 内置 getPath 能力,详见 [electron API](https://www.electronjs.org/docs/latest/api/app#appgetpathname)
|
||||
|
||||
```js
|
||||
console.log(rubick.getPath('cache'));
|
||||
```
|
||||
|
||||
## 本地数据库
|
||||
|
||||
`rubick db` 是基于开源的 [pouchdb](https://github.com/pouchdb/pouchdb) 封装的
|
||||
|
||||
### rubick.db.put(doc)
|
||||
|
||||
* `doc` Object
|
||||
* `返回` Object
|
||||
|
||||
#### 示例
|
||||
|
||||
```js
|
||||
// 创建请求
|
||||
rubick.db.put({
|
||||
_id: "demo",
|
||||
data: "demo"
|
||||
})
|
||||
// 返回 {id: "demo", ok: true, rev: "1-05c9b92e6f24287dc1f4ec79d9a34fa8"}
|
||||
|
||||
// 更新请求
|
||||
rubick.db.put({
|
||||
_id: "demo",
|
||||
data: "demo",
|
||||
_rev: "1-05c9b92e6f24287dc1f4ec79d9a34fa8"
|
||||
})
|
||||
```
|
||||
|
||||
_id 代表这个文档在数据库中唯一值,如果值不存在,则会创建一个新的文档,如果值已经存在,则会进行更新。你可能已经注意到,返回对象中包含一个 rev
|
||||
属性,这是代表此文档的版本,每次对文档进行更新时,都要带上最新的版本号,否则更新将失败,版本化的意义在于解决同步时数据冲突。
|
||||
|
||||
另外需要注意,每次更新时都要传入完整的文档数据,无法对单个字段进行更新。
|
||||
|
||||
### rubick.db.get(id)
|
||||
|
||||
执行该方法将会根据文档 ID 获取数据
|
||||
|
||||
* `id` String
|
||||
* `返回` Object
|
||||
|
||||
```js
|
||||
rubick.db.get("demo")
|
||||
// 返回 {_id: "demo", _rev: "3-9836c5c68af5aef618e17d615882942a", data: "demo"}
|
||||
```
|
||||
|
||||
### rubick.db.remove(doc)
|
||||
|
||||
* `doc` String | Object
|
||||
* `返回` Object 执行该方法将会删除数据库文档,可以传入文档对象或文档 id 进行操作。
|
||||
|
||||
```js
|
||||
rubick.db.remove("demo")
|
||||
// 返回 {id: "demo", ok: true, rev: "2-effe5dbc23dffc180d8411b23f3108fb"}
|
||||
```
|
||||
|
||||
### rubick.db.bulkDocs(docs)
|
||||
|
||||
* `docs` Array
|
||||
* `返回` Array 执行该方法将会批量更新数据库文档,传入需要更改的文档对象合并成数组进行批量更新。
|
||||
|
||||
```js
|
||||
rubick.db.bulkDocs([{
|
||||
_id: "demo1",
|
||||
data: "demo",
|
||||
_rev: "1-c8817a74e292eda4cba1a45924853af6"
|
||||
}, {
|
||||
_id: "demo2",
|
||||
data: "demo",
|
||||
_rev: "1-f0399b42cc6123a9cc8503632ba7b3a7"
|
||||
}])
|
||||
/* 返回
|
||||
[{
|
||||
id: "demo1", ok: true, rev: "2-7857b2801bc0303d2cc0bb82e8afd796"
|
||||
}, {
|
||||
id: "demo2", ok: true, rev: "2-7857b2801bc0303d2cc0bb82e8afd796"
|
||||
}]
|
||||
*/
|
||||
```
|
||||
|
||||
### rubick.db.allDocs(key)
|
||||
|
||||
* `key` String | Array
|
||||
* `返回` Array 执行该方法将会获取所有数据库文档,如果传入字符串,则会返回以字符串开头的文档,也可以传入指定 ID 的数组,不传入则为获取所有文档。
|
||||
|
||||
```js
|
||||
// 获取所有文档
|
||||
rubick.db.allDocs()
|
||||
|
||||
// 传入字符串,则返回id以 demo 开头的文档
|
||||
rubick.db.allDocs("demo")
|
||||
/* 返回
|
||||
[{
|
||||
_id: "demo/123", _rev: "2-7857b2801bc0303d2cc0bb82e8afd796", data: "demo"
|
||||
}, {
|
||||
_id: "demo/124", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"
|
||||
}, {
|
||||
_id: "demo/125", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"
|
||||
}]
|
||||
*/
|
||||
// 根据id数组请求
|
||||
rubick.db.allDocs([
|
||||
"demo1",
|
||||
"demo2"
|
||||
])
|
||||
/* 返回
|
||||
[{
|
||||
_id: "demo1", _rev: "2-7857b2801bc0303d2cc0bb82e8afd796", data: "demo"
|
||||
}, {
|
||||
_id: "demo2", _rev: "1-f0399b42cc6123a9cc8503632ba7b3a7", data: "demo"
|
||||
}]
|
||||
*/
|
||||
```
|
@ -1,176 +0,0 @@
|
||||
## 插件说明
|
||||
`rubick` 插件分为 `UI插件` 和 `系统插件` 2类。下面分别介绍这 2 类插件的区别和作用。
|
||||
1. UI 插件 <Badge type="tip" text="最常用" />:都会有 UI 界面,用于和用户交互,且需要通过关键词搜索选择进行使用,比如 `斗图` 插件,有界面展示,且需要再搜索框内搜索关键词选择后进行呼起才能使用。
|
||||
2. 系统插件:可能不会有 UI 界面,在 `rubick` 启动的时候,会注册执行系统插件。比如`超级面板` 插件,安装完成后,即可在 `rubick` 运行时随时使用,不需要任何关键词和匹配。
|
||||
## 开发 UI 插件
|
||||
|
||||
一个最基础插件的目录是这样的:
|
||||
```
|
||||
rubick-plugin-demo
|
||||
|-- index.html
|
||||
|-- package.json
|
||||
|-- preload.js
|
||||
```
|
||||
### 文件说明
|
||||
#### package.json
|
||||
用于指定插件最基础的配置,一个最基础的配置信息如下:
|
||||
```json
|
||||
{
|
||||
"name": "rubick-ui-plugin-demo",
|
||||
"pluginName": "插件demo",
|
||||
"description": "rubick ui 插件demo",
|
||||
"author": "muwoo",
|
||||
"main": "index.html",
|
||||
"logo": "https://www.img/demo.png",
|
||||
"version": "0.0.1",
|
||||
"preload":"preload.js",
|
||||
"homePage": "https://gitee.com/rubick-center/rubick-ui-plugin-demo/raw/master/README.md",
|
||||
"pluginType": "ui",
|
||||
"features": [
|
||||
{
|
||||
"code": "index",
|
||||
"explain": "测试插件",
|
||||
"cmds":[
|
||||
"demo",
|
||||
"测试"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
核心字段说明:
|
||||
|
||||
* name: 插件 `npm` 包名称,<Badge type="tip" text="必填" />
|
||||
* pluginName: 插件显示名称,用于展示给使用者 <Badge type="tip" text="必填" />
|
||||
* description: 插件描述,描述这个插件的作用 <Badge type="tip" text="必填" />
|
||||
* author: 插件作者
|
||||
* main: 入口文件,一般为 `index.html`
|
||||
* logo: 尺寸建议 200 * 200, 插件的 logo, 需要是 http/https 在线地址,不支持本地logo <Badge type="tip" text="必填" />
|
||||
* version: 插件的版本 <Badge type="tip" text="必填" />
|
||||
* preload: 预加载脚本
|
||||
* homePage: 插件 readme raw 地址
|
||||
* pluginType: 插件类型,枚举:ui, system. 当前选 ui <Badge type="tip" text="必填" />
|
||||
* features: 插件核心功能列表 <Badge type="tip" text="必填" />
|
||||
* features.code: 插件某个功能的识别码,可用于区分不同的功能 <Badge type="tip" text="必填" />
|
||||
* features.explain: 插件某个功能的解释 <Badge type="tip" text="必填" />
|
||||
* features.cmds: 输入框内搜索该 cmd 进入插件 <Badge type="tip" text="必填" />
|
||||
|
||||
#### index.html
|
||||
插件的入口文件,用于展示插件的样式,一个最基础的 `html` 结构可以是这样:
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
hello Rubick
|
||||
<button id="showNotification">通知</button>
|
||||
</body>
|
||||
<script>
|
||||
document.getElementById('showNotification').addEventListener('click', () => {
|
||||
window.showNotification();
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### preload.js
|
||||
细心的同学可能已经注意到上面的 `index.html` 使用了一个全局函数 `showNotification` 那么这个函数是在哪里定义的呢?
|
||||
答案就是在 `preload.js` 里面。`preload.js` 可以为页面提供全局函数
|
||||
```js
|
||||
window.showNotification = function () {
|
||||
rubick.showNotification('HI, rubick')
|
||||
}
|
||||
```
|
||||
rubick 更多支持 API 能力参考:[rubick 全局API](https://github.com/rubickCenter/rubick/blob/master/public/preload.js)
|
||||
|
||||
### 测试写好的插件
|
||||
由于 `rubick` 插件是基于 `npm` 的管理方式,所以开发者调试插件,也是基于 `npm` 的软连接的方式进行调试。
|
||||
首先需要再插件 `package.json` 目录下执行:
|
||||
```shell
|
||||
$ npm link
|
||||
```
|
||||
然后将插件通过插件市场的 `开发者` 菜单进行安装,填写插件的 `name` 即可,如果插件需要调试,可以通过右上角 ... 来打开开发者工具进行调试,页面变更直接刷新即可:
|
||||
|
||||

|
||||
|
||||
|
||||
本小节所有代码:[rubick-ui-plugin-demo](https://gitee.com/rubick-center/rubick-ui-plugin-demo)
|
||||
|
||||
## 开发系统插件
|
||||
|
||||
一个最基础插件的目录是这样的:
|
||||
```
|
||||
rubick-system-plugin-demo
|
||||
|-- package.json
|
||||
|-- index.js
|
||||
```
|
||||
### 文件说明
|
||||
#### package.json
|
||||
用于指定插件最基础的配置,一个最基础的配置信息如下:
|
||||
```json
|
||||
{
|
||||
"name": "rubick-system-plugin-demo",
|
||||
"pluginName": "rubick 系统插件demo",
|
||||
"version": "0.0.0",
|
||||
"description": "rubick 系统插件demo",
|
||||
"entry": "index.js",
|
||||
"logo": "https://xxxx/upload/202112/08/5bac90649c5343cabb63930b131cf8e6.png",
|
||||
"pluginType": "system",
|
||||
"author": "muwoo",
|
||||
"homepage": ""
|
||||
}
|
||||
```
|
||||
核心字段说明:
|
||||
|
||||
* name: 插件 `npm` 包名称,<Badge type="tip" text="必填" />
|
||||
* pluginName: 插件显示名称,用于展示给使用者 <Badge type="tip" text="必填" />
|
||||
* description: 插件描述,描述这个插件的作用 <Badge type="tip" text="必填" />
|
||||
* author: 插件作者
|
||||
* entry: 入口文件,一般为 `index.js`
|
||||
* logo: 尺寸建议 200 * 200, 插件的 logo, 需要是 http/https 在线地址,不支持本地logo <Badge type="tip" text="必填" />
|
||||
* version: 插件的版本 <Badge type="tip" text="必填" />
|
||||
* homePage: 插件 readme raw 地址
|
||||
* pluginType: 插件类型,枚举:ui, system. 当前选 system <Badge type="tip" text="必填" />
|
||||
|
||||
#### index.js
|
||||
插件的入口文件,用于 rubick 主进程进行加载执行:
|
||||
```js
|
||||
module.exports = () => {
|
||||
return {
|
||||
onReady(ctx) {
|
||||
const { Notification } = ctx;
|
||||
new Notification({
|
||||
title: "测试系统插件",
|
||||
body: "这是一个系统插件,在rubick运行时,立即被加载"
|
||||
}).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
`index.js` 需要返回一个包含 `onReady` 生命周期的函数,该函数接受 `ctx` 对象作为参数,我们可以通过 `ctx` 使用 `electron` 主进程所有能力。
|
||||
同时也为 `ctx` 上扩展挂在了 `mainWindow` 对象。
|
||||
|
||||
#### 调试插件
|
||||
由于 `rubick` 插件是基于 `npm` 的管理方式,所以开发者调试插件,也是基于 `npm` 的软连接的方式进行调试。
|
||||
首先需要再插件 `package.json` 目录下执行:
|
||||
```shell
|
||||
$ npm link
|
||||
```
|
||||
然后将插件通过插件市场的 `开发者` 菜单进行安装,填写插件的 `name` 即可。由于插件依赖于主进程启动执行,所以安装完成后需要重启 rubick 后才能生效。
|
||||
|
||||

|
||||
|
||||
::: danger
|
||||
系统插件目前无法直接通过 `devtools` 进行调试,后面会进行优化
|
||||
:::
|
||||
|
||||
## 发布插件
|
||||
|
||||
这里介绍完了如何开发插件,最后非常欢迎为 `rubick` 贡献开源插件,发布插件也非常简单,首先需要把自己的插件发布到 `npm` 仓库:
|
||||
|
||||
```shell
|
||||
$ npm publish
|
||||
```
|
||||
|
||||
然后再给 [rubick-database/plugins/total-plugins.json](https://gitcode.net/rubickcenter/rubick-database/-/blob/master/plugins/total-plugins.json) 仓库提个 `pull request`, 把你的 `package.json` 信息加入 `json` 文件内,等我们 merge 了您的提交,插件将会自动上架。
|
||||
|
||||
|
@ -1,74 +0,0 @@
|
||||
## 赞助
|
||||
`rubick` 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️.
|
||||
|
||||
<img width=200 src=https://pic1.zhimg.com/80/v2-688385687a37e962fe32daf136139feb_720w.png />
|
||||
<img width=200 src=https://pica.zhimg.com/80/v2-1ba296fd2cece45ee1094ee7c259035c_720w.png />
|
||||
|
||||
## 前言
|
||||
rubick 之前的插件管理,依托于云服务器存储,我们需要为服务器存储支付一笔不小的开销。
|
||||
由于项目完全开源,所以几乎无任何收入,所以为了让 rubick 先生存下去,我们再三抉择把插件包管理方式托管到了`npm` 上。
|
||||
|
||||
由于 rubick 的插件管理体系是基于 npm 的包管理体系,所以当您需要使用插件的时候,需要手动保证当前电脑已经安装好了`node`环境。
|
||||
如果当前电脑已经安装过 `node`,那么您可以直接下载 `rubick` 进行使用啦!
|
||||
|
||||
[macos 下安装 nodejs 方法](https://juejin.cn/post/6844903886541553672)
|
||||
|
||||
[windows 下安装 nodejs 方法](https://juejin.cn/post/6892790243687137287)
|
||||
|
||||
## 下载 rubick
|
||||
[rubick 下载安装地址](https://github.com/rubickCenter/rubick/releases)
|
||||
|
||||
macos 选择 `pkg` 文件,windows 选择 `exe` 文件,Debian/Ubuntu选择`deb`。
|
||||
安装完成后打开 rubick 即可看到主搜索界面:
|
||||
|
||||

|
||||
|
||||
## 功能说明
|
||||
接下来详细介绍 rubick 所包含和支持的功能
|
||||
|
||||
### 1. 搜索系统应用
|
||||
支持拼音和缩写来搜索系统安装应用:
|
||||
|
||||

|
||||
|
||||
### 2. UI类插件安装
|
||||
点击搜索框右侧 `rubick` 图标,进入插件市场,选择所需插件,点击下载按钮即可下载,下载完成后在已安装 tab 下可以找到安装插件。
|
||||
安装完成后,输入插件呼起命令即可使用对应插件:
|
||||
|
||||

|
||||
|
||||
### 3. 系统类插件安装
|
||||
系统插件安装方式和UI类一样,在插件市场选择`系统分类`,寻找适合自己的系统插件安装即可。
|
||||
::: danger
|
||||
系统插件安装成功后,需要重启 `rubick` 才能生效
|
||||
:::
|
||||
|
||||
### 4. 输入框聚焦自动根据剪切板内容匹配插件
|
||||
在 `rubick` 内搜索`偏好设置`,然后开启`自动粘贴` 功能,即可匹配剪切板内容自动匹配适合插件进行使用。
|
||||
|
||||

|
||||
|
||||
### 内网部署
|
||||
::: tip
|
||||
如果把插件发布到公网 `npm` 如果不符合您的公司安全要求,`rubick` 支持内网私有源和私有插件库,如果您需要内网部署使用,可以自行配置以下规则。
|
||||
:::
|
||||
`rubick` 依赖 `npm` 仓库做插件管理,依赖 `gitcode` 做插件数据存储,所以如果要进行内网部署,主要需要替换这2个设置。详细设置:
|
||||
`插件市场 -> 设置 -> 内网部署设置`
|
||||
|
||||

|
||||
|
||||
#### 1. 替换 npm 源
|
||||
插件发布到私有 `npm` 源即可。
|
||||
|
||||
#### 2. 替换 `gitcode` 源为内网 `gitlab`: database url
|
||||
|
||||
* clone 下载 rubick 插件库:[https://gitcode.net/rubickcenter/rubick-database](https://gitcode.net/rubickcenter/rubick-database)
|
||||
* 提交仓库到私有 `gitlab` 库。
|
||||
|
||||
替换格式:`https://gitlab.xxx.com/api/v4/projects/{projectId}/repository/files/` 。因为接口为 `gitlab openAPI`,所以需要填写仓库 `access_token`
|
||||
|
||||
|
||||
### 更多功能
|
||||
如果您还需要更多功能,欢迎来这里给我们提建议:[issues](https://github.com/rubickCenter/rubick/issues) 。
|
||||
有价值的想法我们会加入到后期的开发当中。同时也欢迎一起加入共建。
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 92 KiB |
@ -1,103 +0,0 @@
|
||||
## 赞助
|
||||
`rubick` 是非盈利项目,开源不容易,如果该项目对你有用的话,可以打赏我们喝杯 coffee ☕️.
|
||||
|
||||
<img width=200 src=https://pic1.zhimg.com/80/v2-688385687a37e962fe32daf136139feb_720w.png />
|
||||
<img width=200 src=https://pica.zhimg.com/80/v2-1ba296fd2cece45ee1094ee7c259035c_720w.png />
|
||||
|
||||
## 贡献代码
|
||||
### rubick 目录介绍
|
||||
|
||||
```shell
|
||||
.
|
||||
├── docs # 文档存方目录
|
||||
│ ├── docs
|
||||
│ ├── package-lock.json
|
||||
│ ├── package.json
|
||||
│ └── pnpm-lock.yaml
|
||||
├── feature # 插件市场插件
|
||||
│ ├── README.md
|
||||
│ ├── babel.config.js
|
||||
│ ├── package-lock.json
|
||||
│ ├── package.json
|
||||
│ ├── public
|
||||
│ ├── src
|
||||
│ ├── tsconfig.json
|
||||
│ └── vue.config.js
|
||||
├── public # rubick __static 目录
|
||||
│ ├── favicon.ico
|
||||
│ ├── feature
|
||||
│ ├── icons
|
||||
│ ├── index.html
|
||||
│ ├── preload.js
|
||||
│ └── tpl
|
||||
├── src # rubick 核心源码
|
||||
│ ├── common # 一些通用的函数
|
||||
│ ├── core # 一些核心的能力,比如 app search
|
||||
│ ├── main # 主进程
|
||||
│ └── renderer # 渲染进程
|
||||
├── tpl # rubick 模板插件
|
||||
│ ├── README.md
|
||||
│ ├── babel.config.js
|
||||
│ ├── package-lock.json
|
||||
│ ├── package.json
|
||||
│ ├── public
|
||||
│ ├── src
|
||||
│ ├── tsconfig.json
|
||||
│ └── vue.config.js
|
||||
├── LICENSE # MIT 协议
|
||||
├── README.md # 英文文档
|
||||
├── README.zh-CN.md # 中文文档
|
||||
├── babel.config.js
|
||||
├── deploy-doc.sh # rubick doc 发布脚本
|
||||
├── tsconfig.json
|
||||
├── package-lock.json
|
||||
├── package.json
|
||||
└── vue.config.js
|
||||
```
|
||||
|
||||
### 启动
|
||||
#### 1. 安装依赖
|
||||
`rubick` 启动主要涉及到3个目录:
|
||||
1. 根目录:`rubick` 核心进程
|
||||
2. feature:`rubick` 内置的插件市场插件
|
||||
3. tpl: `rubick` 内置的模板插件
|
||||
```shell
|
||||
$ npm i
|
||||
$ cd feature && npm i
|
||||
$ cd tpl && npm i
|
||||
```
|
||||
|
||||
#### 2. 启动核心进程
|
||||
|
||||
```shell
|
||||
$ npm run electron:serve
|
||||
```
|
||||
|
||||
#### 3. 启动插件中心 <Badge type="warning" text="非必须" vertical="top" />
|
||||
|
||||
```shell
|
||||
$ cd feature && npm run serve
|
||||
```
|
||||
|
||||
#### 4. 启动模板插件 <Badge type="warning" text="非必须" vertical="top" />
|
||||
|
||||
```shell
|
||||
$ cd tpl && npm run serve
|
||||
```
|
||||
|
||||
### 编译
|
||||
```shell
|
||||
$ cd feature && npm run build
|
||||
$ cd tpl && npm run build
|
||||
$ npm run electron:build
|
||||
```
|
||||
|
||||
### PR
|
||||
|
||||
1. Create an issue about the features, such as new components.
|
||||
2. Fork the repo to your own account.
|
||||
3. Clone your fork.
|
||||
4. 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.
|
||||
5. Make sure that running npm run prepublish outputs the correct files.
|
||||
6. Rebase before creating a PR to keep commit history clear. (Merge request to branch dev)
|
||||
7. Provide some description about your PR.
|
@ -1,19 +0,0 @@
|
||||
# 特殊服务
|
||||
## 说明
|
||||
`rubick` 一直坚持开源免费,现在不会变,以后也不会变。但是纯开源 `MIT` 模式下,是一种 0 收入用爱发电的,完全依靠
|
||||
作者自己的爱好和激情。但这种用爱发电的模式很难持续维持,为了更好的持续迭代和发展壮大 `rubick`, 我们需要一定的现金持续激励 `rubick` 的核心开发者们,让更多的人成为 `rubick`
|
||||
的核心开发者。所以 `rubick` 开启了一个新的模式尝试,那是服务付费:`rubick` 用户可以购买我们提供技术支持、答疑解惑、定制化插件开发、二次定制化开发 `rubick` 等等官方服务...
|
||||
|
||||
## 可以提供哪些服务?
|
||||
我们收集了大量用户的问题,目前约定可以支持到的服务有:
|
||||
1. 二次定制化开发 `rubick`
|
||||
2. 轻量级插件开发
|
||||
3. `rubick` 实现原理手把手介绍
|
||||
4. `rubick` 使用答疑
|
||||
5. `rubick` 内网部署一条龙服务
|
||||
6. 前端圈各种技术支持(作者分别是前蚂蚁集团和字节跳动的前端技术专家)
|
||||
7. 未来能提供的一切...
|
||||
|
||||
## 如何加入特殊服务?
|
||||
扫描下方的二维码,加入知识星球即可:
|
||||
<img width=400 src=https://picx.zhimg.com/80/v2-6deabf65175d18080439ef813102d18c_720w.png />
|
@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "rubick-docs",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"docs:dev": "vuepress dev docs",
|
||||
"docs:build": "vuepress build docs"
|
||||
},
|
||||
"author": "muwoo",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"vuepress": "^1.8.2"
|
||||
}
|
||||
}
|
8688
docs/yarn.lock
8688
docs/yarn.lock
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"author": "muwoo <2424880409@qq.com>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
File diff suppressed because one or more lines are too long
1
public/feature/css/app.bb291762.css
Normal file
1
public/feature/css/app.bb291762.css
Normal file
@ -0,0 +1 @@
|
||||
.ant-menu-submenu-popup .ant-menu{background:var(--color-body-bg2)!important;height:100%;border-right:none}.ant-menu-submenu-popup .ant-menu .ant-menu-item,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu-arrow{color:var(--color-text-content)}.ant-menu-submenu-popup .ant-menu .ant-menu-item:active,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu-arrow:active,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu:active{background:none}.ant-menu-submenu-popup .ant-menu .ant-menu-item-selected,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu-selected{background-color:var(--color-list-hover);color:var(--ant-primary-color)}.ant-menu-submenu-popup .ant-menu .ant-menu-item-selected .ant-menu-submenu-arrow,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu-selected .ant-menu-submenu-arrow{color:var(--ant-primary-color)}.ant-menu-submenu-popup .ant-menu .ant-menu-item-selected:after,.ant-menu-submenu-popup .ant-menu .ant-menu-submenu-selected:after{display:none}.left-menu[data-v-435a1273]{width:183px;border-right:1px solid var(--color-border-light)}.left-menu .search-container[data-v-435a1273]{padding:10px}.left-menu .ant-input-affix-wrapper[data-v-435a1273]{border:none;background:var(--color-input-hover)}.left-menu .ant-input-affix-wrapper[data-v-435a1273] input{background:none;color:var(--color-text-desc)}.left-menu .ant-input-affix-wrapper[data-v-435a1273] .anticon{color:var(--color-text-desc)}.left-menu[data-v-435a1273] .ant-menu{background:var(--color-menu-bg);height:100%;border-right:none}.left-menu[data-v-435a1273] .ant-menu .ant-menu-item,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu-arrow{color:var(--color-text-content)}.left-menu[data-v-435a1273] .ant-menu .ant-menu-item:active,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu-arrow:active,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu:active{background:none}.left-menu[data-v-435a1273] .ant-menu .ant-menu-item-selected,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu-selected{background-color:var(--color-list-hover);color:var(--ant-primary-color)}.left-menu[data-v-435a1273] .ant-menu .ant-menu-item-selected .ant-menu-submenu-arrow,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu-selected .ant-menu-submenu-arrow{color:var(--ant-primary-color)}.left-menu[data-v-435a1273] .ant-menu .ant-menu-item-selected:after,.left-menu[data-v-435a1273] .ant-menu .ant-menu-submenu-selected:after{display:none}[data-v-435a1273]{margin:0;padding:0}.main-container[data-v-435a1273]{-webkit-app-region:no-drag;display:flex;background:var(--color-body-bg);border-top:1px solid var(--color-border-light);height:100vh;box-sizing:border-box;align-items:flex-start;width:100%;overflow:hidden;background:var(--color-menu-bg)}.main-container .search[data-v-435a1273] .ant-btn,.main-container .search[data-v-435a1273] .ant-input,.main-container .search[data-v-435a1273] .ant-input-group-addon{color:var(--ant-primary-color)!important;background:var(--color-input-hover);border-color:var(--color-border-light)}.main-container .container[data-v-435a1273],.main-container .more[data-v-435a1273]{background:var(--color-body-bg);width:calc(100% - 183px);height:100%;box-sizing:border-box;padding:16px;position:relative;overflow:auto}.main-container .more[data-v-435a1273]{background:var(--color-body-bg2)}.main-container .left-menu[data-v-435a1273]{padding:24px 16px;position:relative;height:100vh}.main-container .left-menu[data-v-435a1273] .ant-menu-item{padding-left:12px!important;display:flex;align-items:center}.main-container .left-menu[data-v-435a1273] .ant-menu-item-selected,.main-container .left-menu[data-v-435a1273] .ant-menu-submenu-selected{background-color:var(--color-list-hover);border-radius:6px;color:var(--ant-primary-color)}.main-container .left-menu[data-v-435a1273] .user-info{position:absolute;bottom:32px}.main-container .left-menu[data-v-435a1273] .ant-avatar{background:transparent}:root{--color-text-primary:rgba(0,0,0,0.85);--color-text-content:#141414;--color-text-desc:rgba(0,0,0,0.45);--color-body-bg2:#eee;--color-body-bg:#fff;--color-menu-bg:#f8f8f8;--color-list-hover:#e9e9e9;--color-input-hover:#fff;--color-border-light:#f0f0f0;--color-action-color:rgba(0,0,0,0.25)}.dark{--color-text-primary:#e8e8f0;--color-text-content:#ccccd8;--color-text-desc:#8f8fa6;--color-body-bg:#1c1c28;--color-body-bg2:#2c2f3b;--color-menu-bg:#1c1c28;--color-list-hover:#2c2f3b;--color-input-hover:rgba(68,68,68,0.8666666666666667);--color-border-light:rgba(68,68,68,0.8666666666666667);--color-action-color:hsla(0,0%,100%,0.30196078431372547)}
|
1
public/feature/css/chunk-197bc330.29812a6a.css
Normal file
1
public/feature/css/chunk-197bc330.29812a6a.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
.ant-message{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.85);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;top:8px;left:0;z-index:1010;width:100%;pointer-events:none}.ant-message-notice{padding:8px;text-align:center}.ant-message-notice-content{display:inline-block;padding:10px 16px;background:#fff;border-radius:2px;box-shadow:0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05);pointer-events:all}.ant-message-success .anticon{color:#52c41a}.ant-message-error .anticon{color:#ff4d4f}.ant-message-warning .anticon{color:#faad14}.ant-message-info .anticon,.ant-message-loading .anticon{color:#1890ff}.ant-message .anticon{position:relative;top:1px;margin-right:8px;font-size:16px}.ant-message-notice.ant-move-up-leave.ant-move-up-leave-active{-webkit-animation-name:MessageMoveOut;animation-name:MessageMoveOut;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes MessageMoveOut{0%{max-height:150px;padding:8px;opacity:1}to{max-height:0;padding:0;opacity:0}}@keyframes MessageMoveOut{0%{max-height:150px;padding:8px;opacity:1}to{max-height:0;padding:0;opacity:0}}.ant-message-rtl,.ant-message-rtl span{direction:rtl}.ant-message-rtl .anticon{margin-right:0;margin-left:8px}.dev[data-v-6fb0031c]{box-sizing:border-box;width:100%;overflow-x:hidden;height:calc(100vh - 34px)}.dev .view-title[data-v-6fb0031c]{font-size:16px;font-weight:500;margin-bottom:16px;color:var(--color-text-primary)}.dev .view-container[data-v-6fb0031c]{padding:10px;box-sizing:border-box;border-radius:8px;background:var(--color-body-bg);overflow:auto;height:calc(100vh - 84px)}.dev[data-v-6fb0031c] label{color:var(--color-text-content)}.dev[data-v-6fb0031c] .ant-input{background:var(--color-input-hover);color:var(--color-text-content)}
|
||||
.ant-message{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.85);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;top:8px;left:0;z-index:1010;width:100%;pointer-events:none}.ant-message-notice{padding:8px;text-align:center}.ant-message-notice-content{display:inline-block;padding:10px 16px;background:#fff;border-radius:2px;box-shadow:0 3px 6px -4px rgba(0,0,0,.12),0 6px 16px 0 rgba(0,0,0,.08),0 9px 28px 8px rgba(0,0,0,.05);pointer-events:all}.ant-message-success .anticon{color:#52c41a}.ant-message-error .anticon{color:#ff4d4f}.ant-message-warning .anticon{color:#faad14}.ant-message-info .anticon,.ant-message-loading .anticon{color:#1890ff}.ant-message .anticon{position:relative;top:1px;margin-right:8px;font-size:16px}.ant-message-notice.ant-move-up-leave.ant-move-up-leave-active{-webkit-animation-name:MessageMoveOut;animation-name:MessageMoveOut;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes MessageMoveOut{0%{max-height:150px;padding:8px;opacity:1}to{max-height:0;padding:0;opacity:0}}@keyframes MessageMoveOut{0%{max-height:150px;padding:8px;opacity:1}to{max-height:0;padding:0;opacity:0}}.ant-message-rtl,.ant-message-rtl span{direction:rtl}.ant-message-rtl .anticon{margin-right:0;margin-left:8px}.dev[data-v-2d26bea2]{box-sizing:border-box;width:100%;overflow-x:hidden;height:calc(100vh - 34px)}.dev .view-title[data-v-2d26bea2]{font-size:16px;font-weight:500;margin-bottom:16px;color:var(--color-text-primary)}.dev .view-container[data-v-2d26bea2]{padding:10px;box-sizing:border-box;border-radius:8px;background:var(--color-body-bg);overflow:auto;height:calc(100vh - 84px)}.dev[data-v-2d26bea2] label{color:var(--color-text-content)}.dev[data-v-2d26bea2] .ant-input{background:var(--color-input-hover)!important;color:var(--color-text-content)}
|
@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>feature</title><link href="css/chunk-0add5e88.2f22e37d.css" rel="prefetch"><link href="css/chunk-111de227.2450c00b.css" rel="prefetch"><link href="css/chunk-1af68a6e.2450c00b.css" rel="prefetch"><link href="css/chunk-1e4a75e5.ba6f3d8b.css" rel="prefetch"><link href="css/chunk-3fb623ce.2b9b7de2.css" rel="prefetch"><link href="css/chunk-596c6184.9be2495c.css" rel="prefetch"><link href="css/chunk-5cf3b9db.e273616c.css" rel="prefetch"><link href="css/chunk-88e69aa8.69c3b24d.css" rel="prefetch"><link href="css/chunk-93f94cf8.0f63dd4a.css" rel="prefetch"><link href="css/chunk-a2b32e48.67429700.css" rel="prefetch"><link href="css/chunk-cf61e458.9be2495c.css" rel="prefetch"><link href="css/chunk-f69c766e.9be2495c.css" rel="prefetch"><link href="js/chunk-0add5e88.26781f59.js" rel="prefetch"><link href="js/chunk-111de227.86b2c5e3.js" rel="prefetch"><link href="js/chunk-1af68a6e.2022b1a8.js" rel="prefetch"><link href="js/chunk-1e4a75e5.e9c5b1d4.js" rel="prefetch"><link href="js/chunk-2d0c49e7.20196ed0.js" rel="prefetch"><link href="js/chunk-3fb623ce.ee432c33.js" rel="prefetch"><link href="js/chunk-596c6184.a1398c77.js" rel="prefetch"><link href="js/chunk-5cf3b9db.d5ee71ed.js" rel="prefetch"><link href="js/chunk-88e69aa8.55955c4d.js" rel="prefetch"><link href="js/chunk-93f94cf8.7dd5e910.js" rel="prefetch"><link href="js/chunk-a2b32e48.20d42be1.js" rel="prefetch"><link href="js/chunk-cf61e458.20835e3d.js" rel="prefetch"><link href="js/chunk-f69c766e.230d2fbd.js" rel="prefetch"><link href="css/app.4abdfe3a.css" rel="preload" as="style"><link href="css/chunk-vendors.a52bdfa2.css" rel="preload" as="style"><link href="js/app.313735e9.js" rel="preload" as="script"><link href="js/chunk-vendors.c7dcd677.js" rel="preload" as="script"><link href="css/chunk-vendors.a52bdfa2.css" rel="stylesheet"><link href="css/app.4abdfe3a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but feature doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.c7dcd677.js"></script><script src="js/app.313735e9.js"></script></body></html>
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>feature</title><link href="css/chunk-0add5e88.2f22e37d.css" rel="prefetch"><link href="css/chunk-111de227.2450c00b.css" rel="prefetch"><link href="css/chunk-197bc330.29812a6a.css" rel="prefetch"><link href="css/chunk-1af68a6e.2450c00b.css" rel="prefetch"><link href="css/chunk-3fb623ce.2b9b7de2.css" rel="prefetch"><link href="css/chunk-46496dac.da060b5a.css" rel="prefetch"><link href="css/chunk-596c6184.9be2495c.css" rel="prefetch"><link href="css/chunk-88e69aa8.69c3b24d.css" rel="prefetch"><link href="css/chunk-93f94cf8.0f63dd4a.css" rel="prefetch"><link href="css/chunk-a2b32e48.67429700.css" rel="prefetch"><link href="css/chunk-cf61e458.9be2495c.css" rel="prefetch"><link href="css/chunk-f69c766e.9be2495c.css" rel="prefetch"><link href="js/chunk-0add5e88.26781f59.js" rel="prefetch"><link href="js/chunk-111de227.86b2c5e3.js" rel="prefetch"><link href="js/chunk-197bc330.95c96fee.js" rel="prefetch"><link href="js/chunk-1af68a6e.2022b1a8.js" rel="prefetch"><link href="js/chunk-2d0c49e7.20196ed0.js" rel="prefetch"><link href="js/chunk-3fb623ce.ee432c33.js" rel="prefetch"><link href="js/chunk-46496dac.719cab20.js" rel="prefetch"><link href="js/chunk-596c6184.a1398c77.js" rel="prefetch"><link href="js/chunk-88e69aa8.55955c4d.js" rel="prefetch"><link href="js/chunk-93f94cf8.7dd5e910.js" rel="prefetch"><link href="js/chunk-a2b32e48.20d42be1.js" rel="prefetch"><link href="js/chunk-cf61e458.20835e3d.js" rel="prefetch"><link href="js/chunk-f69c766e.230d2fbd.js" rel="prefetch"><link href="css/app.bb291762.css" rel="preload" as="style"><link href="css/chunk-vendors.a52bdfa2.css" rel="preload" as="style"><link href="js/app.55a0112a.js" rel="preload" as="script"><link href="js/chunk-vendors.c7dcd677.js" rel="preload" as="script"><link href="css/chunk-vendors.a52bdfa2.css" rel="stylesheet"><link href="css/app.bb291762.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but feature doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.c7dcd677.js"></script><script src="js/app.55a0112a.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
1
public/feature/js/chunk-197bc330.95c96fee.js
Normal file
1
public/feature/js/chunk-197bc330.95c96fee.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
public/feature/js/chunk-46496dac.719cab20.js
Normal file
1
public/feature/js/chunk-46496dac.719cab20.js
Normal file
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46496dac"],{"2b1c":function(e,t,n){"use strict";n("dc36")},"44e73":function(e,t,n){"use strict";n.r(t);var a=n("c7eb"),c=(n("c346"),n("e63d")),r=n.n(c),o=n("1da1"),u=(n("b0c0"),n("7a23")),i=n("47e2"),l={class:"dev"},s={class:"view-title"},d={class:"view-container"},f={__name:"index",setup:function(e){var t=Object(i["b"])(),n=t.t,c=Object(u["ref"])(),f=Object(u["reactive"])({name:void 0}),b={name:{required:!0,message:"Please input name"}},m=function(){c.value.validate().then((function(){v(f.name)}))},p=Object(u["ref"])(!1),v=function(){var e=Object(o["a"])(Object(a["a"])().mark((function e(t){return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return p.value=!0,e.next=3,window.market.downloadPlugin({name:t,isDev:!0});case 3:r.a.success(n("feature.dev.installSuccess",{pluginName:t})),p.value=!1;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){c.value.validate().then((function(){window.market.refreshPlugin({name:f.name}),r.a.success(n("feature.dev.refreshSuccess",{pluginName:f.name}))}))},O={span:4},w={span:14};return function(e,t){var n=Object(u["resolveComponent"])("a-alert"),a=Object(u["resolveComponent"])("a-input"),r=Object(u["resolveComponent"])("a-form-item"),o=Object(u["resolveComponent"])("a-button"),i=Object(u["resolveComponent"])("a-form");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",l,[Object(u["createElementVNode"])("div",s,Object(u["toDisplayString"])(e.$t("feature.dev.title")),1),Object(u["createElementVNode"])("div",d,[Object(u["createVNode"])(n,{style:{"margin-bottom":"40px"},message:e.$t("feature.dev.tips"),type:"warning"},null,8,["message"]),Object(u["createVNode"])(i,{ref_key:"formRef",ref:c,model:f,rules:b,"label-col":O,"wrapper-col":w},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(r,{label:e.$t("feature.dev.pluginName"),name:"name"},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(a,{value:f.name,"onUpdate:value":t[0]||(t[0]=function(e){return f.name=e})},null,8,["value"])]})),_:1},8,["label"]),Object(u["createVNode"])(r,{"wrapper-col":{span:14,offset:4}},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(o,{loading:p.value,type:"primary",onClick:m},{default:Object(u["withCtx"])((function(){return[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.$t("feature.dev.install")),1)]})),_:1},8,["loading"]),Object(u["createVNode"])(o,{onClick:j,style:{"margin-left":"10px"}},{default:Object(u["withCtx"])((function(){return[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.$t("feature.dev.refreshPlugins")),1)]})),_:1})]})),_:1})]})),_:1},8,["model"])])])}}},b=(n("2b1c"),n("6b0d")),m=n.n(b);const p=m()(f,[["__scopeId","data-v-2d26bea2"]]);t["default"]=p},a479:function(e,t,n){},c346:function(e,t,n){"use strict";n("fe5b"),n("a479")},dc36:function(e,t,n){}}]);
|
@ -1 +0,0 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5cf3b9db"],{"44e73":function(e,t,n){"use strict";n.r(t);var a=n("c7eb"),c=(n("c346"),n("e63d")),r=n.n(c),o=n("1da1"),u=(n("b0c0"),n("7a23")),i=n("47e2"),l={class:"dev"},s={class:"view-title"},f={class:"view-container"},d={__name:"index",setup:function(e){var t=Object(i["b"])(),n=t.t,c=Object(u["ref"])(),d=Object(u["reactive"])({name:void 0}),b={name:{required:!0,message:"Please input name"}},m=function(){c.value.validate().then((function(){v(d.name)}))},p=Object(u["ref"])(!1),v=function(){var e=Object(o["a"])(Object(a["a"])().mark((function e(t){return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return p.value=!0,e.next=3,window.market.downloadPlugin({name:t,isDev:!0});case 3:r.a.success(n("feature.dev.installSuccess",{pluginName:t})),p.value=!1;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){c.value.validate().then((function(){window.market.refreshPlugin({name:d.name}),r.a.success(n("feature.dev.refreshSuccess",{pluginName:d.name}))}))},O={span:4},w={span:14};return function(e,t){var n=Object(u["resolveComponent"])("a-alert"),a=Object(u["resolveComponent"])("a-input"),r=Object(u["resolveComponent"])("a-form-item"),o=Object(u["resolveComponent"])("a-button"),i=Object(u["resolveComponent"])("a-form");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",l,[Object(u["createElementVNode"])("div",s,Object(u["toDisplayString"])(e.$t("feature.dev.title")),1),Object(u["createElementVNode"])("div",f,[Object(u["createVNode"])(n,{style:{"margin-bottom":"40px"},message:e.$t("feature.dev.tips"),type:"warning"},null,8,["message"]),Object(u["createVNode"])(i,{ref_key:"formRef",ref:c,model:d,rules:b,"label-col":O,"wrapper-col":w},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(r,{label:e.$t("feature.dev.pluginName"),name:"name"},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(a,{value:d.name,"onUpdate:value":t[0]||(t[0]=function(e){return d.name=e})},null,8,["value"])]})),_:1},8,["label"]),Object(u["createVNode"])(r,{"wrapper-col":{span:14,offset:4}},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(o,{loading:p.value,type:"primary",onClick:m},{default:Object(u["withCtx"])((function(){return[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.$t("feature.dev.install")),1)]})),_:1},8,["loading"]),Object(u["createVNode"])(o,{onClick:j,style:{"margin-left":"10px"}},{default:Object(u["withCtx"])((function(){return[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.$t("feature.dev.refreshPlugins")),1)]})),_:1})]})),_:1})]})),_:1},8,["model"])])])}}},b=(n("ef18"),n("6b0d")),m=n.n(b);const p=m()(d,[["__scopeId","data-v-6fb0031c"]]);t["default"]=p},a479:function(e,t,n){},c346:function(e,t,n){"use strict";n("fe5b"),n("a479")},ef18:function(e,t,n){"use strict";n("f44a")},f44a:function(e,t,n){}}]);
|
@ -54,6 +54,7 @@ export default () => {
|
||||
executeHooks('PluginOut', null);
|
||||
});
|
||||
createWin.on('closed', () => {
|
||||
view.webContents?.destroy();
|
||||
win = undefined;
|
||||
});
|
||||
createWin.on('focus', () => {
|
||||
@ -70,6 +71,7 @@ export default () => {
|
||||
);
|
||||
view.setAutoResize({ width: true, height: true });
|
||||
createWin.setBrowserView(view);
|
||||
view.inDetach = true;
|
||||
createWin.webContents.executeJavaScript(
|
||||
`window.initDetach(${JSON.stringify(pluginInfo)})`
|
||||
);
|
||||
|
@ -166,8 +166,11 @@ export default () => {
|
||||
const removeView = (window: BrowserWindow) => {
|
||||
if (!view) return;
|
||||
window.removeBrowserView(view);
|
||||
window.setBrowserView(null);
|
||||
view.webContents.destroy();
|
||||
if (!view.inDetach) {
|
||||
window.setBrowserView(null);
|
||||
view.webContents?.destroy();
|
||||
}
|
||||
|
||||
// window.setSize(800, 60);
|
||||
executeHooks('PluginOut', null);
|
||||
window.webContents?.executeJavaScript(`window.initRubick()`);
|
||||
|
36
yarn.lock
36
yarn.lock
@ -4829,7 +4829,7 @@ debug@^3.1.0, debug@^3.2.7:
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debuglog@*, debuglog@^1.0.1:
|
||||
debuglog@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmmirror.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
|
||||
integrity sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==
|
||||
@ -7539,7 +7539,7 @@ import-local@^2.0.0:
|
||||
pkg-dir "^3.0.0"
|
||||
resolve-cwd "^2.0.0"
|
||||
|
||||
imurmurhash@*, imurmurhash@^0.1.4:
|
||||
imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
|
||||
integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
|
||||
@ -8842,11 +8842,6 @@ lodash-es@^4.17.15:
|
||||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
|
||||
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
|
||||
|
||||
lodash._baseindexof@*:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npmmirror.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
|
||||
integrity sha512-bSYo8Pc/f0qAkr8fPJydpJjtrHiSynYfYBjtANIgXv5xEf1WlTC63dIDlgu0s9dmTvzRu1+JJTxcIAHe+sH0FQ==
|
||||
|
||||
lodash._baseuniq@~4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.npmmirror.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
|
||||
@ -8855,33 +8850,11 @@ lodash._baseuniq@~4.6.0:
|
||||
lodash._createset "~4.0.0"
|
||||
lodash._root "~3.0.0"
|
||||
|
||||
lodash._bindcallback@*:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.npmmirror.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
|
||||
integrity sha512-2wlI0JRAGX8WEf4Gm1p/mv/SZ+jLijpj0jyaE/AXeuQphzCgD8ZQW4oSpoN8JAopujOFGU3KMuq7qfHBWlGpjQ==
|
||||
|
||||
lodash._cacheindexof@*:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.npmmirror.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
|
||||
integrity sha512-S8dUjWr7SUT/X6TBIQ/OYoCHo1Stu1ZRy6uMUSKqzFnZp5G5RyQizSm6kvxD2Ewyy6AVfMg4AToeZzKfF99T5w==
|
||||
|
||||
lodash._createcache@*:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.npmmirror.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
|
||||
integrity sha512-ev5SP+iFpZOugyab/DEUQxUeZP5qyciVTlgQ1f4Vlw7VUcCD8fVnyIqVUEIaoFH9zjAqdgi69KiofzvVmda/ZQ==
|
||||
dependencies:
|
||||
lodash._getnative "^3.0.0"
|
||||
|
||||
lodash._createset@~4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.npmmirror.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
|
||||
integrity sha512-GTkC6YMprrJZCYU3zcqZj+jkXkrXzq3IPBcF/fIPpNEAB4hZEtXU8zp/RwKOvZl43NUmwDbyRk3+ZTbeRdEBXA==
|
||||
|
||||
lodash._getnative@*, lodash._getnative@^3.0.0:
|
||||
version "3.9.1"
|
||||
resolved "https://registry.npmmirror.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
|
||||
integrity sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==
|
||||
|
||||
lodash._root@~3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.npmmirror.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
|
||||
@ -8937,11 +8910,6 @@ lodash.pick@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
|
||||
integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==
|
||||
|
||||
lodash.restparam@*:
|
||||
version "3.6.1"
|
||||
resolved "https://registry.npmmirror.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
|
||||
integrity sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==
|
||||
|
||||
lodash.throttle@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
|
||||
|
Loading…
x
Reference in New Issue
Block a user