Initial commit

This commit is contained in:
2025-10-31 22:35:12 -07:00
commit 426fe66baa
38 changed files with 2239 additions and 0 deletions

35
src/app/layout.tsx Normal file
View File

@@ -0,0 +1,35 @@
'use client'
import { Lexend } from 'next/font/google'
import './globals.css'
import { getCurrentWindow } from '@tauri-apps/api/window'
import { useEffect } from 'react'
const lexend = Lexend({
subsets: ['latin']
})
export default function RootLayout ({
children
}: Readonly<{
children: React.ReactNode
}>) {
const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
if ((e.target as HTMLElement).closest('button')) return
getCurrentWindow().startDragging()
}
useEffect(() => {
document.body.addEventListener('mousedown', handleMouseDown as any)
return () =>
document.body.removeEventListener('mousedown', handleMouseDown as any)
}, [])
return (
<html lang='en'>
<body className={lexend.className}>
<div className='w-max h-screen'>{children}</div>
</body>
</html>
)
}