parent
bcde3903c4
commit
8ee91f9acb
@ -0,0 +1,23 @@ |
||||
{ |
||||
"default": [ |
||||
{ |
||||
"name": "Desktop", |
||||
"win32": "{r}\\Desktop" |
||||
}, { |
||||
"name": "Documents", |
||||
"win32": "{r}\\Documents" |
||||
}, { |
||||
"name": "Pictures", |
||||
"win32": "{r}\\Pictures" |
||||
}, { |
||||
"name": "Videos", |
||||
"win32": "{r}\\Videos" |
||||
}, { |
||||
"name": "Music", |
||||
"win32": "{r}\\Music" |
||||
}, { |
||||
"name": "Downloads", |
||||
"win32": "{r}\\Downloads" |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,27 @@ |
||||
const refresh = require('../fileview/refresh'); |
||||
|
||||
const qa = require('../../json/qa.json'); |
||||
const os = require("os"); |
||||
|
||||
module.exports = () => { |
||||
let root |
||||
switch (window.kade.platform) { |
||||
case 'win32': |
||||
root = `${os.homedir()}`; |
||||
break; |
||||
case 'linux': |
||||
root = `~/home`; |
||||
break; |
||||
} |
||||
|
||||
let quickAccess = document.getElementById('favorites-container'); |
||||
|
||||
qa.default.forEach(i => { |
||||
let quick = document.createElement('div'); |
||||
quick.innerHTML = i.name; |
||||
quick.onclick = () => {refresh(i[window.kade.platform].replace('{r}', root));}; |
||||
quick.className = 'favorites-button'; |
||||
quick.classList.add('nosel'); |
||||
quickAccess.appendChild(quick); |
||||
}); |
||||
}; |
Loading…
Reference in new issue