mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-27 07:34:43 +02:00
🐛 Fixes theme read err
This commit is contained in:
parent
16acf36528
commit
0d66e54b59
@ -106,15 +106,17 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
const initialTheme = this.getInitialTheme();
|
const initialTheme = this.getInitialTheme();
|
||||||
this.selectedTheme = initialTheme;
|
this.selectedTheme = initialTheme;
|
||||||
// Pass all user custom stylesheets to the themehelper
|
|
||||||
const added = Object.keys(this.externalThemes).map(
|
|
||||||
name => this.themeHelper.add(name, this.externalThemes[name]),
|
|
||||||
);
|
|
||||||
// Quicker loading, if the theme is local we can apply it immidiatley
|
// Quicker loading, if the theme is local we can apply it immidiatley
|
||||||
if (this.isThemeLocal(initialTheme)) {
|
if (this.isThemeLocal(initialTheme)) {
|
||||||
this.updateTheme(initialTheme);
|
this.updateTheme(initialTheme);
|
||||||
|
}
|
||||||
|
|
||||||
// If it's an external stylesheet, then wait for promise to resolve
|
// If it's an external stylesheet, then wait for promise to resolve
|
||||||
} else if (initialTheme !== Defaults.theme) {
|
if (this.externalThemes && Object.entries(this.externalThemes).length > 0) {
|
||||||
|
const added = Object.keys(this.externalThemes).map(
|
||||||
|
name => this.themeHelper.add(name, this.externalThemes[name]),
|
||||||
|
);
|
||||||
|
// Once, added, then apply users initial theme
|
||||||
Promise.all(added).then(() => {
|
Promise.all(added).then(() => {
|
||||||
this.updateTheme(initialTheme);
|
this.updateTheme(initialTheme);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user