feat: 优化 nginx 编辑器代码高亮 (#6497)

pull/6501/head
zhengkunwang 2 months ago committed by GitHub
parent 417ad81aa4
commit 1bca3a182e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -11,7 +11,7 @@ import { EditorState } from '@codemirror/state';
import { javascript } from '@codemirror/lang-javascript';
import { oneDark } from '@codemirror/theme-one-dark';
import { StreamLanguage } from '@codemirror/language';
import { nginx } from '@codemirror/legacy-modes/mode/nginx';
import { nginx } from './nginx';
import { yaml } from '@codemirror/legacy-modes/mode/yaml';
import { dockerFile } from '@codemirror/legacy-modes/mode/dockerfile';
import { placeholder } from '@codemirror/view';

File diff suppressed because one or more lines are too long

@ -1,16 +1,5 @@
<template>
<el-drawer
v-model="open"
:close-on-click-modal="false"
:close-on-press-escape="false"
size="40%"
:before-close="handleClose"
>
<template #header>
<DrawerHeader :header="$t('commons.button.' + authBasic.operate)" :back="handleClose" />
</template>
<el-row v-loading="loading">
<el-col :span="22" :offset="1">
<DrawerPro v-model="open" :header="$t('commons.button.' + authBasic.operate)" :back="handleClose">
<el-form-item>
<el-alert
v-if="authBasic.operate === 'edit'"
@ -45,21 +34,16 @@
<el-input v-model.trim="authBasic.remark"></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose" :disabled="loading">{{ $t('commons.button.cancel') }}</el-button>
<el-button type="primary" @click="submit(proxyForm)" :disabled="loading">
{{ $t('commons.button.confirm') }}
</el-button>
</span>
</template>
</el-drawer>
</DrawerPro>
</template>
<script lang="ts" setup>
import DrawerHeader from '@/components/drawer-header/index.vue';
import { OperateAuthConfig, OperatePathAuthConfig } from '@/api/modules/website';
import { Rules } from '@/global/form-rules';
import i18n from '@/lang';

@ -1,17 +1,6 @@
<template>
<el-drawer
v-model="open"
:close-on-click-modal="false"
:close-on-press-escape="false"
size="40%"
:before-close="handleClose"
>
<template #header>
<DrawerHeader :header="$t('commons.button.' + redirect.operate)" :back="handleClose" />
</template>
<el-row v-loading="loading">
<el-col :span="22" :offset="1">
<el-form ref="redirectForm" label-position="top" :model="redirect" :rules="rules">
<DrawerPro v-model="open" :header="$t('commons.button.' + redirect.operate)" :back="handleClose">
<el-form ref="redirectForm" label-position="top" :model="redirect" :rules="rules" v-loading="loading">
<el-form-item :label="$t('commons.table.name')" prop="name">
<el-input
v-model.trim="redirect.name"
@ -61,21 +50,16 @@
<el-switch v-model="redirect.keepPath"></el-switch>
</el-form-item>
</el-form>
</el-col>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose" :disabled="loading">{{ $t('commons.button.cancel') }}</el-button>
<el-button type="primary" @click="submit(redirectForm)" :disabled="loading">
{{ $t('commons.button.confirm') }}
</el-button>
</span>
</template>
</el-drawer>
</DrawerPro>
</template>
<script lang="ts" setup>
import DrawerHeader from '@/components/drawer-header/index.vue';
import { ListDomains, OperateRedirectConfig, GetRedirectConfig } from '@/api/modules/website';
import { Rules } from '@/global/form-rules';
import i18n from '@/lang';

Loading…
Cancel
Save