mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-18 17:56:55 +08:00
feat: 支持 windows 搜索系统应用:#39
This commit is contained in:
parent
de138955b5
commit
153d9dc5d7
@ -17,7 +17,7 @@ const getico = apps =>{
|
|||||||
if (!exists) {
|
if (!exists) {
|
||||||
fs.writeFile(iconpath, data.Base64ImageData, "base64", err => {
|
fs.writeFile(iconpath, data.Base64ImageData, "base64", err => {
|
||||||
if (err) { console.log(err); }
|
if (err) { console.log(err); }
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -60,7 +60,7 @@ const getWinAppList = () => {
|
|||||||
for (var app of apps) {
|
for (var app of apps) {
|
||||||
const dict = {}
|
const dict = {}
|
||||||
let lines = app.split('\r\n')
|
let lines = app.split('\r\n')
|
||||||
for (var line of lines) {
|
for (const line of lines) {
|
||||||
if (line) {
|
if (line) {
|
||||||
const key = line.split(/\s+:\s*/)[0];
|
const key = line.split(/\s+:\s*/)[0];
|
||||||
const value = line.split(/\s+:\s*/)[1];
|
const value = line.split(/\s+:\s*/)[1];
|
||||||
@ -71,6 +71,7 @@ const getWinAppList = () => {
|
|||||||
dict.LegalName = dict.DisplayName.replace(/[\\\/\:\*\?\"\<\>\|]/g, "");
|
dict.LegalName = dict.DisplayName.replace(/[\\\/\:\*\?\"\<\>\|]/g, "");
|
||||||
dict.Icon = path.join(os.tmpdir(), 'ProcessIcon', `${encodeURIComponent(dict.LegalName)}.png`);
|
dict.Icon = path.join(os.tmpdir(), 'ProcessIcon', `${encodeURIComponent(dict.LegalName)}.png`);
|
||||||
fileLists.push({
|
fileLists.push({
|
||||||
|
...dict,
|
||||||
value: 'plugin',
|
value: 'plugin',
|
||||||
icon: dict.Icon,
|
icon: dict.Icon,
|
||||||
desc: dict.DisplayIcon,
|
desc: dict.DisplayIcon,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user