Merge pull request #494 from ciderapp/themes-fix-linux
Fix linux themes
This commit is contained in:
commit
c8f99d5ad7
2 changed files with 4 additions and 3 deletions
|
@ -251,7 +251,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;
|
||||||
const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme);
|
const themePath = join(utils.getPath('srcPath'), "./renderer/themes/", theme);
|
||||||
const userThemePath = join(utils.getPath('themes'), theme);
|
const userThemePath = join(utils.getPath('themes'), theme);
|
||||||
if (existsSync(userThemePath)) {
|
if (existsSync(userThemePath)) {
|
||||||
|
@ -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