mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-10 13:20:28 +08:00
Merge remote-tracking branch 'origin/rubick-2.0'
This commit is contained in:
commit
bcd89ec3c3
@ -104,18 +104,10 @@ const touchBar = new TouchBar({
|
||||
]
|
||||
})
|
||||
|
||||
let intervalObj;
|
||||
|
||||
const start = (window) => {
|
||||
window.on('blur', () => {
|
||||
clearInterval(intervalObj);
|
||||
});
|
||||
window.on('focus', () => {
|
||||
intervalObj = setInterval(() => {
|
||||
updateData();
|
||||
}, 1000);
|
||||
updateData();
|
||||
});
|
||||
updateData();
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -47,7 +47,7 @@ function fileDisplay(filePath){
|
||||
const appName = filename.split('.')[0];
|
||||
const keyWords = [appName];
|
||||
const appDetail = shell.readShortcutLink(filedir);
|
||||
if (!appDetail.target) return;
|
||||
if (!appDetail.target || appDetail.target.toLowerCase().indexOf('unin') >= 0) return;
|
||||
|
||||
if (isZhRegex.test(appName)) {
|
||||
const py = translate(appName);
|
||||
|
@ -225,10 +225,12 @@ window.rubick = {
|
||||
isDarkColors() {
|
||||
return false;
|
||||
},
|
||||
features: [],
|
||||
getFeatures() {
|
||||
ipcRenderer.sendToHost('getFeatures');
|
||||
return new Promise(resolve => {
|
||||
ipcRenderer.on(`msg-back-getFeatures`, (e, result) => {
|
||||
rubick.features = result;
|
||||
resolve(result);
|
||||
});
|
||||
});
|
||||
@ -239,6 +241,7 @@ window.rubick = {
|
||||
|
||||
removeFeature(code) {
|
||||
ipcRenderer.sendToHost('removeFeature', {code});
|
||||
return !!rubick.features.filter(fe => fe.code === code).length;
|
||||
},
|
||||
// 系统
|
||||
shellOpenExternal(url) {
|
||||
@ -253,6 +256,10 @@ window.rubick = {
|
||||
return os.type() === 'Windows_NT';
|
||||
},
|
||||
|
||||
isLinux() {
|
||||
return os.type() === 'Linux';
|
||||
},
|
||||
|
||||
shellOpenPath(path) {
|
||||
shell.openPath(path)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user