File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 65
65
66
66
<script >
67
67
68
- import JsonToYaml from ' @/utils/JsonToYaml' ;
69
68
import { localStorageKeys , modalNames } from ' @/utils/defaults' ;
70
69
import { getUsersLanguage } from ' @/utils/ConfigHelpers' ;
71
70
import StoreKeys from ' @/utils/StoreMutations' ;
@@ -88,7 +87,6 @@ export default {
88
87
name: ' ConfigContainer' ,
89
88
data () {
90
89
return {
91
- jsonParser: JsonToYaml,
92
90
backupId: localStorage[localStorageKeys .BACKUP_ID ] || ' ' ,
93
91
appVersion: process .env .VUE_APP_VERSION ,
94
92
latestVersion: ' ' ,
@@ -101,9 +99,6 @@ export default {
101
99
sections : function getSections () {
102
100
return this .config .sections ;
103
101
},
104
- yaml () {
105
- return this .jsonParser (this .config );
106
- },
107
102
},
108
103
components: {
109
104
JsonEditor,
Original file line number Diff line number Diff line change 1
1
<template >
2
- <pre ><code >{{ jsonParser(config) }}</code ></pre >
2
+ <pre ><code >{{ yamlConfig }}</code ></pre >
3
3
</template >
4
4
5
5
<script >
6
- import JsonToYaml from ' @/utils/JsonToYaml ' ;
6
+ import JsYaml from ' js-yaml ' ;
7
7
8
8
export default {
9
9
name: ' DownloadConfig' ,
10
10
computed: {
11
11
config () {
12
12
return this .$store .state .config ;
13
13
},
14
- },
15
- data () {
16
- return {
17
- jsonParser: JsonToYaml,
18
- };
14
+ yamlConfig () {
15
+ return JsYaml .dump (this .config );
16
+ },
19
17
},
20
18
};
21
19
22
20
</script >
23
21
24
22
<style scoped lang="scss">
25
23
pre {
26
- background : var (--code-editor-background );
27
- color : var (--code-editor-color );
24
+ margin : 0 ;
28
25
padding : 1rem ;
26
+ color : var (--code-editor-color );
27
+ background : var (--code-editor-background );
29
28
}
30
29
</style >
You can’t perform that action at this time.
0 commit comments