mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
change in referencing CSS resources to allow easier relative linking
This commit is contained in:
parent
f90ed99a40
commit
ba1ca506af
@ -81,7 +81,7 @@ window.onerror = function (msg, url, lineNo, columnNo, error) {
|
||||
};
|
||||
|
||||
for (const appCssNoteId of window.appCssNoteIds) {
|
||||
cssLoader.requireCss(`/api/notes/${appCssNoteId}/download`);
|
||||
cssLoader.requireCss(`/api/notes/download/${appCssNoteId}`);
|
||||
}
|
||||
|
||||
const wikiBaseUrl = "https://github.com/zadam/trilium/wiki/";
|
||||
|
@ -98,7 +98,7 @@ addTabHandler((function() {
|
||||
if (noteId) {
|
||||
// make sure the CSS is loaded
|
||||
// if the CSS has been loaded and then updated then the changes won't take effect though
|
||||
cssLoader.requireCss(`/api/notes/${noteId}/download`);
|
||||
cssLoader.requireCss(`/api/notes/download/${noteId}`);
|
||||
}
|
||||
|
||||
$body.addClass("theme-" + newTheme);
|
||||
|
@ -135,6 +135,8 @@ function register(app) {
|
||||
filesRoute.uploadFile, apiResultHandler);
|
||||
|
||||
route(GET, '/api/notes/:noteId/download', [auth.checkApiAuthOrElectron], filesRoute.downloadFile);
|
||||
// this "hacky" path is used for easier referencing of CSS resources
|
||||
route(GET, '/api/notes/download/:noteId', [auth.checkApiAuthOrElectron], filesRoute.downloadFile);
|
||||
|
||||
apiRoute(GET, '/api/notes/:noteId/attributes', attributesRoute.getEffectiveNoteAttributes);
|
||||
apiRoute(PUT, '/api/notes/:noteId/attributes', attributesRoute.updateNoteAttributes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user