mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-29 22:39:45 +08:00
Compare commits
9 Commits
v4.2.1
...
2053491782
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2053491782 | ||
|
|
e128d01b81 | ||
|
|
c3bc0bdb9e | ||
|
|
f1f4e62177 | ||
|
|
c07d4bae55 | ||
|
|
c78dd9c4b6 | ||
|
|
2dd4ed10cc | ||
|
|
70ce3dd037 | ||
|
|
472879f9b2 |
2
.npmrc
2
.npmrc
@@ -1 +1 @@
|
|||||||
electron_mirror=https://npm.taobao.org/mirrors/electron/
|
electron_mirror=https://npmmirror.com/mirrors/electron/
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ Those who are interested in this project or want to exchange and learn can scan
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
<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="Featured|HelloGitHub" 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>
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export default {
|
|||||||
changeLang: 'Change Language',
|
changeLang: 'Change Language',
|
||||||
cn: '简体中文',
|
cn: '简体中文',
|
||||||
en: 'English',
|
en: 'English',
|
||||||
|
history: 'keywords search history',
|
||||||
},
|
},
|
||||||
global: {
|
global: {
|
||||||
title: 'Global Shortcut Key',
|
title: 'Global Shortcut Key',
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ export default {
|
|||||||
changeLang: '切换语言',
|
changeLang: '切换语言',
|
||||||
cn: '简体中文',
|
cn: '简体中文',
|
||||||
en: 'English',
|
en: 'English',
|
||||||
|
history: '关键词搜索记录',
|
||||||
},
|
},
|
||||||
global: {
|
global: {
|
||||||
title: '全局快捷键',
|
title: '全局快捷键',
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ const searchValue = computed(() => store.state.searchValue);
|
|||||||
|
|
||||||
const result = computed(() => {
|
const result = computed(() => {
|
||||||
if (searchValue.value.trim().length > 0) {
|
if (searchValue.value.trim().length > 0) {
|
||||||
const pattern = new RegExp(searchValue.value);
|
const pattern = new RegExp(searchValue.value.toLowerCase());
|
||||||
return totalPlugins.value.filter((plugin) => {
|
return totalPlugins.value.filter((plugin) => {
|
||||||
if (plugin.pluginName.match(pattern)) {
|
if (plugin.pluginName.toLowerCase().match(pattern)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -119,6 +119,16 @@
|
|||||||
:un-checked-children="$t('feature.settings.basic.off')"
|
:un-checked-children="$t('feature.settings.basic.off')"
|
||||||
></a-switch>
|
></a-switch>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="settings-item-li">
|
||||||
|
<div class="label">
|
||||||
|
{{ $t('feature.settings.basic.history') }}
|
||||||
|
</div>
|
||||||
|
<a-switch
|
||||||
|
v-model:checked="common.history"
|
||||||
|
:checked-children="$t('feature.settings.basic.on')"
|
||||||
|
:un-checked-children="$t('feature.settings.basic.off')"
|
||||||
|
></a-switch>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<div class="title">{{ $t('feature.settings.basic.theme') }}</div>
|
<div class="title">{{ $t('feature.settings.basic.theme') }}</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rubick",
|
"name": "rubick",
|
||||||
"version": "4.2.1",
|
"version": "4.2.4",
|
||||||
"author": "muwoo <2424880409@qq.com>",
|
"author": "muwoo <2424880409@qq.com>",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 131 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 15 KiB |
BIN
public/logo.png
BIN
public/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 131 KiB |
@@ -1,5 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
version: 6,
|
version: 7,
|
||||||
perf: {
|
perf: {
|
||||||
custom: {
|
custom: {
|
||||||
theme: 'SPRING',
|
theme: 'SPRING',
|
||||||
@@ -25,6 +25,7 @@ export default {
|
|||||||
autoPast: false,
|
autoPast: false,
|
||||||
darkMode: false,
|
darkMode: false,
|
||||||
guide: false,
|
guide: false,
|
||||||
|
history: true,
|
||||||
lang: 'zh-CN',
|
lang: 'zh-CN',
|
||||||
},
|
},
|
||||||
local: {
|
local: {
|
||||||
|
|||||||
@@ -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: '拉比克',
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import useDrag from '../common/utils/dragWindow';
|
|||||||
import { getGlobal } from '@electron/remote';
|
import { getGlobal } from '@electron/remote';
|
||||||
import { PLUGIN_HISTORY } from '@/common/constans/renderer';
|
import { PLUGIN_HISTORY } from '@/common/constans/renderer';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
import localConfig from './confOp';
|
||||||
|
|
||||||
const { onMouseDown } = useDrag();
|
const { onMouseDown } = useDrag();
|
||||||
const remote = window.require('@electron/remote');
|
const remote = window.require('@electron/remote');
|
||||||
@@ -74,6 +75,8 @@ initPlugins();
|
|||||||
const currentSelect = ref(0);
|
const currentSelect = ref(0);
|
||||||
const menuPluginInfo: any = ref({});
|
const menuPluginInfo: any = ref({});
|
||||||
|
|
||||||
|
const config: any = ref(localConfig.getConfig());
|
||||||
|
|
||||||
getPluginInfo({
|
getPluginInfo({
|
||||||
pluginName: 'feature',
|
pluginName: 'feature',
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
@@ -91,7 +94,7 @@ watch(
|
|||||||
window.rubick.setExpendHeight(
|
window.rubick.setExpendHeight(
|
||||||
getWindowHeight(
|
getWindowHeight(
|
||||||
options.value,
|
options.value,
|
||||||
pluginLoading.value ? [] : pluginHistory.value
|
(pluginLoading.value || !config.value.perf.common.history) ? [] : pluginHistory.value
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="!currentPlugin.name" class="options">
|
<div v-show="!currentPlugin.name && config.perf.common.history" class="options">
|
||||||
<div
|
<div
|
||||||
class="history-plugins"
|
class="history-plugins"
|
||||||
v-if="!options.length || !(searchValue || !!clipboardFile.length)"
|
v-if="!options.length || !(searchValue || !!clipboardFile.length)"
|
||||||
@@ -44,12 +44,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {defineEmits, defineProps, reactive, toRaw, watch} from 'vue';
|
import { defineEmits, defineProps, reactive, ref, toRaw, watch } from 'vue';
|
||||||
|
import localConfig from '../confOp';
|
||||||
|
|
||||||
const path = window.require('path');
|
const path = window.require('path');
|
||||||
const remote = window.require('@electron/remote');
|
const remote = window.require('@electron/remote');
|
||||||
|
|
||||||
declare const __static: string;
|
declare const __static: string;
|
||||||
|
|
||||||
|
const config: any = ref(localConfig.getConfig());
|
||||||
|
|
||||||
const props: any = defineProps({
|
const props: any = defineProps({
|
||||||
searchValue: {
|
searchValue: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ const emit = defineEmits([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const keydownEvent = (e, key: string) => {
|
const keydownEvent = (e, key: string) => {
|
||||||
|
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');
|
||||||
@@ -125,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:
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user