From 8cc865dd1399c919f3dd646ebc141e569e98cf96 Mon Sep 17 00:00:00 2001 From: Justin Georgi Date: Sat, 7 Dec 2024 09:00:21 -0700 Subject: [PATCH] Load custom css file if present Signed-off-by: Justin Georgi --- bundles/org.openhab.ui/web/src/components/app.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bundles/org.openhab.ui/web/src/components/app.vue b/bundles/org.openhab.ui/web/src/components/app.vue index 3bc5fb4ae0..43ff3f4280 100644 --- a/bundles/org.openhab.ui/web/src/components/app.vue +++ b/bundles/org.openhab.ui/web/src/components/app.vue @@ -632,6 +632,15 @@ export default { this.updateThemeOptions() this.$f7.data.themeOptions = this.themeOptions + fetch('/static/theme.css').then(resp => { + if (resp.ok) { + const themeLink = document.createElement('link') + themeLink.rel = 'stylesheet' + themeLink.href = '/static/theme.css' + document.head.appendChild(themeLink) + } + }) + if (!this.user) { this.tryExchangeAuthorizationCode().then((user) => { this.loggedIn = true