feature: delete files and torrents.

This commit is contained in:
xNinjaKittyx
2025-12-15 21:14:16 +00:00
parent 796de41fd7
commit 380de78b51
8 changed files with 177 additions and 29 deletions

View File

@@ -22,6 +22,7 @@
let email = $state('');
let password = $state('');
let errorMessage = $state('');
let successMessage = $state('');
let isLoading = $state(false);
async function handleLogin(event: Event) {
@@ -29,6 +30,7 @@
isLoading = true;
errorMessage = '';
successMessage = '';
const { error, response } = await client.POST('/api/v1/auth/cookie/login', {
body: {
@@ -45,8 +47,8 @@
if (!error) {
console.log('Login successful!');
console.log('Received User Data: ', response);
errorMessage = 'Login successful! Redirecting...';
toast.success(errorMessage);
successMessage = 'Login successful! Redirecting...';
toast.success(successMessage);
goto(resolve('/dashboard', {}));
} else {
toast.error('Login failed!');
@@ -100,6 +102,13 @@
</Alert.Root>
{/if}
{#if successMessage}
<Alert.Root variant="default">
<Alert.Title>Success</Alert.Title>
<Alert.Description>{successMessage}</Alert.Description>
</Alert.Root>
{/if}
{#if isLoading}
<LoadingBar />
{/if}