An electron-based WIP aesthetic file explorer ^^
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
FileKade/scripts/fileview/refresh.js

28 lines
1016 B

const loadDir = require('./load/loaddir');
const headers = require('../../json/headers.json');
module.exports = (newPath) => {
document.getElementById('files').remove();
let files = document.createElement('div');
files.className = 'files';
files.setAttribute('id', 'files');
document.getElementById('container').appendChild(files);
let fh = document.createElement('div');
fh.className = 'file-header';
fh.setAttribute('id', 'file-header');
files.appendChild(fh);
Object.keys(headers).forEach(k => {
let temp = document.createElement('p');
temp.innerHTML = k;
temp.style = `flex-basis: ${headers[k]}%;`;
temp.className = 'nosel';
fh.appendChild(temp);
});
document.getElementById('header-nav').remove();
let nav = document.createElement('div');
nav.setAttribute('id', 'header-nav');
document.getElementById('controls').appendChild(nav);
window.scrollTo(0, 0);
loadDir(newPath);
};