chore(client): get icons to load

This commit is contained in:
Elian Doran 2026-01-05 11:50:05 +02:00
parent 047b5a85d2
commit b745fb476e
No known key found for this signature in database
2 changed files with 9 additions and 7 deletions

View File

@ -28,7 +28,8 @@
<script>
async function bootstrap() {
await setupGlob();
await loadStylesheets();
loadStylesheets();
loadIcons();
await loadScripts();
}
@ -43,7 +44,7 @@
};
}
async function loadStylesheets() {
function loadStylesheets() {
const { assetPath, themeCssUrl, themeUseNextAsBase } = window.glob;
const cssToLoad = [];
cssToLoad.push(`${assetPath}/stylesheets/theme-light.css`);
@ -67,6 +68,12 @@
}
}
function loadIcons() {
const styleEl = document.createElement("style");
styleEl.innerText = window.glob.iconPackCss;
document.head.appendChild(styleEl);
}
async function loadScripts() {
const assetPath = glob.assetPath;
await import(`./${assetPath}/runtime.js`);

View File

@ -1,10 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<head>
<style id="trilium-icon-packs">
<%- iconPackCss %>
</style>
</head>
<body
class="desktop heading-style-<%= headingStyle %> layout-<%= layoutOrientation %> platform-<%= platform %> <%= isElectron ? 'electron' : '' %> <%= hasNativeTitleBar ? 'native-titlebar' : '' %> <%= hasBackgroundEffects ? 'background-effects' : '' %>"
lang="<%= currentLocale.id %>" dir="<%= currentLocale.rtl ? 'rtl' : 'ltr' %>"