Initial commit of YouTube Downloader application, including core functionality for downloading videos, user authentication, and Docker support. Added configuration files, environment setup, and basic UI components using Astro.js and Tailwind CSS.
This commit is contained in:
23
src/pages/index.astro
Normal file
23
src/pages/index.astro
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
import LoginForm from '../components/LoginForm.astro';
|
||||
import { getSession, isLoginEnabled } from '../lib/session';
|
||||
|
||||
const loginEnabled = isLoginEnabled();
|
||||
|
||||
// Wenn Login deaktiviert ist, direkt zu /download weiterleiten
|
||||
if (!loginEnabled) {
|
||||
return Astro.redirect('/download');
|
||||
}
|
||||
|
||||
const session = await getSession(Astro.request);
|
||||
|
||||
if (session) {
|
||||
return Astro.redirect('/download');
|
||||
}
|
||||
---
|
||||
|
||||
<Layout title="Login">
|
||||
<LoginForm />
|
||||
</Layout>
|
||||
|
||||
Reference in New Issue
Block a user