fix themes for linux
This commit is contained in:
parent
c0f2bc36e0
commit
4b48917c37
2 changed files with 3 additions and 2 deletions
|
@ -264,7 +264,7 @@ export class BrowserWindow {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/themes/:theme/*", (req, res) => {
|
app.get("/themes/:theme/*", (req, res) => {
|
||||||
const theme = req.params.theme.toLowerCase();
|
const theme = req.params.theme;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const file = req.params[0];
|
const file = req.params[0];
|
||||||
const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme);
|
const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme);
|
||||||
|
@ -283,6 +283,7 @@ export class BrowserWindow {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const file = req.params[0];
|
const file = req.params[0];
|
||||||
const pluginPath = join(utils.getPath('plugins'), plugin);
|
const pluginPath = join(utils.getPath('plugins'), plugin);
|
||||||
|
console.log(pluginPath)
|
||||||
if (existsSync(pluginPath)) {
|
if (existsSync(pluginPath)) {
|
||||||
res.sendFile(join(pluginPath, file));
|
res.sendFile(join(pluginPath, file));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {utils} from './utils';
|
||||||
|
|
||||||
export class Plugins {
|
export class Plugins {
|
||||||
private basePluginsPath = path.join(__dirname, '../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 = {};
|
private readonly pluginsList: any = {};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue