Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:bug: Removed default empty stylesheet, Firefox warning

Alicia Sykes6ec0bd20a1f1
diff --git a/src/components/Settings/ThemeSelector.vue b/src/components/Settings/ThemeSelector.vue
index 1b540808..081caf4c 100644
--- a/src/components/Settings/ThemeSelector.vue
+++ b/src/components/Settings/ThemeSelector.vue
@@ -35,6 +35,7 @@ import {
} from '@/utils/ThemeHelper';
import Defaults, { localStorageKeys } from '@/utils/defaults';
import Keys from '@/utils/StoreMutations';
+import ErrorHandler from '@/utils/ErrorHandler';
import IconPalette from '@/assets/interface-icons/config-color-palette.svg';
export default {
@@ -86,19 +87,19 @@ export default {
/* Returns an array of links to external CSS from the Config */
externalThemes() {
const availibleThemes = {};
- if (this.appConfig) {
- if (this.appConfig.externalStyleSheet) {
- const externals = this.appConfig.externalStyleSheet;
- if (Array.isArray(externals)) {
- externals.forEach((ext, i) => {
- availibleThemes[`External Stylesheet ${i + 1}`] = ext;
- });
- } else {
- availibleThemes['External Stylesheet'] = this.appConfig.externalStyleSheet;
- }
+ if (this.appConfig && this.appConfig.externalStyleSheet) {
+ const externals = this.appConfig.externalStyleSheet;
+ if (Array.isArray(externals)) {
+ externals.forEach((ext, i) => {
+ availibleThemes[`External Stylesheet ${i + 1}`] = ext;
+ });
+ } else if (typeof externals === 'string') {
+ availibleThemes['External Stylesheet'] = this.appConfig.externalStyleSheet;
+ } else {
+ ErrorHandler('External stylesheets must be of type string or string[]');
}
}
- availibleThemes.Default = '#';
+ // availibleThemes.Default = '#';
return availibleThemes;
},
},
diff --git a/src/utils/defaults.js b/src/utils/defaults.js
index dccb4907..fe43aeb1 100644
--- a/src/utils/defaults.js
+++ b/src/utils/defaults.js
@@ -47,6 +47,7 @@ module.exports = {
},
/* List of built-in themes, to be displayed within the theme-switcher dropdown */
builtInThemes: [
+ 'default',
'callisto',
'material',
'material-dark',