Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: 调整反向代理的源文页面大小 #4917

Merged
merged 1 commit into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<el-drawer v-model="open" :close-on-click-modal="false" size="40%" :before-close="handleClose">
<el-drawer v-model="open" :close-on-click-modal="false" :size="size" :before-close="handleClose">
<template #header>
<DrawerHeader :header="$t('website.proxyFile')" :back="handleClose" />
</template>
Expand Down Expand Up @@ -35,13 +35,19 @@
import DrawerHeader from '@/components/drawer-header/index.vue';
import i18n from '@/lang';
import { FormInstance } from 'element-plus';
import { reactive, ref } from 'vue';
import { computed, reactive, ref } from 'vue';
import { MsgSuccess } from '@/utils/message';
import { Codemirror } from 'vue-codemirror';
import { UpdateProxyConfigFile } from '@/api/modules/website';
import { StreamLanguage } from '@codemirror/language';
import { nginx } from '@codemirror/legacy-modes/mode/nginx';
import { oneDark } from '@codemirror/theme-one-dark';
import { GlobalStore } from '@/store';
const globalStore = GlobalStore();

const mobile = computed(() => {
return globalStore.isMobile();
});

const extensions = [StreamLanguage.define(nginx), oneDark];
const proxyForm = ref<FormInstance>();
Expand All @@ -58,12 +64,17 @@ const req = reactive({
websiteID: 0,
content: '',
});
const size = ref('50%');

const acceptParams = async (proxyreq: any) => {
req.name = proxyreq.name;
req.websiteID = proxyreq.websiteID;
req.content = proxyreq.content;
open.value = true;

if (mobile.value) {
size.value = '100%';
}
};

const submit = async () => {
Expand Down
Loading