mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-27 11:24:28 +01:00
WIP: amavis quarantine frontend
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import repository from './repository'
|
||||
|
||||
export default {
|
||||
getQuarantineContent(params) {
|
||||
return repository.get('/amavis/quarantine/', { params })
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<v-card class="mt-6">
|
||||
<v-data-table-server
|
||||
v-model="selected"
|
||||
:headers="headers"
|
||||
:items="messages"
|
||||
:search="search"
|
||||
:loading="loading"
|
||||
:items-length="totalMessages"
|
||||
:page="currentPage"
|
||||
:items-per-page="itemsPerPageR"
|
||||
item-value="pk"
|
||||
elevation="0"
|
||||
show-select
|
||||
:sort-by="sortByR"
|
||||
@update:options="updatedOptions"
|
||||
>
|
||||
<template #top>
|
||||
<v-text-field
|
||||
v-model="search"
|
||||
prepend-inner-icon="mdi-magnify"
|
||||
:placeholder="$gettext('Search in messages')"
|
||||
variant="outlined"
|
||||
single-line
|
||||
flat
|
||||
hide-details
|
||||
density="compact"
|
||||
class="flex-grow-0 w-33 mr-4"
|
||||
clearable
|
||||
@click:clear="fetchContent"
|
||||
@keyup.enter="submitSearch"
|
||||
></v-text-field>
|
||||
</template>
|
||||
</v-data-table-server>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import api from '@/api/amavis'
|
||||
|
||||
const messages = ref([])
|
||||
const search = ref('')
|
||||
const totalMessages = ref(0)
|
||||
|
||||
const fetchContent = () => {}
|
||||
|
||||
const submitSearch = () => {}
|
||||
</script>
|
||||
@@ -426,6 +426,23 @@ const routes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'quarantine',
|
||||
component: () => import('@/layouts/user/UserLayout.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'QuarantineView',
|
||||
component: () => import('@/views/quarantine/QuarantineView.vue'),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div class="text-h5 ml-4">
|
||||
{{ $gettext('Quarantine') }}
|
||||
</div>
|
||||
|
||||
<QuarantineList />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import QuarantineList from '@/components/quarantine/QuarantineList'
|
||||
</script>
|
||||
Reference in New Issue
Block a user