mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
small refactorings and fixes
This commit is contained in:
@@ -15,7 +15,7 @@ const appPath = require("../services/app_path");
|
||||
function index(req, res) {
|
||||
const options = optionService.getOptionMap();
|
||||
|
||||
let view = (!utils.isElectron() && req.cookies['trilium-device'] === 'mobile')
|
||||
const view = (!utils.isElectron() && req.cookies['trilium-device'] === 'mobile')
|
||||
? 'mobile'
|
||||
: 'desktop';
|
||||
|
||||
@@ -47,18 +47,14 @@ function index(req, res) {
|
||||
function getThemeCssUrl(theme) {
|
||||
if (theme === 'light') {
|
||||
return false; // light theme is always loaded as baseline
|
||||
}
|
||||
|
||||
if (theme === 'dark') {
|
||||
} else if (theme === 'dark') {
|
||||
return `${assetPath}/stylesheets/theme-dark.css`;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
const themeNote = attributeService.getNoteWithLabel('appTheme', theme);
|
||||
|
||||
if (themeNote) {
|
||||
return `api/notes/download/${themeNote.noteId}`;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return false; // baseline light theme
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user