Skip to content

Commit

Permalink
🐛 修复 #338, #345, #340
Browse files Browse the repository at this point in the history
  • Loading branch information
muwoo committed Feb 20, 2024
1 parent a0644c0 commit 70ce3dd
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 7 deletions.
1 change: 1 addition & 0 deletions feature/src/languages/langs/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default {
changeLang: 'Change Language',
cn: '简体中文',
en: 'English',
history: 'keywords search history',
},
global: {
title: 'Global Shortcut Key',
Expand Down
1 change: 1 addition & 0 deletions feature/src/languages/langs/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default {
changeLang: '切换语言',
cn: '简体中文',
en: 'English',
history: '关键词搜索记录',
},
global: {
title: '全局快捷键',
Expand Down
4 changes: 2 additions & 2 deletions feature/src/views/market/components/result.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const searchValue = computed(() => store.state.searchValue);
const result = computed(() => {
if (searchValue.value.trim().length > 0) {
const pattern = new RegExp(searchValue.value);
const pattern = new RegExp(searchValue.value.toLowerCase());
return totalPlugins.value.filter((plugin) => {
if (plugin.pluginName.match(pattern)) {
if (plugin.pluginName.toLowerCase().match(pattern)) {
return true;
} else {
return false;
Expand Down
10 changes: 10 additions & 0 deletions feature/src/views/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@
:un-checked-children="$t('feature.settings.basic.off')"
></a-switch>
</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 class="setting-item">
<div class="title">{{ $t('feature.settings.basic.theme') }}</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubick",
"version": "4.2.1",
"version": "4.2.2",
"author": "muwoo <[email protected]>",
"private": true,
"scripts": {
Expand Down
Binary file modified public/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/icon.ico
Binary file not shown.
Binary file modified public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/common/constans/defaultConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
version: 6,
version: 7,
perf: {
custom: {
theme: 'SPRING',
Expand All @@ -25,6 +25,7 @@ export default {
autoPast: false,
darkMode: false,
guide: false,
history: true,
lang: 'zh-CN',
},
local: {
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import useDrag from '../common/utils/dragWindow';
import { getGlobal } from '@electron/remote';
import { PLUGIN_HISTORY } from '@/common/constans/renderer';
import { message } from 'ant-design-vue';
import localConfig from './confOp';
const { onMouseDown } = useDrag();
const remote = window.require('@electron/remote');
Expand Down Expand Up @@ -74,6 +75,8 @@ initPlugins();
const currentSelect = ref(0);
const menuPluginInfo: any = ref({});
const config: any = ref(localConfig.getConfig());
getPluginInfo({
pluginName: 'feature',
// eslint-disable-next-line no-undef
Expand All @@ -91,7 +94,7 @@ watch(
window.rubick.setExpendHeight(
getWindowHeight(
options.value,
pluginLoading.value ? [] : pluginHistory.value
(pluginLoading.value || !config.value.perf.common.history) ? [] : pluginHistory.value
)
);
},
Expand Down
8 changes: 6 additions & 2 deletions src/renderer/components/result.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-show="!currentPlugin.name" class="options">
<div v-show="!currentPlugin.name && config.perf.common.history" class="options">
<div
class="history-plugins"
v-if="!options.length || !(searchValue || !!clipboardFile.length)"
Expand Down Expand Up @@ -44,12 +44,16 @@
</template>

<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 remote = window.require('@electron/remote');
declare const __static: string;
const config: any = ref(localConfig.getConfig());
const props: any = defineProps({
searchValue: {
type: [String, Number],
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const emit = defineEmits([
]);
const keydownEvent = (e, key: string) => {
e.preventDefault();
const { ctrlKey, shiftKey, altKey, metaKey } = e;
const modifiers: Array<string> = [];
ctrlKey && modifiers.push('control');
Expand Down

0 comments on commit 70ce3dd

Please sign in to comment.