Compare commits

...

7 Commits

Author SHA1 Message Date
muwoo
2053491782 Update README.md 2024-06-14 19:49:24 +08:00
muwoo
e128d01b81 Merge pull request #184 from qidian99/master
Fix regex match error
2024-06-12 13:52:04 +08:00
木偶
c3bc0bdb9e fix: #352 2024-05-28 20:13:10 +08:00
木偶
f1f4e62177 fix: #352 2024-05-28 20:12:38 +08:00
wangwei1240
c07d4bae55 fix: 更新版本 2024-05-16 20:14:41 +08:00
wangwei1240
c78dd9c4b6 fix: 修复 #364 2024-05-16 20:13:45 +08:00
Dian Qi
472879f9b2 Fix format regex error that will match all inputs 2023-06-04 20:30:06 +08:00
6 changed files with 11 additions and 5 deletions

View File

@@ -109,6 +109,8 @@ Those who are interested in this project or want to exchange and learn can scan
![image](https://user-images.githubusercontent.com/21073039/127327603-9796f246-ee4b-4950-a69d-ce3205ec9569.png) ![image](https://user-images.githubusercontent.com/21073039/127327603-9796f246-ee4b-4950-a69d-ce3205ec9569.png)
<a href="https://hellogithub.com/repository/0a3e2484b44e481e9dcf1850e45193cd" target="_blank"><img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=0a3e2484b44e481e9dcf1850e45193cd&claim_uid=vXGwjpmYNsBex0C" alt="FeaturedHelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" /></a>
## Contribute ## Contribute
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/rubickCenter/rubick/graphs/contributors)]. <a href="https://github.com/rubickCenter/rubick/graphs/contributors"><img src="https://opencollective.com/rubick/contributors.svg?width=890&button=false" /></a> This project exists thanks to all the people who contribute. [[Contribute](https://github.com/rubickCenter/rubick/graphs/contributors)]. <a href="https://github.com/rubickCenter/rubick/graphs/contributors"><img src="https://opencollective.com/rubick/contributors.svg?width=890&button=false" /></a>

View File

@@ -1,6 +1,6 @@
{ {
"name": "rubick", "name": "rubick",
"version": "4.2.2", "version": "4.2.4",
"author": "muwoo <2424880409@qq.com>", "author": "muwoo <2424880409@qq.com>",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@@ -25,7 +25,7 @@ export default () => {
height: WINDOW_HEIGHT, height: WINDOW_HEIGHT,
minHeight: WINDOW_MIN_HEIGHT, minHeight: WINDOW_MIN_HEIGHT,
useContentSize: true, useContentSize: true,
resizable: true, resizable: false,
width: WINDOW_WIDTH, width: WINDOW_WIDTH,
frame: false, frame: false,
title: '拉比克', title: '拉比克',

View File

@@ -96,7 +96,7 @@ const emit = defineEmits([
]); ]);
const keydownEvent = (e, key: string) => { const keydownEvent = (e, key: string) => {
e.preventDefault(); key !== 'space' && e.preventDefault();
const { ctrlKey, shiftKey, altKey, metaKey } = e; const { ctrlKey, shiftKey, altKey, metaKey } = e;
const modifiers: Array<string> = []; const modifiers: Array<string> = [];
ctrlKey && modifiers.push('control'); ctrlKey && modifiers.push('control');
@@ -126,6 +126,7 @@ const keydownEvent = (e, key: string) => {
break; break;
case 'space': case 'space':
if (runPluginDisable || !config.value.perf.common.space) return; if (runPluginDisable || !config.value.perf.common.space) return;
e.preventDefault();
emit('choosePlugin'); emit('choosePlugin');
break; break;
default: default:

View File

@@ -77,6 +77,10 @@ const createPluginManager = (): any => {
}; };
const openPlugin = async (plugin, option) => { const openPlugin = async (plugin, option) => {
ipcRenderer.send('msg-trigger', {
type: 'removePlugin',
});
window.initRubick();
if (plugin.pluginType === 'ui' || plugin.pluginType === 'system') { if (plugin.pluginType === 'ui' || plugin.pluginType === 'system') {
if (state.currentPlugin && state.currentPlugin.name === plugin.name) { if (state.currentPlugin && state.currentPlugin.name === plugin.name) {
window.rubick.showMainWindow(); window.rubick.showMainWindow();
@@ -103,7 +107,6 @@ const createPluginManager = (): any => {
message.error('启动应用出错,请确保启动应用存在!'); message.error('启动应用出错,请确保启动应用存在!');
} }
} }
window.initRubick();
changePluginHistory({ changePluginHistory({
...plugin, ...plugin,
...option, ...option,

View File

@@ -8,7 +8,7 @@ import useFocus from './clipboardWatch';
function formatReg(regStr) { function formatReg(regStr) {
const flags = regStr.replace(/.*\/([gimy]*)$/, '$1'); const flags = regStr.replace(/.*\/([gimy]*)$/, '$1');
const pattern = flags.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1'); const pattern = regStr.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
return new RegExp(pattern, flags); return new RegExp(pattern, flags);
} }