mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-19 10:04:05 +01:00
New layout.
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<v-dialog v-model="dialog" max-width="600">
|
||||
<v-stepper v-model="step">
|
||||
<v-stepper-header>
|
||||
<v-stepper-step :complete="step > 1" step="1">
|
||||
<translate>General</translate>
|
||||
</v-stepper-step>
|
||||
<v-stepper-step :complete="step > 2" step="2">
|
||||
<translate>DNS</translate>
|
||||
</v-stepper-step>
|
||||
<v-stepper-step :complete="step > 3" step="3">
|
||||
<translate>Limitations</translate>
|
||||
</v-stepper-step>
|
||||
<v-stepper-step step="4">
|
||||
<translate>Options</translate>
|
||||
</v-stepper-step>
|
||||
</v-stepper-header>
|
||||
<v-stepper-items>
|
||||
<v-stepper-content step="1">
|
||||
<v-text-field
|
||||
:label="'Name' | translate"
|
||||
v-model="domain.name"
|
||||
:error="formErrors['name'] !== undefined"
|
||||
:error-messages="formErrors['name']"
|
||||
/>
|
||||
<v-select :label="'Type' | translate" :items="domainTypes" />
|
||||
<v-checkbox :label="'Enabled' | translate" v-model="domain.enabled" />
|
||||
<div class="float-right">
|
||||
<v-btn text @click="close">
|
||||
<translate>Cancel</translate>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
text
|
||||
color="primary"
|
||||
@click="step = 2"
|
||||
>
|
||||
<translate>Next</translate>
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-stepper-content>
|
||||
<v-stepper-content step="2">
|
||||
<v-checkbox
|
||||
label="Enable DNS checks"
|
||||
v-model="domain.enable_dns_checks"
|
||||
/>
|
||||
<v-checkbox
|
||||
label="Enable DKIM signing"
|
||||
v-model="domain.enable_dkim"
|
||||
/>
|
||||
<v-text-field
|
||||
label="DKIM key selector"
|
||||
v-model="domain.dkim_key_selector"
|
||||
v-if="domain.enable_dkim"
|
||||
/>
|
||||
<v-text-field
|
||||
label="DKIM key length"
|
||||
v-model="domain.dkim_key_length"
|
||||
v-if="domain.enable_dkim"
|
||||
/>
|
||||
|
||||
<div class="float-right">
|
||||
<v-btn text @click="dialog = false">
|
||||
<translate>Cancel</translate>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
text
|
||||
color="primary"
|
||||
@click="step = 3"
|
||||
>
|
||||
<translate>Next</translate>
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-stepper-content>
|
||||
</v-stepper-items>
|
||||
</v-stepper>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['value'],
|
||||
components: {
|
||||
},
|
||||
computed: {
|
||||
dialog: {
|
||||
get () {
|
||||
return this.value
|
||||
},
|
||||
set (newValue) {
|
||||
this.$emit('input', newValue)
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
domain: {},
|
||||
domainTypes: ['Domain', 'Relay domain'],
|
||||
formErrors: {},
|
||||
step: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close () {
|
||||
this.dialog = false
|
||||
this.step = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -15,23 +15,11 @@
|
||||
<v-btn class="mr-2" fab small>
|
||||
<v-icon>mdi-file-export-outline</v-icon>
|
||||
</v-btn>
|
||||
<v-btn fab small color="primary" :to="{ name: 'DomainAdd' }">
|
||||
<v-btn fab small color="secondary" :to="{ name: 'DomainAdd' }">
|
||||
<v-icon>mdi-plus</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<v-data-table :headers="headers" :items="domains" :search="search" class="elevation-1">
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-btn icon small :to="{ name: 'DomainEdit', params: { domainPk: item.pk }}">
|
||||
<v-icon>mdi-circle-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
icon
|
||||
small
|
||||
:title="'Delete this domain' | translate"
|
||||
@click="confirmDelete(item)">
|
||||
<v-icon>mdi-delete-outline</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<template v-slot:item.name="{ item }">
|
||||
<router-link :to="{ name: 'DomainDetail', params: { pk: item.pk } }">
|
||||
{{ item.name }}
|
||||
@@ -66,6 +54,20 @@
|
||||
<template v-slot:item.allocated_quota_in_percent="{ item }">
|
||||
<v-progress-linear v-model="item.allocated_quota_in_percent" />
|
||||
</template>
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<div class="text-right">
|
||||
<v-btn icon x-small :to="{ name: 'DomainEdit', params: { domainPk: item.pk }}">
|
||||
<v-icon>mdi-circle-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
icon
|
||||
x-small
|
||||
:title="'Delete this domain' | translate"
|
||||
@click="confirmDelete(item)">
|
||||
<v-icon>mdi-delete-outline</v-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
<confirm-dialog v-model="showConfirmDialog"
|
||||
@@ -88,11 +90,11 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
headers: [
|
||||
{ text: '', value: 'actions', sortable: false },
|
||||
{ text: 'Name', value: 'name' },
|
||||
{ text: 'Tags', value: 'tags' },
|
||||
{ text: 'DNS status', value: 'dns_status', sortable: false },
|
||||
{ text: 'Quota', value: 'allocated_quota_in_percent' }
|
||||
{ text: 'Quota', value: 'allocated_quota_in_percent' },
|
||||
{ text: this.$gettext('Actions'), value: 'actions', sortable: false }
|
||||
],
|
||||
deleteDomainMsg: this.$gettext('Confirm deletion?'),
|
||||
selectedDomain: null,
|
||||
|
||||
Reference in New Issue
Block a user