Update dashboard and Docker compose
Some checks failed
CI/CD Pipeline / Security Scanning (push) Has been cancelled
CI/CD Pipeline / Tests (3.11) (push) Has been cancelled
CI/CD Pipeline / Tests (3.12) (push) Has been cancelled
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (push) Has been cancelled

This commit is contained in:
2026-01-24 19:14:00 +01:00
parent a5811113f0
commit 574a07d127
17 changed files with 838 additions and 252 deletions

View File

@@ -2,22 +2,24 @@
* Main dashboard layout with navigation
*/
import { Link, Outlet, useLocation } from 'react-router-dom';
import { useQuery } from '@tanstack/react-query';
import { authApi } from '../services/api';
import { Link, Outlet, useLocation } from "react-router-dom";
import { useQuery } from "@tanstack/react-query";
import { authApi } from "../services/api";
const navigation = [
{ name: 'Dashboard', href: '/' },
{ name: 'Analytics', href: '/analytics' },
{ name: 'Users', href: '/users' },
{ name: 'Moderation', href: '/moderation' },
{ name: 'Settings', href: '/settings' },
{ name: "Dashboard", href: "/" },
{ name: "Servers", href: "/servers" },
{ name: "Users", href: "/users" },
{ name: "Chats", href: "/chats" },
{ name: "Moderation", href: "/moderation" },
{ name: "Analytics", href: "/analytics" },
{ name: "Settings", href: "/settings" },
];
export function Layout() {
const location = useLocation();
const { data: me } = useQuery({
queryKey: ['me'],
queryKey: ["me"],
queryFn: authApi.getMe,
});
@@ -38,8 +40,8 @@ export function Layout() {
to={item.href}
className={`px-3 py-2 rounded-md text-sm font-medium transition-colors ${
isActive
? 'bg-gray-100 text-gray-900'
: 'text-gray-600 hover:bg-gray-50 hover:text-gray-900'
? "bg-gray-100 text-gray-900"
: "text-gray-600 hover:bg-gray-50 hover:text-gray-900"
}`}
>
{item.name}
@@ -53,7 +55,7 @@ export function Layout() {
{me?.owner ? (
<div className="flex items-center space-x-2">
<span className="text-sm text-gray-600">
{me.entra ? '✓ Entra' : ''} {me.discord ? '✓ Discord' : ''}
{me.entra ? "✓ Entra" : ""} {me.discord ? "✓ Discord" : ""}
</span>
<a
href="/auth/logout"
@@ -85,7 +87,8 @@ export function Layout() {
Authentication Required
</h2>
<p className="text-gray-600 mb-6">
Please authenticate with both Entra ID and Discord to access the dashboard.
Please authenticate with both Entra ID and Discord to access the
dashboard.
</p>
<div className="flex justify-center space-x-4">
<a href="/auth/entra/login" className="btn-secondary">