Refactoring AI candidate analysis: UI improvements, data normalization, provider management and real-time score clamping

This commit is contained in:
jeremy bayse
2026-04-21 06:41:37 +02:00
parent abfe01190b
commit 2216de1a02
19 changed files with 1793 additions and 1402 deletions

View File

@@ -1,203 +1,264 @@
<script setup>
/**
* AdminLayout.vue — Layout principal admin redesigné
* RecruitQuizz v2.4
*
* Changements vs version précédente :
* - Sidebar 220px (collapsible → 64px) avec transition douce
* - Header 60px épuré, titre avec accent bar or
* - Fond neutral (#f0ece4) sur le contenu principal
* - Items nav : rounded-xl, active bg-highlight text-highlight-dark
* - Footer sidebar : avatar + nom + version + logout
*/
import { ref } from 'vue';
import { Link } from '@inertiajs/vue3';
import ApplicationLogo from '@/Components/ApplicationLogo.vue';
import { Link, usePage } from '@inertiajs/vue3';
import Dropdown from '@/Components/Dropdown.vue';
import DropdownLink from '@/Components/DropdownLink.vue';
import EnvironmentBanner from '@/Components/EnvironmentBanner.vue';
const page = usePage();
const isSidebarOpen = ref(true);
// ─── Navigation ────────────────────────────────────────────────────────────
const navItems = [
{
route: 'dashboard',
label: 'Tableau de bord',
icon: 'M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M9 22V12h6v10',
},
{
route: 'admin.candidates.index',
match: 'admin.candidates.*',
label: 'Candidats',
icon: 'M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2 M9 11a4 4 0 100-8 4 4 0 000 8z M23 21v-2a4 4 0 00-3-3.87 M16 3.13a4 4 0 010 7.75',
},
{
route: 'admin.quizzes.index',
match: 'admin.quizzes.*',
label: 'Quiz',
icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2M9 12l2 2 4-4',
},
{
route: 'admin.job-positions.index',
match: 'admin.job-positions.*',
label: 'Fiches de Poste',
icon: 'M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z',
},
{
route: 'admin.comparative',
label: 'Comparateur',
icon: 'M18 20V10 M12 20V4 M6 20v-6',
},
];
const superAdminItems = [
{
route: 'admin.tenants.index',
match: 'admin.tenants.*',
label: 'Structures',
icon: 'M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4',
},
{
route: 'admin.users.index',
match: 'admin.users.*',
label: 'Équipe SaaS',
icon: 'M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z',
},
{
route: 'admin.logs.index',
match: 'admin.logs.*',
label: 'Logs connexion',
icon: 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01',
},
];
const isActive = (item) => {
if (item.match) return route().current(item.match);
return route().current(item.route);
};
</script>
<template>
<EnvironmentBanner />
<div class="min-h-screen bg-sand flex text-anthracite font-sans selection:bg-highlight selection:text-anthracite">
<!-- Sidebar -->
<div class="min-h-screen flex bg-neutral font-sans text-ink selection:bg-highlight selection:text-highlight-dark">
<!-- Sidebar -->
<aside
:class="[isSidebarOpen ? 'w-64' : 'w-20']"
class="hidden md:flex flex-col bg-primary transition-all duration-300 shadow-xl z-20"
:class="[
isSidebarOpen ? 'w-[220px]' : 'w-16',
'hidden md:flex flex-col bg-primary shadow-xl z-20 transition-all duration-300 shrink-0'
]"
>
<div class="h-16 flex items-center px-5 bg-primary/90 border-b border-white/10">
<Link :href="route('dashboard')" class="flex items-center gap-3 overflow-hidden ml-1">
<div class="w-8 h-8 bg-highlight rounded flex items-center justify-center shrink-0 shadow-sm shadow-highlight/20">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-[#3a2800]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9l-.707.707M12 18v3m4.95-4.95l.707.707M12 3c-4.418 0-8 3.582-8 8 0 2.209.895 4.209 2.343 5.657L12 21l5.657-5.343A7.994 7.994 0 0020 11c0-4.418-3.582-8-8-8z" />
<!-- Logo -->
<div class="h-[60px] flex items-center border-b border-white/[0.07] px-4 shrink-0">
<Link :href="route('dashboard')" class="flex items-center gap-3 overflow-hidden">
<!-- Icône -->
<div class="w-[30px] h-[30px] bg-highlight rounded-lg flex items-center justify-center shrink-0 shadow-gold">
<svg class="w-4 h-4 text-highlight-dark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
</svg>
</div>
<span v-if="isSidebarOpen" class="font-serif font-black text-xl tracking-tight whitespace-nowrap text-white">RECRU<span class="text-accent italic px-0.5">IT</span></span>
<!-- Wordmark -->
<Transition name="fade">
<span v-if="isSidebarOpen" class="font-serif font-black text-[17px] text-white tracking-tight whitespace-nowrap">
RECRU<span class="text-highlight italic">IT</span>
</span>
</Transition>
</Link>
</div>
<nav class="flex-1 py-6 px-3 space-y-1.5 overflow-y-auto custom-scrollbar">
<Link
:href="route('dashboard')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('dashboard') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Tableau de bord</span>
</Link>
<!-- Nav principale -->
<nav class="flex-1 px-2.5 py-4 space-y-0.5 overflow-y-auto scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent">
<!-- Items principaux -->
<template v-for="item in navItems" :key="item.route">
<Link
:href="route(item.route)"
:title="!isSidebarOpen ? item.label : undefined"
:class="[
'flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-150 font-sans font-bold text-[12.5px] tracking-[0.01em]',
isSidebarOpen ? '' : 'justify-center',
isActive(item)
? 'bg-highlight text-highlight-dark shadow-md shadow-highlight/20'
: 'text-white/70 hover:bg-white/10 hover:text-white',
]"
>
<svg class="w-[17px] h-[17px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path :d="item.icon"/>
</svg>
<span v-if="isSidebarOpen" class="truncate">{{ item.label }}</span>
</Link>
</template>
<Link
:href="route('admin.candidates.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.candidates.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Candidats</span>
</Link>
<!-- Section super admin -->
<template v-if="$page.props.auth.user.role === 'super_admin'">
<div class="pt-4 pb-2">
<div
v-if="isSidebarOpen"
class="px-3 text-[9px] font-black uppercase tracking-[0.18em] text-white/25"
>Configuration</div>
<div v-else class="h-px w-8 mx-auto bg-white/10" />
</div>
<Link
:href="route('admin.quizzes.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.quizzes.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Quiz</span>
</Link>
<Link
:href="route('admin.job-positions.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.job-positions.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Fiches de Poste</span>
</Link>
<Link
:href="route('admin.comparative')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.comparative') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Comparateur</span>
</Link>
<div v-if="$page.props.auth.user.role === 'super_admin'" class="pt-4 pb-2">
<div v-show="isSidebarOpen" class="px-3 text-[10px] font-black uppercase tracking-widest text-white/30">Configuration</div>
<div v-show="!isSidebarOpen" class="h-[1px] w-8 mx-auto bg-white/10"></div>
</div>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.tenants.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.tenants.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Structures</span>
</Link>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.users.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.users.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Équipe SaaS</span>
</Link>
<Link
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.logs.index')"
class="flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-300 font-subtitle font-bold text-sm"
:class="[route().current('admin.logs.*') ? 'bg-highlight text-[#3a2800] shadow-md shadow-highlight/20' : 'text-white/70 hover:bg-white/10 hover:text-white']"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" />
</svg>
<span v-if="isSidebarOpen" class="truncate">Logs de connexion</span>
</Link>
<template v-for="item in superAdminItems" :key="item.route">
<Link
:href="route(item.route)"
:title="!isSidebarOpen ? item.label : undefined"
:class="[
'flex items-center gap-3 px-3 py-2.5 rounded-xl transition-all duration-150 font-sans font-bold text-[12.5px] tracking-[0.01em]',
isSidebarOpen ? '' : 'justify-center',
isActive(item)
? 'bg-highlight text-highlight-dark shadow-md shadow-highlight/20'
: 'text-white/70 hover:bg-white/10 hover:text-white',
]"
>
<svg class="w-[17px] h-[17px] shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path :d="item.icon"/>
</svg>
<span v-if="isSidebarOpen" class="truncate">{{ item.label }}</span>
</Link>
</template>
</template>
</nav>
<div class="p-4 border-t border-white/10 bg-primary/80">
<button
@click="isSidebarOpen = !isSidebarOpen"
class="flex items-center justify-center w-full h-10 rounded-lg text-white/50 hover:bg-white/10 hover:text-white transition-all duration-300"
>
<svg v-if="isSidebarOpen" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7" />
</svg>
<svg v-else xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 5l7 7-7 7" />
</svg>
</button>
<div v-show="isSidebarOpen" class="mt-4 text-[9px] font-bold uppercase tracking-widest text-[#3a7abf] text-center">
App v{{ $page.props.app_version }}
</div>
</div>
</aside>
<!-- Main Content -->
<div class="flex-1 flex flex-col min-w-0 overflow-hidden bg-neutral">
<header class="h-16 shrink-0 flex items-center justify-between px-8 bg-white border-b border-anthracite/5 shadow-sm z-10 relative">
<div>
<h2 v-if="$slots.header" class="font-serif font-black text-xl text-primary capitalize tracking-tight flex items-center gap-3">
<div class="w-1.5 h-6 bg-highlight rounded-full hidden md:block"></div>
<slot name="header" />
</h2>
</div>
<div class="flex items-center gap-4">
<!-- Footer sidebar : user + collapse -->
<div class="px-3 py-3 border-t border-white/[0.07] shrink-0">
<!-- User info (sidebar ouverte) -->
<div v-if="isSidebarOpen" class="flex items-center gap-2.5 mb-3">
<div class="w-8 h-8 rounded-full bg-highlight flex items-center justify-center text-[12px] font-black text-highlight-dark shrink-0">
{{ $page.props.auth.user.name.charAt(0) }}
</div>
<div class="overflow-hidden flex-1 min-w-0">
<div class="text-[12px] font-bold text-white truncate">{{ $page.props.auth.user.name }}</div>
<div class="text-[10px] text-white/40 truncate">{{ $page.props.auth.user.role }}</div>
</div>
<Dropdown align="right" width="48">
<template #trigger>
<button class="flex items-center gap-2 text-sm font-subtitle font-bold hover:text-primary transition-colors cursor-pointer py-2">
<div class="w-8 h-8 rounded-full bg-sand flex items-center justify-center text-primary border border-primary/10">
{{ $page.props.auth.user.name.charAt(0) }}
</div>
<span class="hidden md:block">{{ $page.props.auth.user.name }}</span>
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-anthracite/40" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
<button class="p-1.5 rounded-lg text-white/40 hover:text-white hover:bg-white/10 transition-colors">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>
</svg>
</button>
</template>
<template #content>
<DropdownLink :href="route('profile.edit')">Paramètres du profil</DropdownLink>
<DropdownLink :href="route('admin.backup')" as="a" class="!text-sky font-bold" v-if="$page.props.auth.user.role === 'super_admin'">Sauvegarde Base de données</DropdownLink>
<div class="border-t border-anthracite/5 my-1"></div>
<DropdownLink :href="route('logout')" method="post" as="button" class="!text-accent font-bold">Se déconnecter</DropdownLink>
<DropdownLink
v-if="$page.props.auth.user.role === 'super_admin'"
:href="route('admin.backup')"
as="a"
class="!text-primary-light font-bold"
>Sauvegarde BDD</DropdownLink>
<div class="border-t border-ink/5 my-1"/>
<DropdownLink :href="route('logout')" method="post" as="button" class="!text-accent font-bold">
Se déconnecter
</DropdownLink>
</template>
</Dropdown>
</div>
<!-- Collapse button -->
<button
@click="isSidebarOpen = !isSidebarOpen"
class="flex items-center justify-center w-full h-9 rounded-xl text-white/40 hover:bg-white/10 hover:text-white transition-all duration-200"
:title="isSidebarOpen ? 'Réduire' : 'Agrandir'"
>
<svg class="w-4 h-4 transition-transform duration-300" :class="isSidebarOpen ? '' : 'rotate-180'" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M15 18l-6-6 6-6"/>
</svg>
</button>
<!-- Version -->
<div v-if="isSidebarOpen" class="mt-2 text-center text-[9px] font-bold uppercase tracking-[0.12em] text-white/20">
v{{ $page.props.app_version }}
</div>
</div>
</aside>
<!-- Main -->
<div class="flex-1 flex flex-col min-w-0 overflow-hidden">
<!-- Header -->
<header class="h-[60px] shrink-0 flex items-center justify-between px-8 bg-surface border-b border-ink/[0.05] shadow-xs z-10">
<div class="flex items-center gap-3">
<!-- Accent bar -->
<div class="w-[3px] h-5 bg-highlight rounded-full hidden md:block" />
<!-- Page title -->
<h2 v-if="$slots.header" class="font-serif font-black text-[17px] text-primary tracking-tight">
<slot name="header" />
</h2>
</div>
<div class="flex items-center gap-3">
<!-- Slot pour actions contextuelles (ex: bouton "Nouveau") -->
<slot name="actions" />
<!-- Badge rôle -->
<span
v-if="$page.props.auth.user.role === 'super_admin'"
class="bg-gradient-to-r from-accent to-highlight text-white px-3 py-1 rounded-full text-[9px] font-black tracking-widest uppercase shadow-sm"
>GOD MODE</span>
<span
v-else-if="$page.props.auth.user.tenant"
class="bg-primary/10 text-primary px-3 py-1 rounded-full text-[9px] font-black tracking-widest uppercase border border-primary/20"
>{{ $page.props.auth.user.tenant.name }}</span>
</div>
</header>
<main class="flex-1 overflow-y-auto p-4 md:p-8">
<!-- Content -->
<main class="flex-1 overflow-y-auto p-7">
<slot />
</main>
</div>
</div>
</template>
<style>
/* Firefox scrollbar config for sidebar */
.custom-scrollbar {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.custom-scrollbar::-webkit-scrollbar {
width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.1);
border-radius: 10px;
}
<style scoped>
.fade-enter-active, .fade-leave-active { transition: opacity 0.15s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
/* Scrollbar sidebar Firefox */
.scrollbar-thin { scrollbar-width: thin; }
.scrollbar-thumb-white\/10 { scrollbar-color: rgba(255,255,255,0.1) transparent; }
</style>