mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-29 00:11:28 +00:00
20 lines
506 B
JavaScript
20 lines
506 B
JavaScript
const { readdirSync } = require("fs");
|
|
const { extname } = require("path");
|
|
const { remote } = require("electron");
|
|
|
|
function getThemes() {
|
|
// Themes path
|
|
const themesPath = `${remote.app.getAppPath()}/dist/themes`;
|
|
|
|
// Get all themes / only .css
|
|
const themes = readdirSync(themesPath).filter(function(file) {
|
|
return extname(file) === ".css";
|
|
});
|
|
|
|
// Remove file extension (css)
|
|
return themes.map(function(theme) {
|
|
return theme.replace(".css", "");
|
|
});
|
|
}
|
|
|
|
export default getThemes;
|