fix themes for linux

This commit is contained in:
vapormusic 2022-02-21 18:30:14 +07:00
parent c0f2bc36e0
commit 4b48917c37
2 changed files with 3 additions and 2 deletions

View file

@ -264,7 +264,7 @@ export class BrowserWindow {
});
app.get("/themes/:theme/*", (req, res) => {
const theme = req.params.theme.toLowerCase();
const theme = req.params.theme;
// @ts-ignore
const file = req.params[0];
const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme);
@ -283,6 +283,7 @@ export class BrowserWindow {
// @ts-ignore
const file = req.params[0];
const pluginPath = join(utils.getPath('plugins'), plugin);
console.log(pluginPath)
if (existsSync(pluginPath)) {
res.sendFile(join(pluginPath, file));
} else {

View file

@ -5,7 +5,7 @@ import {utils} from './utils';
export class Plugins {
private basePluginsPath = path.join(__dirname, '../plugins');
private userPluginsPath = path.join(electron.app.getPath('userData'), 'plugins');
private userPluginsPath = path.join(electron.app.getPath('userData'), 'Plugins');
private readonly pluginsList: any = {};
constructor() {