-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Minimal view as starting view not using correct theme #1604
Comments
Hi Have you already done a rebuild, thorugh the UI, after setting the vue_app_starting_view env ? |
I just tried, the theme is still the default one. |
If I click on settings button the theme is immediately applied. |
You're right! I've just tested this and confirm this weird behaviour, seems like clicking the settings icon, somehwat reload the ui? Config used for testing:
.env file:
Tought a video probably shows this the best: |
Fixes it, so presumably its just not loading the theme |
A hacky workaround until this gets fixed:
where then edit
Where matrix is the theme you'd like to use |
If you want to get proper dirty but have it persistent across docker restarts:
Change:
To:
const fs = require("fs")
const HTML_FILE = "dist/index.html"
const DEFAULT_THEME = "matrix"
const scriptContent = `
;(() => {
const theme = localStorage.getItem("theme") || "${DEFAULT_THEME}";
document.documentElement.setAttribute("data-theme", theme);
})();
`
const htmlContent = fs.readFileSync(HTML_FILE, "utf-8")
const stringToSearch = `setTimeout(() => {`
const updatedHtml = htmlContent.replace(
stringToSearch,
`${scriptContent}\n${stringToSearch}`
)
fs.writeFileSync(HTML_FILE, updatedHtml, "utf-8")
volumes:
- /path/to/your/package.json:/app/package.json
- /path/to/your/fix-theme.js:/app/fix-theme.js |
Environment
Self-Hosted (Docker)
System
Firefox 125, Ubuntu 23.10, Docker 26.1.3
Version
3.1.0
Describe the problem
I want to have the minimal view as starting view, so I set the environment variable
VUE_APP_STARTING_VIEW
tominimal
. The starting view is indeed the minimal view but the theme I set in my config is not set, it uses the default one instead.Additional info
No response
Please tick the boxes
The text was updated successfully, but these errors were encountered: