File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -131,15 +131,20 @@ declare module '@vue/runtime-core' {
131
131
NA : typeof import ( 'naive-ui' ) [ 'NA' ]
132
132
NAlert : typeof import ( 'naive-ui' ) [ 'NAlert' ]
133
133
NavbarButtons : typeof import ( './src/components/NavbarButtons.vue' ) [ 'default' ]
134
+ NCode : typeof import ( 'naive-ui' ) [ 'NCode' ]
134
135
NCollapseTransition : typeof import ( 'naive-ui' ) [ 'NCollapseTransition' ]
135
136
NConfigProvider : typeof import ( 'naive-ui' ) [ 'NConfigProvider' ]
136
137
NEllipsis : typeof import ( 'naive-ui' ) [ 'NEllipsis' ]
138
+ NFormItem : typeof import ( 'naive-ui' ) [ 'NFormItem' ]
137
139
NH1 : typeof import ( 'naive-ui' ) [ 'NH1' ]
138
140
NH3 : typeof import ( 'naive-ui' ) [ 'NH3' ]
139
141
NIcon : typeof import ( 'naive-ui' ) [ 'NIcon' ]
142
+ NInputNumber : typeof import ( 'naive-ui' ) [ 'NInputNumber' ]
140
143
NLayout : typeof import ( 'naive-ui' ) [ 'NLayout' ]
141
144
NLayoutSider : typeof import ( 'naive-ui' ) [ 'NLayoutSider' ]
142
145
NMenu : typeof import ( 'naive-ui' ) [ 'NMenu' ]
146
+ NScrollbar : typeof import ( 'naive-ui' ) [ 'NScrollbar' ]
147
+ NSwitch : typeof import ( 'naive-ui' ) [ 'NSwitch' ]
143
148
NumeronymGenerator : typeof import ( './src/tools/numeronym-generator/numeronym-generator.vue' ) [ 'default' ]
144
149
OtpCodeGeneratorAndValidator : typeof import ( './src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue' ) [ 'default' ]
145
150
PasswordStrengthAnalyser : typeof import ( './src/tools/password-strength-analyser/password-strength-analyser.vue' ) [ 'default' ]
Original file line number Diff line number Diff line change @@ -8,18 +8,16 @@ const jsonContent = ref(
8
8
} ` ,
9
9
);
10
10
11
- const conversionResult = computed (() => {
11
+ const conversionError = computed (() => {
12
12
try {
13
13
linter .parse (jsonContent .value );
14
- return JSON . stringify ( JSON . parse ( jsonContent . value ), null , 2 ) ;
14
+ return null ;
15
15
}
16
16
catch (e : any ) {
17
- return e .toString (). split ( ' \n ' ). map (( err : string ) => ({ line: - 1 , message: err , helpLink: ' ' })) ;
17
+ return e .toString ();
18
18
}
19
19
});
20
20
21
- const errors = computed (() => conversionResult .value );
22
-
23
21
const MONACO_EDITOR_OPTIONS = {
24
22
automaticLayout: true ,
25
23
formatOnType: true ,
@@ -41,15 +39,11 @@ const MONACO_EDITOR_OPTIONS = {
41
39
</div >
42
40
</c-label >
43
41
44
- <div v-if =" errors.length > 0 " >
42
+ <div v-if =" conversionError " >
45
43
<n-alert title =" The following errors occured" type =" error" mt-5 >
46
- <ul >
47
- <li v-for =" (message, index) of errors" :key =" index" >
48
- {{ message.message }} (<n-a v-if =" message.helpLink" target =" _blank" rel =" noreferer noopener" >
49
- See JSON help
50
- </n-a >)
51
- </li >
52
- </ul >
44
+ <pre >
45
+ {{ conversionError }}
46
+ </pre >
53
47
</n-alert >
54
48
</div >
55
49
<div v-else >
You can’t perform that action at this time.
0 commit comments