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!

:loud_sound: Updates log headings for json editor

Alicia Sykesc9c3c0bc0f06
diff --git a/src/components/Configuration/JsonEditor.vue b/src/components/Configuration/JsonEditor.vue
index 4e315b7c..1ec4cfd6 100644
--- a/src/components/Configuration/JsonEditor.vue
+++ b/src/components/Configuration/JsonEditor.vue
@@ -54,7 +54,7 @@ import axios from 'axios';
import ProgressBar from 'rsup-progress';
import VJsoneditor from 'v-jsoneditor';
import jsYaml from 'js-yaml';
-import ErrorHandler, { InfoHandler } from '@/utils/ErrorHandler';
+import ErrorHandler, { InfoHandler, InfoKeys } from '@/utils/ErrorHandler';
import configSchema from '@/utils/ConfigSchema.json';
import StoreKeys from '@/utils/StoreMutations';
import { localStorageKeys, serviceEndpoints, modalNames } from '@/utils/defaults';
@@ -122,7 +122,7 @@ export default {
},
/* Applies changes to the local state, begins edit mode and closes modal */
startPreview() {
- InfoHandler('Applying changes to local state...', 'Config Update');
+ InfoHandler('Applying changes to local state...', InfoKeys.RAW_EDITOR);
const data = this.jsonData;
this.$store.commit(StoreKeys.SET_APP_CONFIG, data.appConfig);
this.$store.commit(StoreKeys.SET_PAGE_INFO, data.pageInfo);
@@ -152,7 +152,7 @@ export default {
} else {
this.showToast(this.$t('config-editor.error-msg-cannot-save'), false);
}
- InfoHandler('Config has been written to disk succesfully', 'Config Update');
+ InfoHandler('Config has been written to disk succesfully', InfoKeys.RAW_EDITOR);
this.$store.commit(StoreKeys.SET_CONFIG, this.jsonData);
this.progress.end();
})
@@ -180,7 +180,7 @@ export default {
if (data.appConfig.theme) {
localStorage.setItem(localStorageKeys.THEME, data.appConfig.theme);
}
- InfoHandler('Config has succesfully been saved in browser storage', 'Config Update');
+ InfoHandler('Config has succesfully been saved in browser storage', InfoKeys.RAW_EDITOR);
this.showToast(this.$t('config-editor.success-msg-local'), true);
},
/* Clears config from browser storage, only removing relevant items */
diff --git a/src/utils/ErrorHandler.js b/src/utils/ErrorHandler.js
index a0624fab..e690e79a 100644
--- a/src/utils/ErrorHandler.js
+++ b/src/utils/ErrorHandler.js
@@ -41,6 +41,7 @@ export const WarningInfoHandler = (msg, title, log) => {
/* Titles for info logging */
export const InfoKeys = {
EDITOR: 'Interactive Editor',
+ RAW_EDITOR: 'Raw Config Editor',
VISUAL: 'Layout & Styles',
};