mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-11 22:14:07 +08:00
bugfix: 修复windows下读取插件preload.js位置问题;
ref:搜索插件不区分大消息
This commit is contained in:
parent
e9fa7b2276
commit
1c893542b9
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick2",
|
||||
"version": "0.0.7-beta.1",
|
||||
"version": "0.0.7-beta.2",
|
||||
"author": "muwoo <2424880409@qq.com>",
|
||||
"description": "An electron-vue project",
|
||||
"license": null,
|
||||
|
@ -305,7 +305,7 @@ export default {
|
||||
|
||||
renderTitle(title) {
|
||||
if (typeof title !== "string") return;
|
||||
const result = title.split(this.searchValue);
|
||||
const result = title.toLowerCase().split(this.searchValue.toLowerCase());
|
||||
if (result && result.length > 1) {
|
||||
return `<div>${result[0]}<span style="color: red">${this.searchValue}</span>${result[1]}</div>`;
|
||||
} else {
|
||||
|
@ -24,8 +24,8 @@ function getWindowHeight(searchList) {
|
||||
|
||||
function searchKeyValues(lists, value) {
|
||||
return lists.filter((item) => {
|
||||
if (typeof item === 'string') return item.indexOf(value) >= 0;
|
||||
return item.type.indexOf(value) >= 0;
|
||||
if (typeof item === 'string') return item.toLowerCase().indexOf(value.toLowerCase()) >= 0;
|
||||
return item.type.toLowerCase().indexOf(value.toLowerCase()) >= 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ function getQueryVariable(variable) {
|
||||
if (location.href.indexOf('targetFile') > -1) {
|
||||
filePath = decodeURIComponent(getQueryVariable('targetFile'));
|
||||
} else {
|
||||
filePath = process.platform === 'win32' ? location.pathname.split(':')[1] : location.pathname.replace('file://', '');
|
||||
filePath = process.platform === 'win32' ? location.pathname.replace('/', '') : location.pathname.replace('file://', '');
|
||||
}
|
||||
const {ipcRenderer, nativeImage, clipboard, remote, shell} = require('electron');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user