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/buttons/changesort.js

10 lines
388 B

const refresh = require('../fileview/refresh');
const modes = ['Name', 'Date', 'Size', 'Type'];
module.exports = (mode) => {
window.kade.sort = mode || window.kade.sort === 'Type' ? 'Name' : modes[modes.indexOf(window.kade.sort) + 1];
let sb = document.getElementById('sort-button');
sb.innerHTML = `Sort by: ${window.kade.sort}`;
refresh(window.kade.cpath);
};