Skip to content

Commit

Permalink
update frontend (tuananh: update certificate apply form)
Browse files Browse the repository at this point in the history
KaySar12 committed Oct 9, 2024
1 parent 159e012 commit 68337af
Showing 1 changed file with 103 additions and 3 deletions.
106 changes: 103 additions & 3 deletions frontend/src/views/website/ssl/create/index.vue
Original file line number Diff line number Diff line change
@@ -70,11 +70,10 @@
</el-form-item>
</el-col>
</el-row>
<div>
<!-- <div>
<el-button type="primary" plain @click="isModalVisible = true">
{{ $t('website.advance') }}
</el-button>
<!-- Sử dụng el-dialog -->
<el-dialog
v-model="isModalVisible"
width="60%"
@@ -181,6 +180,106 @@
</el-button>
</span>
</el-dialog>
</div> -->
<div>
<el-collapse v-model="activeNames">
<el-collapse-item :title="$t('website.advance')">
<el-form-item :label="$t('website.otherDomains')" prop="otherDomains">
<el-input type="textarea" :rows="3" v-model="ssl.otherDomains"></el-input>
</el-form-item>
<el-form-item :label="$t('website.remark')" prop="description">
<el-input v-model="ssl.description"></el-input>
</el-form-item>
<el-form-item
:label="$t('website.acmeAccount')"
prop="acmeAccountId"
v-if="ssl.provider != 'selfSigned'"
>
<el-select v-model="ssl.acmeAccountId">
<el-option
v-for="(acme, index) in acmeAccounts"
:key="index"
:label="acme.email + ' [' + getAccountName(acme.type) + '] '"
:value="acme.id"
>
<span>{{ acme.email }}</span>
<el-tag type="success" class="ml-2">{{ getAccountName(acme.type) }}</el-tag>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label="$t('website.provider')"
prop="provider"
v-if="ssl.provider != 'selfSigned'"
>
<el-radio-group v-model="ssl.provider" @change="changeProvider()">
<el-radio value="http">HTTP</el-radio>
<el-radio value="dnsAccount">{{ $t('website.dnsAccount') }}</el-radio>
<el-radio value="dnsManual">{{ $t('website.dnsManual') }}</el-radio>
</el-radio-group>
<span class="input-help" v-if="ssl.provider === 'dnsManual'">
{{ $t('ssl.dnsMauanlHelper') }}
</span>
<span class="input-help" v-if="ssl.provider === 'http'">
{{ $t('ssl.httpHelper') }}
</span>
<span class="input-help text-red-500" v-if="ssl.provider === 'http'">
{{ $t('ssl.httpHelper2') }}
</span>
</el-form-item>
<el-form-item :label="''" prop="autoRenew" v-if="ssl.provider !== 'dnsManual'">
<el-checkbox v-model="ssl.autoRenew" :label="$t('ssl.autoRenew')" />
</el-form-item>
<el-form-item :label="''" prop="pushDir">
<el-checkbox v-model="ssl.pushDir" :label="$t('ssl.pushDir')" />
</el-form-item>
<el-form-item :label="$t('ssl.dir')" prop="dir" v-if="ssl.pushDir">
<el-input v-model.trim="ssl.dir">
<template #prepend>
<FileList :path="ssl.dir" @choose="getPath" :dir="true"></FileList>
</template>
</el-input>
<span class="input-help">
{{ $t('ssl.pushDirHelper') }}
</span>
</el-form-item>
<el-form-item :label="''" prop="execShell">
<el-checkbox v-model="ssl.execShell" :label="$t('ssl.execShell')" />
</el-form-item>
<el-form-item :label="$t('ssl.shell')" prop="shell" v-if="ssl.execShell">
<el-input type="textarea" :rows="4" v-model="ssl.shell" />
<span class="input-help">
{{ $t('ssl.shellHelper') }}
</span>
</el-form-item>
<div v-if="ssl.provider != 'selfSigned'">
<el-form-item :label="''" prop="disableCNAME">
<el-checkbox v-model="ssl.disableCNAME" :label="$t('ssl.disableCNAME')" />
<span class="input-help">
{{ $t('ssl.disableCNAMEHelper') }}
</span>
</el-form-item>
<el-form-item :label="''" prop="skipDNS">
<el-checkbox v-model="ssl.skipDNS" :label="$t('ssl.skipDNSCheck')" />
<span class="input-help">
{{ $t('ssl.skipDNSCheckHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('ssl.nameserver') + '1'" prop="nameserver1">
<el-input v-model.trim="ssl.nameserver1"></el-input>
<span class="input-help">
{{ $t('ssl.nameserverHelper') }}
</span>
</el-form-item>
<el-form-item :label="$t('ssl.nameserver') + '2'" prop="nameserver1">
<el-input v-model.trim="ssl.nameserver2"></el-input>
<span class="input-help">
{{ $t('ssl.nameserverHelper') }}
</span>
</el-form-item>
</div>
</el-collapse-item>
</el-collapse>
</div>
</el-form>
</el-col>
@@ -208,7 +307,8 @@ import { MsgSuccess } from '@/utils/message';
import { KeyTypes } from '@/global/mimetype';
import { getDNSName, getAccountName } from '@/utils/util';
const isModalVisible = ref(false); // Trạng thái dialog
// const isModalVisible = ref(false); // Trạng thái dialog
const activeNames = ref(['1']);
const props = defineProps({
id: {

0 comments on commit 68337af

Please sign in to comment.