mirror of https://github.com/Lissy93/dashy.git
🐛 Fix malformed YAML in export menu (#482)
This commit is contained in:
parent
c4f1be2b76
commit
86837105cf
|
@ -65,7 +65,6 @@
|
|||
|
||||
<script>
|
||||
|
||||
import JsonToYaml from '@/utils/JsonToYaml';
|
||||
import { localStorageKeys, modalNames } from '@/utils/defaults';
|
||||
import { getUsersLanguage } from '@/utils/ConfigHelpers';
|
||||
import StoreKeys from '@/utils/StoreMutations';
|
||||
|
@ -88,7 +87,6 @@ export default {
|
|||
name: 'ConfigContainer',
|
||||
data() {
|
||||
return {
|
||||
jsonParser: JsonToYaml,
|
||||
backupId: localStorage[localStorageKeys.BACKUP_ID] || '',
|
||||
appVersion: process.env.VUE_APP_VERSION,
|
||||
latestVersion: '',
|
||||
|
@ -101,9 +99,6 @@ export default {
|
|||
sections: function getSections() {
|
||||
return this.config.sections;
|
||||
},
|
||||
yaml() {
|
||||
return this.jsonParser(this.config);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
JsonEditor,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<pre><code>{{ jsonParser(config) }}</code></pre>
|
||||
<pre><code>{{ yamlConfig }}</code></pre>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JsonToYaml from '@/utils/JsonToYaml';
|
||||
import JsYaml from 'js-yaml';
|
||||
|
||||
export default {
|
||||
name: 'DownloadConfig',
|
||||
|
@ -11,11 +11,9 @@ export default {
|
|||
config() {
|
||||
return this.$store.state.config;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
jsonParser: JsonToYaml,
|
||||
};
|
||||
yamlConfig() {
|
||||
return JsYaml.dump(this.config);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -23,8 +21,9 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
pre {
|
||||
background: var(--code-editor-background);
|
||||
color: var(--code-editor-color);
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
color: var(--code-editor-color);
|
||||
background: var(--code-editor-background);
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue