Added Notifications

This commit is contained in:
2026-06-14 16:04:01 +10:00
parent e24d3ceaec
commit a753bffaf8
49 changed files with 1118 additions and 381 deletions
+54
View File
@@ -0,0 +1,54 @@
<script setup lang="ts">
import MainLayout from "@/Layouts/MainLayout.vue";
import AdminSidebar from "@/Pages/Admin/AdminSidebar.vue";
import GlassBox from "@/Components/FlightsGoneBy/GlassBox.vue";
import {Head} from "@inertiajs/vue3";
defineProps<{
title: string;
missingLiveryCount: number;
}>()
</script>
<template>
<MainLayout>
<Head :title="title" />
<div class="admin-container">
<AdminSidebar :missingLiveryCount="missingLiveryCount" />
<div class="admin-content">
<GlassBox class="admin-page" :title="title">
<slot />
</GlassBox>
</div>
</div>
</MainLayout>
</template>
<style scoped>
.admin-container {
display: flex;
flex-direction: row;
width: 100%;
min-height: 90dvh;
/* Override MainLayout's centred main — fill the full height */
align-self: stretch;
align-items: stretch;
}
.admin-content {
display: flex;
flex-direction: column;
align-items: center;;
flex: 1 1 auto;
padding: 2rem;
overflow-y: auto;
min-width: 0;
}
.admin-page {
width: 100%;
max-width: 1200px;
min-height: 50%;
}
</style>
+69
View File
@@ -0,0 +1,69 @@
<script setup lang="ts">
import {Link} from "@inertiajs/vue3";
import {number} from "echarts";
defineProps<{
missingLiveryCount: number;
}>()
</script>
<template>
<aside class="glass admin-sidebar">
<div class="sidebar-title">Admin</div>
<Link :href="route('admin.dashboard')" class="sidebar-link">
<v-icon icon="mdi-chart-line" size="18" />
Dashboard
</Link>
<Link :href="route('admin.reconcile-missing-liveries')" class="sidebar-link">
<v-icon icon="mdi-airplane-takeoff" size="18" />
Reconcile Missing Liveries
<v-chip size="x-small" color="error" class="ml-1">{{ missingLiveryCount }}</v-chip>
</Link>
</aside>
</template>
<style scoped>
.admin-sidebar {
width: 400px;
flex-shrink: 0;
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.25rem;
/* no height here */
}
.sidebar-title {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text);
opacity: 0.5;
padding: 0 0.5rem 0.75rem;
margin-bottom: 0.5rem;
}
.sidebar-link {
display: flex;
width: 100%;
height: 2.5rem;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
border-radius: 6px;
font-size: 0.875rem;
color: var(--text);
text-decoration: none;
transition: background 0.15s ease;
}
.sidebar-link:hover {
color: var(--accent);
background: rgba(56, 189, 248, 0.07);
}
.sidebar-link.active {
font-weight: 500;
}
</style>
+28
View File
@@ -0,0 +1,28 @@
<script setup lang="ts">
import AdminLayout from "@/Pages/Admin/AdminLayout.vue";
import GrowthCard from "@/Components/Admin/GrowthCard.vue";
defineOptions({ layout: AdminLayout });
defineProps<{
userCount: number,
oneWeekUserGrowth: number,
flightCount: number,
oneWeekFlightGrowth: number,
latestUser:string
}>()
</script>
<template>
<v-container>
<v-row>
<v-col cols="12" sm="6">
<GrowthCard label="Total Users" :count="userCount" :weekly-growth="oneWeekUserGrowth" icon="mdi-account">
Latest User: {{ latestUser }}
</GrowthCard>
</v-col>
<v-col cols="12" sm="6">
<GrowthCard label="Total Flights" :count="flightCount" :weekly-growth="oneWeekFlightGrowth" icon="mdi-airplane" />
</v-col>
</v-row>
</v-container>
</template>
@@ -0,0 +1,18 @@
<script setup lang="ts">
import GlassBox from "@/Components/FlightsGoneBy/GlassBox.vue";
import { Head } from "@inertiajs/vue3";
import {MissingLivery} from "@/Types/types";
import MissingLiveryCard from "@/Components/Admin/MissingLiveryCard.vue";
import AdminLayout from "@/Pages/Admin/AdminLayout.vue";
import Panel from "@/Components/FlightsGoneBy/Panels/Panel.vue";
defineOptions({ layout: AdminLayout });
defineProps<{
missingLiveries: MissingLivery[]
}>()
</script>
<template>
<MissingLiveryCard v-for="livery in missingLiveries" :key="livery.filename" :livery="livery" />
</template>