mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-21 06:18:45 +02:00
Reintroduced News feed widget in admin dashboard.
This commit is contained in:
@@ -7,4 +7,7 @@ export default {
|
||||
getNotifications() {
|
||||
return repository.get('/admin/notifications/')
|
||||
},
|
||||
getNewsFeed() {
|
||||
return repository.get('/admin/news_feed/')
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<v-card :title="$gettext('Latest news')">
|
||||
<v-card-text>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="news"
|
||||
hide-default-header
|
||||
hide-default-footer
|
||||
>
|
||||
<template #[`item.title`]="{ item }">
|
||||
<a :href="item.link" target="_blank">{{ item.title }}</a>
|
||||
</template>
|
||||
<template #[`item.published`]="{ item }">
|
||||
{{ $date(item.published) }}
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
<v-card-actions class="justify-center">
|
||||
<div>
|
||||
<a href="https://modoboa.org/weblog/" target="_blank">
|
||||
{{ $gettext('Visit the official weblog for more information') }}
|
||||
</a>
|
||||
</div>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import adminApi from '@/api/admin'
|
||||
|
||||
const news = ref([])
|
||||
|
||||
const headers = [
|
||||
{ title: '', key: 'title' },
|
||||
{ title: '', key: 'published', align: 'end' },
|
||||
]
|
||||
|
||||
const resp = await adminApi.getNewsFeed()
|
||||
news.value = resp.data
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: rgb(var(--v-theme-primary));
|
||||
|
||||
&:visited {
|
||||
color: rgb(var(--v-theme-primary));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,25 +2,18 @@
|
||||
<v-toolbar flat>
|
||||
<v-toolbar-title>{{ $gettext('Welcome to Modoboa') }}</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-alert type="info" border="top" colored-border elevation="2" class="mt-10">
|
||||
<p>{{ $gettext('This page is still under construction.') }}</p>
|
||||
<p>
|
||||
{{
|
||||
$gettext(
|
||||
"It will present a summary of your Modoboa server's status and some useful information about the product."
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
<p>
|
||||
Your feedback would be really appreciated, you can use
|
||||
<a href="https://github.com/modoboa/modoboa/discussions"
|
||||
>Github discussions</a
|
||||
>
|
||||
to share your ideas and/or comments.
|
||||
</p>
|
||||
</v-alert>
|
||||
|
||||
<v-row>
|
||||
<v-col sm="12" md="6">
|
||||
<NewsFeedWidget />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import NewsFeedWidget from '@/components/admin/dashboard/NewsFeedWidget'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.v-toolbar {
|
||||
background-color: #f7f8fa !important;
|
||||
|
||||
Reference in New Issue
Block a user