mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-19 18:42:43 +08:00
Merge branch 'master' of https://github.com/rubickCenter/rubick
This commit is contained in:
commit
78ea2ac576
@ -54,6 +54,8 @@ Based on electron open source toolbox, free integration of rich plug-ins, to cre
|
||||
|
||||
## Docs
|
||||
|
||||
[Rubick website](https://rubick.vip)
|
||||
|
||||
[Rubick Docs](https://rubickCenter.github.io/rubick/)
|
||||
|
||||
|
||||
|
@ -54,6 +54,8 @@
|
||||
|
||||
## 使用文档
|
||||
|
||||
[Rubick 官网](https://rubick.vip)
|
||||
|
||||
[Rubick Docs](https://rubickCenter.github.io/rubick/)
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
"pluginName": "rubick 系统菜单",
|
||||
"description": "rubick 系统菜单",
|
||||
"main": "index.html",
|
||||
"logo": "https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/acb761082f4a4b46847e7cd8b180f63c~tplv-k3u1fbpfcp-watermark.image",
|
||||
"logo": "https://pic1.zhimg.com/80/v2-c09780808301668a82e6646cb42f0806_720w.png",
|
||||
"version": "0.0.0",
|
||||
"preload":"preload.js",
|
||||
"pluginType": "ui",
|
||||
|
@ -20,12 +20,12 @@
|
||||
</template>
|
||||
{{ $t('feature.settings.global.title') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="superpanel">
|
||||
<template #icon>
|
||||
<FileAddOutlined />
|
||||
</template>
|
||||
{{ $t('feature.settings.superPanel.title') }}
|
||||
</a-menu-item>
|
||||
<!-- <a-menu-item key="superpanel">-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <FileAddOutlined />-->
|
||||
<!-- </template>-->
|
||||
<!-- {{ $t('feature.settings.superPanel.title') }}-->
|
||||
<!-- </a-menu-item>-->
|
||||
<a-menu-item key="localhost">
|
||||
<template #icon>
|
||||
<DatabaseOutlined />
|
||||
|
@ -80,7 +80,7 @@ const layout = {
|
||||
|
||||
const resetForm = () => {
|
||||
formState.value = {
|
||||
register: 'https://registry.npm.taobao.org',
|
||||
register: 'https://registry.npmmirror.com',
|
||||
database: 'https://gitcode.net/rubickcenter/rubick-database/-/raw/master',
|
||||
access_token: '',
|
||||
};
|
||||
|
@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<div class="user-info">
|
||||
<div class="info-container">
|
||||
<a-result
|
||||
class="user-info-result"
|
||||
:title="userInfo.name || $t('feature.settings.account.tips1')"
|
||||
:sub-title="$t('feature.settings.account.tips2')"
|
||||
>
|
||||
<template #icon>
|
||||
<a-avatar :size="64" v-if="!userInfo.avatar">
|
||||
<template #icon><UserOutlined /></template>
|
||||
</a-avatar>
|
||||
<a-avatar :src="userInfo.avatar" :size="64" v-else />
|
||||
</template>
|
||||
</a-result>
|
||||
</div>
|
||||
<!-- <div class="info-container">-->
|
||||
<!-- <a-result-->
|
||||
<!-- class="user-info-result"-->
|
||||
<!-- :title="userInfo.name || $t('feature.settings.account.tips1')"-->
|
||||
<!-- :sub-title="$t('feature.settings.account.tips2')"-->
|
||||
<!-- >-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <a-avatar :size="64" v-if="!userInfo.avatar">-->
|
||||
<!-- <template #icon><UserOutlined /></template>-->
|
||||
<!-- </a-avatar>-->
|
||||
<!-- <a-avatar :src="userInfo.avatar" :size="64" v-else />-->
|
||||
<!-- </template>-->
|
||||
<!-- </a-result>-->
|
||||
<!-- </div>-->
|
||||
<div class="settings-container">
|
||||
<div class="setting-item">
|
||||
<div class="title">
|
||||
@ -151,9 +151,9 @@ state.custom = perf.custom || {};
|
||||
|
||||
const userInfo = ref(window.rubick.dbStorage.getItem('rubick-user-info'));
|
||||
|
||||
service.getUserInfo({ openId: userInfo.value.openId }).then((res) => {
|
||||
userInfo.value = res;
|
||||
});
|
||||
// service.getUserInfo({ openId: userInfo.value.openId }).then((res) => {
|
||||
// userInfo.value = res;
|
||||
// });
|
||||
|
||||
const setConfig = debounce(() => {
|
||||
remote.getGlobal('OP_CONFIG').set(
|
||||
|
@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<div class="account">
|
||||
<a-result
|
||||
v-if="!userInfo"
|
||||
title="请先登录"
|
||||
sub-title="登录后可开启用户个性化设置"
|
||||
>
|
||||
<template #extra>
|
||||
<a-button @click="showModal" type="primary">
|
||||
使用微信小程序登录
|
||||
</a-button>
|
||||
</template>
|
||||
</a-result>
|
||||
<Index v-else />
|
||||
<!-- todo 暂时先去掉登录,等小程序做好了再加回来吧 -->
|
||||
<!-- <a-result-->
|
||||
<!-- v-if="!userInfo"-->
|
||||
<!-- title="请先登录"-->
|
||||
<!-- sub-title="登录后可开启用户个性化设置"-->
|
||||
<!-- >-->
|
||||
<!-- <template #extra>-->
|
||||
<!-- <a-button @click="showModal" type="primary">-->
|
||||
<!-- 使用微信小程序登录-->
|
||||
<!-- </a-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </a-result>-->
|
||||
<Index />
|
||||
<a-modal :footer="null" v-model:visible="visible">
|
||||
<a-result
|
||||
title="请使用微信扫码登录!"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick",
|
||||
"version": "2.4.1",
|
||||
"version": "2.4.5",
|
||||
"author": "muwoo <2424880409@qq.com>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -30,6 +30,7 @@
|
||||
"get-mac-apps": "^1.0.2",
|
||||
"got": "^11.8.3",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"node-key-sender": "^1.0.11",
|
||||
"pouchdb": "^7.2.2",
|
||||
"vue": "^3.0.0",
|
||||
"vue-router": "^4.0.0-0",
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
public/ScreenCapture.exe
Normal file
BIN
public/ScreenCapture.exe
Normal file
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
"pluginName": "rubick 系统菜单",
|
||||
"description": "rubick 系统菜单",
|
||||
"main": "index.html",
|
||||
"logo": "https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/acb761082f4a4b46847e7cd8b180f63c~tplv-k3u1fbpfcp-watermark.image",
|
||||
"logo": "https://pic1.zhimg.com/80/v2-c09780808301668a82e6646cb42f0806_720w.png",
|
||||
"version": "0.0.0",
|
||||
"preload":"preload.js",
|
||||
"pluginType": "ui",
|
||||
|
@ -162,8 +162,16 @@ window.rubick = {
|
||||
shellBeep: () => {
|
||||
ipcSend('shellBeep');
|
||||
},
|
||||
|
||||
|
||||
getFileIcon: (path) => {
|
||||
return ipcSendSync('getFileIcon', { path });
|
||||
},
|
||||
|
||||
getCopyedFiles: () => {
|
||||
return ipcSendSync('getCopyFiles');
|
||||
},
|
||||
|
||||
simulateKeyboardTap: (key, ...modifier) => {
|
||||
ipcSend('simulateKeyboardTap', { key, modifier });
|
||||
},
|
||||
};
|
||||
|
@ -52,7 +52,7 @@ class AdapterHandler {
|
||||
} catch (e) {
|
||||
// ignore
|
||||
}
|
||||
this.registry = register || 'https://registry.npm.taobao.org';
|
||||
this.registry = register || 'https://registry.npmmirror.com/';
|
||||
}
|
||||
|
||||
async upgrade(name: string): Promise<void> {
|
||||
@ -150,27 +150,21 @@ class AdapterHandler {
|
||||
}
|
||||
return adapters;
|
||||
}
|
||||
private cleanCache() {
|
||||
spawn('npm', ['cache', 'clean', '-f'], {
|
||||
cwd: this.baseDir,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行包管理器
|
||||
* @memberof AdapterHandler
|
||||
*/
|
||||
private async execCommand(cmd: string, modules: string[]): Promise<string> {
|
||||
this.cleanCache();
|
||||
return new Promise((resolve: any, reject: any) => {
|
||||
let args: string[] = [cmd]
|
||||
const args: string[] = [cmd]
|
||||
.concat(
|
||||
cmd !== 'uninstall' ? modules.map((m) => `${m}@latest`) : modules
|
||||
)
|
||||
.concat('--color=always')
|
||||
.concat('--save');
|
||||
if (cmd !== 'uninstall')
|
||||
args = args.concat(`--registry=${this.registry}`);
|
||||
.concat('--save')
|
||||
.concat(`--registry=${this.registry}`);
|
||||
|
||||
const npm = spawn('npm', args, {
|
||||
cwd: this.baseDir,
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ import path from 'path';
|
||||
|
||||
// 截图方法windows
|
||||
export const screenWindow = (cb) => {
|
||||
const url = path.resolve(__static, 'PrintScr.exe');
|
||||
const url = path.resolve(__static, 'ScreenCapture.exe');
|
||||
const screen_window = execFile(url);
|
||||
screen_window.on('exit', (code) => {
|
||||
if (code) {
|
||||
|
@ -13,7 +13,11 @@ import { runner, detach } from '../browsers';
|
||||
import fs from 'fs';
|
||||
import { LocalDb, screenCapture } from '@/core';
|
||||
import plist from 'plist';
|
||||
import ks from 'node-key-sender';
|
||||
|
||||
import { DECODE_KEY } from '@/common/constans/main';
|
||||
import getCopyFiles from '@/common/utils/getCopyFiles';
|
||||
|
||||
import mainInstance from '../index';
|
||||
const runnerInstance = runner();
|
||||
const detachInstance = detach();
|
||||
@ -324,6 +328,20 @@ class API {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public getCopyFiles() {
|
||||
return getCopyFiles();
|
||||
}
|
||||
|
||||
public simulateKeyboardTap({ data: { key, modifier } }) {
|
||||
let keys = [key.toLowerCase()];
|
||||
if (modifier && Array.isArray(modifier) && modifier.length > 0) {
|
||||
keys = modifier.concat(keys);
|
||||
ks.sendCombination(keys);
|
||||
} else {
|
||||
ks.sendKeys(keys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default new API();
|
||||
|
@ -8070,6 +8070,11 @@ node-gyp-build@~4.1.0:
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.1.1.tgz#d7270b5d86717068d114cc57fff352f96d745feb"
|
||||
integrity sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==
|
||||
|
||||
node-key-sender@^1.0.11:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.npmmirror.com/node-key-sender/-/node-key-sender-1.0.11.tgz#93210f07163607d8daf2874f1a29567d0acdb94c"
|
||||
integrity sha512-vv2IXd8QdZBFYXaIy02uy2rK6EKj+tOTEuoTxJKS9l8zw8Cz6DeLffR8ompj7N2A3h6XK7aiy+YAcTaeOqwp2Q==
|
||||
|
||||
node-libs-browser@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425"
|
||||
|
Loading…
x
Reference in New Issue
Block a user