Projekt-Cleanup: Alle Dateien basierend auf .gitignore neu indexiert
This commit is contained in:
@@ -1,173 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Link, usePage } from '@inertiajs/vue3';
|
||||
import { LayoutGrid, Gift, Settings, LogOut, Menu, X, Bell, CheckCircle, AlertCircle, Info } from 'lucide-vue-next';
|
||||
import { ref, watch, onMounted } from 'vue';
|
||||
|
||||
const isSidebarOpen = ref(true);
|
||||
const page = usePage();
|
||||
|
||||
const navItems = [
|
||||
{ title: 'Dashboard', href: '/dashboard', icon: LayoutGrid },
|
||||
{ title: 'Bonuses', href: '/admin/bonuses', icon: Gift },
|
||||
{ title: 'Settings', href: '/admin/settings', icon: Settings },
|
||||
];
|
||||
|
||||
const notification = ref<{ message: string; type: 'success' | 'error' | 'info' } | null>(null);
|
||||
|
||||
const showNotification = (message: string, type: 'success' | 'error' | 'info' = 'success') => {
|
||||
notification.value = { message, type };
|
||||
setTimeout(() => {
|
||||
notification.value = null;
|
||||
}, 5000);
|
||||
};
|
||||
|
||||
// Safely watch for flash messages from Inertia
|
||||
watch(() => page.props.flash, (flash: any) => {
|
||||
if (flash?.success) showNotification(flash.success, 'success');
|
||||
if (flash?.error) showNotification(flash.error, 'error');
|
||||
}, { deep: true });
|
||||
|
||||
onMounted(() => {
|
||||
// Initial check for flash messages
|
||||
const flash = page.props.flash as any;
|
||||
if (flash?.success) showNotification(flash.success, 'success');
|
||||
if (flash?.error) showNotification(flash.error, 'error');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen bg-[#020617] text-white font-sans selection:bg-purple-500/30">
|
||||
<!-- Notifications -->
|
||||
<div class="fixed top-6 right-6 z-[100] space-y-4 max-w-md w-full">
|
||||
<TransitionGroup
|
||||
enter-active-class="transform transition duration-300 ease-out"
|
||||
enter-from-class="translate-y-[-20px] opacity-0"
|
||||
enter-to-class="translate-y-0 opacity-100"
|
||||
leave-active-class="transition duration-200 ease-in"
|
||||
leave-from-class="opacity-100"
|
||||
leave-to-class="opacity-0"
|
||||
>
|
||||
<div
|
||||
v-if="notification"
|
||||
:key="notification.message"
|
||||
:class="[
|
||||
'p-4 rounded-2xl border backdrop-blur-xl shadow-2xl flex items-center gap-4',
|
||||
notification.type === 'success' ? 'bg-green-500/10 border-green-500/20 text-green-400' :
|
||||
notification.type === 'error' ? 'bg-red-500/10 border-red-500/20 text-red-400' :
|
||||
'bg-blue-500/10 border-blue-500/20 text-blue-400'
|
||||
]"
|
||||
>
|
||||
<CheckCircle v-if="notification.type === 'success'" :size="20" />
|
||||
<AlertCircle v-else-if="notification.type === 'error'" :size="20" />
|
||||
<Info v-else :size="20" />
|
||||
<span class="text-sm font-bold tracking-tight">{{ notification.message }}</span>
|
||||
<button @click="notification = null" class="ml-auto hover:opacity-70 transition">
|
||||
<X :size="16" />
|
||||
</button>
|
||||
</div>
|
||||
</TransitionGroup>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<aside
|
||||
:class="[
|
||||
'fixed left-0 top-0 h-full bg-[#0f172a] border-r border-white/5 z-50 transition-all duration-300 shadow-2xl shadow-black',
|
||||
isSidebarOpen ? 'w-64' : 'w-20'
|
||||
]"
|
||||
>
|
||||
<div class="p-6 flex items-center justify-between">
|
||||
<div v-if="isSidebarOpen" class="text-xl font-black italic tracking-tighter text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-blue-500">
|
||||
BRATAN ADMIN
|
||||
</div>
|
||||
<button @click="isSidebarOpen = !isSidebarOpen" class="text-gray-400 hover:text-white transition p-1 rounded-lg hover:bg-white/5">
|
||||
<Menu v-if="!isSidebarOpen" :size="20" />
|
||||
<X v-else :size="20" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<nav class="mt-10 px-4 space-y-2">
|
||||
<Link
|
||||
v-for="item in navItems"
|
||||
:key="item.href"
|
||||
:href="item.href"
|
||||
:class="[
|
||||
'flex items-center gap-4 px-4 py-3 rounded-xl transition-all duration-200 group',
|
||||
$page.url.startsWith(item.href)
|
||||
? 'bg-gradient-to-r from-purple-600 to-blue-600 text-white shadow-lg shadow-purple-500/20'
|
||||
: 'text-gray-400 hover:bg-white/5 hover:text-white'
|
||||
]"
|
||||
>
|
||||
<component :is="item.icon" :size="20" :class="$page.url.startsWith(item.href) ? 'text-white' : 'group-hover:text-purple-400'" />
|
||||
<span v-if="isSidebarOpen" class="font-bold text-sm tracking-wide uppercase">{{ item.title }}</span>
|
||||
</Link>
|
||||
</nav>
|
||||
|
||||
<div class="absolute bottom-8 left-0 w-full px-4">
|
||||
<Link
|
||||
href="/logout"
|
||||
method="post"
|
||||
as="button"
|
||||
class="w-full flex items-center gap-4 px-4 py-3 text-gray-400 hover:bg-red-500/10 hover:text-red-400 rounded-xl transition-all duration-200 group"
|
||||
>
|
||||
<LogOut :size="20" />
|
||||
<span v-if="isSidebarOpen" class="font-bold text-sm tracking-wide uppercase">Logout</span>
|
||||
</Link>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main
|
||||
:class="[
|
||||
'transition-all duration-300 min-h-screen pb-20',
|
||||
isSidebarOpen ? 'ml-64' : 'ml-20'
|
||||
]"
|
||||
>
|
||||
<!-- Top Header -->
|
||||
<header class="h-20 border-b border-white/5 bg-[#020617]/50 backdrop-blur-md sticky top-0 z-40 px-8 flex items-center justify-between">
|
||||
<div>
|
||||
<h2 class="text-xs font-black text-gray-500 uppercase tracking-[0.2em]">Admin Management</h2>
|
||||
<div class="flex items-center gap-2 text-sm">
|
||||
<span class="text-white font-medium capitalize">{{ $page.url.split('/')[2] || 'Dashboard' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-6">
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="text-right">
|
||||
<div class="text-sm font-bold">{{ page.props.auth.user.name }}</div>
|
||||
<div class="text-[10px] text-purple-400 font-black uppercase tracking-widest">Administrator</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-purple-500 to-blue-500 p-[2px]">
|
||||
<div class="w-full h-full rounded-full bg-[#0f172a] flex items-center justify-center font-bold text-xs">
|
||||
{{ page.props.auth.user.name.charAt(0) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="p-8">
|
||||
<slot />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@reference "../../css/app.css";
|
||||
|
||||
/* Custom Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background: #020617;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #1e293b;
|
||||
border-radius: 10px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #334155;
|
||||
}
|
||||
</style>
|
||||
@@ -1,14 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import AppLayout from '@/layouts/app/AppSidebarLayout.vue';
|
||||
import type { BreadcrumbItem } from '@/types';
|
||||
|
||||
const { breadcrumbs = [] } = defineProps<{
|
||||
breadcrumbs?: BreadcrumbItem[];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :breadcrumbs="breadcrumbs">
|
||||
<slot />
|
||||
</AppLayout>
|
||||
</template>
|
||||
@@ -1,14 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import AuthLayout from '@/layouts/auth/AuthSimpleLayout.vue';
|
||||
|
||||
const { title = '', description = '' } = defineProps<{
|
||||
title?: string;
|
||||
description?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthLayout :title="title" :description="description">
|
||||
<slot />
|
||||
</AuthLayout>
|
||||
</template>
|
||||
@@ -1,23 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import AppContent from '@/components/AppContent.vue';
|
||||
import AppHeader from '@/components/AppHeader.vue';
|
||||
import AppShell from '@/components/AppShell.vue';
|
||||
import type { BreadcrumbItem } from '@/types';
|
||||
|
||||
type Props = {
|
||||
breadcrumbs?: BreadcrumbItem[];
|
||||
};
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
breadcrumbs: () => [],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppShell variant="header">
|
||||
<AppHeader :breadcrumbs="breadcrumbs" />
|
||||
<AppContent variant="header">
|
||||
<slot />
|
||||
</AppContent>
|
||||
</AppShell>
|
||||
</template>
|
||||
@@ -1,25 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import AppContent from '@/components/AppContent.vue';
|
||||
import AppShell from '@/components/AppShell.vue';
|
||||
import AppSidebar from '@/components/AppSidebar.vue';
|
||||
import AppSidebarHeader from '@/components/AppSidebarHeader.vue';
|
||||
import type { BreadcrumbItem } from '@/types';
|
||||
|
||||
type Props = {
|
||||
breadcrumbs?: BreadcrumbItem[];
|
||||
};
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
breadcrumbs: () => [],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppShell variant="sidebar">
|
||||
<AppSidebar />
|
||||
<AppContent variant="sidebar" class="overflow-x-hidden">
|
||||
<AppSidebarHeader :breadcrumbs="breadcrumbs" />
|
||||
<slot />
|
||||
</AppContent>
|
||||
</AppShell>
|
||||
</template>
|
||||
@@ -1,50 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import AppLogoIcon from '@/components/AppLogoIcon.vue';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '@/components/ui/card';
|
||||
import { home } from '@/routes';
|
||||
|
||||
defineProps<{
|
||||
title?: string;
|
||||
description?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10"
|
||||
>
|
||||
<div class="flex w-full max-w-md flex-col gap-6">
|
||||
<Link
|
||||
:href="home()"
|
||||
class="flex items-center gap-2 self-center font-medium"
|
||||
>
|
||||
<div class="flex h-9 w-9 items-center justify-center">
|
||||
<AppLogoIcon
|
||||
class="size-9 fill-current text-black dark:text-white"
|
||||
/>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
<div class="flex flex-col gap-6">
|
||||
<Card class="rounded-xl">
|
||||
<CardHeader class="px-10 pt-8 pb-0 text-center">
|
||||
<CardTitle class="text-xl">{{ title }}</CardTitle>
|
||||
<CardDescription>
|
||||
{{ description }}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent class="px-10 py-8">
|
||||
<slot />
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,39 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import { home } from '@/routes';
|
||||
|
||||
defineProps<{
|
||||
title?: string;
|
||||
description?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="min-h-screen bg-[#020617] text-white flex flex-col justify-center items-center relative overflow-hidden">
|
||||
|
||||
<!-- Background Stars (simple CSS version to avoid canvas logic here) -->
|
||||
<div class="fixed inset-0 w-full h-full z-0 bg-[radial-gradient(circle_at_center,#0f172a_0%,#020617_100%)]"></div>
|
||||
<div class="absolute w-[800px] h-[800px] rounded-full bg-purple-600/10 blur-[150px] -top-64 -right-64 z-0 pointer-events-none"></div>
|
||||
<div class="absolute w-[600px] h-[600px] rounded-full bg-blue-600/10 blur-[150px] -bottom-64 -left-64 z-0 pointer-events-none"></div>
|
||||
|
||||
<div class="w-full max-w-md relative z-10 p-8 bg-gray-900/60 backdrop-blur-xl border border-white/10 rounded-3xl shadow-2xl">
|
||||
<div class="flex flex-col gap-8">
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<Link
|
||||
:href="home()"
|
||||
class="text-2xl font-black italic tracking-tighter uppercase text-white hover:opacity-80 transition-opacity"
|
||||
>
|
||||
BRATANBONUS.NET
|
||||
</Link>
|
||||
<div class="space-y-2 text-center mt-4">
|
||||
<h1 class="text-2xl font-bold">{{ title }}</h1>
|
||||
<p class="text-center text-sm text-gray-400">
|
||||
{{ description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,47 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Link, usePage } from '@inertiajs/vue3';
|
||||
import AppLogoIcon from '@/components/AppLogoIcon.vue';
|
||||
import { home } from '@/routes';
|
||||
|
||||
const page = usePage();
|
||||
const name = page.props.name;
|
||||
|
||||
defineProps<{
|
||||
title?: string;
|
||||
description?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="relative grid h-dvh flex-col items-center justify-center px-8 sm:px-0 lg:max-w-none lg:grid-cols-2 lg:px-0"
|
||||
>
|
||||
<div
|
||||
class="relative hidden h-full flex-col bg-muted p-10 text-white lg:flex dark:border-r"
|
||||
>
|
||||
<div class="absolute inset-0 bg-zinc-900" />
|
||||
<Link
|
||||
:href="home()"
|
||||
class="relative z-20 flex items-center text-lg font-medium"
|
||||
>
|
||||
<AppLogoIcon class="mr-2 size-8 fill-current text-white" />
|
||||
{{ name }}
|
||||
</Link>
|
||||
</div>
|
||||
<div class="lg:p-8">
|
||||
<div
|
||||
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]"
|
||||
>
|
||||
<div class="flex flex-col space-y-2 text-center">
|
||||
<h1 class="text-xl font-medium tracking-tight" v-if="title">
|
||||
{{ title }}
|
||||
</h1>
|
||||
<p class="text-sm text-muted-foreground" v-if="description">
|
||||
{{ description }}
|
||||
</p>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,71 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
import Heading from '@/components/Heading.vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { useCurrentUrl } from '@/composables/useCurrentUrl';
|
||||
import { toUrl } from '@/lib/utils';
|
||||
import { edit as editAppearance } from '@/routes/appearance';
|
||||
import { edit as editProfile } from '@/routes/profile';
|
||||
import { edit as editSecurity } from '@/routes/security';
|
||||
import type { NavItem } from '@/types';
|
||||
|
||||
const sidebarNavItems: NavItem[] = [
|
||||
{
|
||||
title: 'Profile',
|
||||
href: editProfile(),
|
||||
},
|
||||
{
|
||||
title: 'Security',
|
||||
href: editSecurity(),
|
||||
},
|
||||
{
|
||||
title: 'Appearance',
|
||||
href: editAppearance(),
|
||||
},
|
||||
];
|
||||
|
||||
const { isCurrentOrParentUrl } = useCurrentUrl();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="px-4 py-6">
|
||||
<Heading
|
||||
title="Settings"
|
||||
description="Manage your profile and account settings"
|
||||
/>
|
||||
|
||||
<div class="flex flex-col lg:flex-row lg:space-x-12">
|
||||
<aside class="w-full max-w-xl lg:w-48">
|
||||
<nav
|
||||
class="flex flex-col space-y-1 space-x-0"
|
||||
aria-label="Settings"
|
||||
>
|
||||
<Button
|
||||
v-for="item in sidebarNavItems"
|
||||
:key="toUrl(item.href)"
|
||||
variant="ghost"
|
||||
:class="[
|
||||
'w-full justify-start',
|
||||
{ 'bg-muted': isCurrentOrParentUrl(item.href) },
|
||||
]"
|
||||
as-child
|
||||
>
|
||||
<Link :href="item.href">
|
||||
<component :is="item.icon" class="h-4 w-4" />
|
||||
{{ item.title }}
|
||||
</Link>
|
||||
</Button>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<Separator class="my-6 lg:hidden" />
|
||||
|
||||
<div class="flex-1 md:max-w-2xl">
|
||||
<section class="max-w-xl space-y-12">
|
||||
<slot />
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user