50 lines
1.6 KiB
Vue
50 lines
1.6 KiB
Vue
<script setup lang="ts">
|
|
const { getOverviewStats } = useAdmin()
|
|
|
|
const { data: statsRes, pending } = useAsyncData('admin-stats', () => getOverviewStats())
|
|
|
|
const adminActions = [
|
|
{ to: '/admin/reports', icon: 'it-files', label: 'Report', tone: 'primary' },
|
|
{ to: '/admin/catalog', icon: 'it-list', label: 'Categorie e Team', tone: 'primary' },
|
|
{ to: '/admin/areas', icon: 'it-map-marker', label: 'Aree', tone: 'primary' },
|
|
{ to: '/admin/users', icon: 'it-user', label: 'Gestione Utenti', tone: 'primary' },
|
|
{ to: '/admin/moderation', icon: 'it-warning', label: 'Moderazione Abusi', tone: 'danger' }
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div class="card card-bg">
|
|
<div class="card-body">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h2 class="h5 card-title mb-0">Gestione sistema</h2>
|
|
</div>
|
|
|
|
<div class="row g-2">
|
|
<div
|
|
v-for="action in adminActions"
|
|
:key="action.to"
|
|
class="col-12 col-md-6 col-xl-4"
|
|
>
|
|
<NuxtLink
|
|
:to="action.to"
|
|
class="btn btn-sm w-100 d-flex align-items-center justify-content-start gap-2 admin-action"
|
|
:class="action.tone === 'danger' ? 'btn-outline-danger' : 'btn-outline-primary'"
|
|
>
|
|
<BIIcon :name="action.icon" size="sm" :color="action.tone === 'danger' ? 'danger' : 'primary'" />
|
|
<span>{{ action.label }}</span>
|
|
</NuxtLink>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.admin-action {
|
|
min-height: 44px;
|
|
text-align: left;
|
|
}
|
|
</style>
|