Skip to content

Commit

Permalink
improve(desktop): remove redundant code
Browse files Browse the repository at this point in the history
Editor lang for protobuf schema is set to 'plaintext'
  • Loading branch information
LAST7 authored and ysfscream committed Sep 23, 2024
1 parent 24744f3 commit 1eeb231
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/views/script/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
@qucik-save="handleTest"
/>
<Editor
v-if="activeTab === schemaTab && currentSchema === 'protobuf'"
v-if="activeTab === schemaTab"
ref="schemaEditor"
id="schema-editor"
:key="2"
Expand All @@ -85,19 +85,6 @@
renderHighlight="line"
@qucik-save="handleTest"
/>
<Editor
v-if="activeTab === schemaTab && currentSchema === 'avro'"
ref="schemaEditor"
id="schema-editor"
:key="3"
:lang="scriptEditorLang"
:isCustomerLang="true"
v-model="schemaEditorValue"
lineNumbers="on"
:lineNumbersMinChars="5"
renderHighlight="line"
@qucik-save="handleTest"
/>
</div>
<el-row class="script-test-row script-test-input" :gutter="20">
<el-col :span="activeTab == schemaTab && currentSchema === 'protobuf' ? 15 : 18">
Expand Down Expand Up @@ -219,7 +206,6 @@ export default class Script extends Vue {
{ label: 'Avro', value: 'avro' },
]
private functionList: FunctionList[] = [{ label: 'JavaScript', value: 'javascript' }]
// TODO: Because the editor does not support the parsing of the protobuf language, the editor language is temporarily set to javascript.
private currentSchema: SchemaType = 'protobuf'
private currentFunction: FunctionType = 'javascript'
private readonly inputTypeList: PayloadType[] = ['JSON', 'Plaintext', 'Base64', 'Hex']
Expand Down

0 comments on commit 1eeb231

Please sign in to comment.