commit
a43921c026
@ -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); |
||||
}); |
||||
}; |
@ -0,0 +1,38 @@ |
||||
#sidebar { |
||||
width: 180px; |
||||
border-right: 1px solid #5d60caaf; |
||||
margin: 26px 0 0 0; |
||||
padding: 0 14px 12px 14px; |
||||
position: fixed; |
||||
z-index: 1; |
||||
overflow-x: hidden; |
||||
top: 0; |
||||
left: 0; |
||||
background-color: #0000006d; |
||||
height: 100%; |
||||
} |
||||
|
||||
#container {margin-left: 200px;} |
||||
|
||||
#favorites-container { |
||||
display: flex; |
||||
flex-direction: column; |
||||
align-items: stretch; |
||||
align-content: flex-start; |
||||
justify-content: flex-start; |
||||
row-gap: 6px; |
||||
} |
||||
|
||||
.favorites-button { |
||||
padding: 4px 6px; |
||||
color: #afafaf; |
||||
border-radius: 3px 3px; |
||||
cursor: pointer; |
||||
transition: padding-left .05s linear; |
||||
} |
||||
|
||||
.favorites-button:hover { |
||||
background-color: #a172a65f; |
||||
padding-left: 10px; |
||||
color: white; |
||||
} |
Loading…
Reference in new issue