mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-08 06:28:20 +08:00
bug fix
This commit is contained in:
parent
02bc5e4bf0
commit
de8f546032
@ -196,15 +196,15 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
|||||||
var index = utools.db.get(code).data;
|
var index = utools.db.get(code).data;
|
||||||
}
|
}
|
||||||
if (type == 'over') {
|
if (type == 'over') {
|
||||||
showList(payload, index, 500)
|
showList(payload, index, 300)
|
||||||
} else {
|
} else {
|
||||||
showList('', index, 500)
|
showList('', index, 300)
|
||||||
}
|
}
|
||||||
// 子输入框
|
// 子输入框
|
||||||
utools.setSubInput(({ text }) => {
|
utools.setSubInput(({ text }) => {
|
||||||
// 列表搜索
|
// 列表搜索
|
||||||
if ($('#manual').is(':hidden')) {
|
if ($('#manual').is(':hidden')) {
|
||||||
showList(text.toUpperCase(), index, 500);
|
showList(text.toUpperCase(), index, 300);
|
||||||
// 高亮结果
|
// 高亮结果
|
||||||
text.split(' ').forEach(keyword => {
|
text.split(' ').forEach(keyword => {
|
||||||
keyword && $(".name,.description").highlight(keyword, 'listFounds');
|
keyword && $(".name,.description").highlight(keyword, 'listFounds');
|
||||||
@ -214,6 +214,12 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
|||||||
highlightManual("#manual", text);
|
highlightManual("#manual", text);
|
||||||
}
|
}
|
||||||
}, '输入名称或功能进行查询');
|
}, '输入名称或功能进行查询');
|
||||||
|
if (type == 'window') {
|
||||||
|
utools.hideMainWindow();
|
||||||
|
copy();
|
||||||
|
utools.showMainWindow();
|
||||||
|
paste();
|
||||||
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
$("#mainlist").html(e);
|
$("#mainlist").html(e);
|
||||||
}
|
}
|
||||||
@ -221,9 +227,10 @@ utools.onPluginEnter( async ({ code, type, payload }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
utools.onPluginOut(() => {
|
utools.onPluginOut(() => {
|
||||||
$("#mainlist").html('');
|
$("#mainlist").html('').hide();
|
||||||
$("#options").html('');
|
$("#options").html('').hide();
|
||||||
$("#manual").html('');
|
$("#manual").html('').hide();
|
||||||
|
$(".load").html('').hide();
|
||||||
$('link[name="manual"]').remove();
|
$('link[name="manual"]').remove();
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -269,7 +276,7 @@ $("#manual").on('mousedown', 'a', function (e) {
|
|||||||
|
|
||||||
// 滚动到边界加载列表
|
// 滚动到边界加载列表
|
||||||
$(document).scroll(() => {
|
$(document).scroll(() => {
|
||||||
loadList(500);
|
loadList(300);
|
||||||
})
|
})
|
||||||
|
|
||||||
// 按键监听
|
// 按键监听
|
||||||
@ -337,7 +344,7 @@ $(document).keydown(e => {
|
|||||||
if(next.offset().top >= $(window).scrollTop() + 550){
|
if(next.offset().top >= $(window).scrollTop() + 550){
|
||||||
$("html").animate({ scrollTop: "+=50" }, 0);
|
$("html").animate({ scrollTop: "+=50" }, 0);
|
||||||
}
|
}
|
||||||
loadList(500);
|
loadList(300);
|
||||||
next.addClass("select");
|
next.addClass("select");
|
||||||
$(".select:first").removeClass("select");
|
$(".select:first").removeClass("select");
|
||||||
// 到达边界闪烁移动选择条
|
// 到达边界闪烁移动选择条
|
||||||
|
@ -49,7 +49,7 @@ showOptions = async () => {
|
|||||||
if (c.code == features.code) {
|
if (c.code == features.code) {
|
||||||
isChecked1 = 'checked';
|
isChecked1 = 'checked';
|
||||||
isDisabled2 = '';
|
isDisabled2 = '';
|
||||||
if (typeof(c.cmds[c.cmds.length - 1]) != 'string') isChecked2 = 'checked';
|
if (c.cmds[c.cmds.length - 1].type == 'over') isChecked2 = 'checked';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -237,7 +237,7 @@ $("#options").on('click', '.saveBtn', async function () {
|
|||||||
"code": code,
|
"code": code,
|
||||||
"explain": desc,
|
"explain": desc,
|
||||||
"cmds": kw,
|
"cmds": kw,
|
||||||
"icon": `${p}/${code}.png`
|
"icon": `logo/${code}.png`
|
||||||
},
|
},
|
||||||
path: p,
|
path: p,
|
||||||
type: 'custom'
|
type: 'custom'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const { clipboard } = require('electron');
|
const { clipboard } = require('electron');
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const robot = require('./robotjs')
|
const robot = utools.robot
|
||||||
|
|
||||||
//-------checkUpdate------
|
//-------checkUpdate------
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
@ -62,6 +62,11 @@ copyTo = text => {
|
|||||||
clipboard.writeText(text)
|
clipboard.writeText(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copy = () => {
|
||||||
|
var ctlKey = isWin ? 'control' : 'command';
|
||||||
|
robot.keyTap('c', ctlKey);
|
||||||
|
}
|
||||||
|
|
||||||
paste = () => {
|
paste = () => {
|
||||||
var ctlKey = isWin ? 'control' : 'command';
|
var ctlKey = isWin ? 'control' : 'command';
|
||||||
robot.keyTap('v', ctlKey);
|
robot.keyTap('v', ctlKey);
|
||||||
|
Binary file not shown.
@ -1,5 +0,0 @@
|
|||||||
if(process.platform==='darwin'){
|
|
||||||
module.exports = require('./darwin/robotjs.node')
|
|
||||||
}else if(process.platform==='win32'){
|
|
||||||
module.exports = require(`./win32/${process.arch}/robotjs.node`)
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user