initial commit

This commit is contained in:
2026-04-09 16:06:44 -06:00
commit e9943fdb9b
321 changed files with 31521 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import { router } from '@inertiajs/vue3';
import { toast } from 'vue-sonner';
import type { FlashToast } from '@/types/ui';
export function initializeFlashToast(): void {
router.on('flash', (event) => {
const flash = (event as CustomEvent).detail?.flash;
const data = flash?.toast as FlashToast | undefined;
if (!data) {
return;
}
toast[data.type](data.message);
});
}
+12
View File
@@ -0,0 +1,12 @@
import type { InertiaLinkProps } from '@inertiajs/vue3';
import { clsx } from 'clsx';
import type { ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function toUrl(href: NonNullable<InertiaLinkProps['href']>) {
return typeof href === 'string' ? href : href?.url;
}