terminal initializes successfully, scuffed intro visuals, termianl still visible with the login form, user temporarily locked to gornodox only. all algorithms work for now, needs to check for bugs and merge to master befpre build. SIDE NOTE - *Make domain builds only from the* master *branch.*

This commit is contained in:
2026-03-05 19:50:05 +01:00
parent 9ac27f5fbd
commit 43589410e3
18 changed files with 288 additions and 119 deletions
+2
View File
@@ -3,6 +3,7 @@
import favicon from '$lib/assets/favicon.svg';
import { onMount, type Snippet } from 'svelte';
import { theme } from '$lib/stores/theme';
import Loading from '../modules/Loading.svelte';
let { children }: { children: Snippet } = $props();
@@ -42,6 +43,7 @@
class:dark={$theme === 'dark'}
class:light={$theme === 'light'}
>
{@render children()}
</main>
+19
View File
@@ -0,0 +1,19 @@
import { PASSWD } from "$lib/stores/bash/etc/userData";
import type { Actions } from "./$types";
export const actions = {
login: async ({request}) => {
const user = PASSWD.find((object) => object.username == "gornodox");
let data = await request.formData();
let out = data.get("password")?.toString();
let error = false;
let success = true
if(out != user?.passwd || out == undefined) {
error = true;
success = false;
}
return { error, success, data: out };
}
} satisfies Actions
+39 -5
View File
@@ -1,14 +1,48 @@
<script lang="ts">
import TerminalModule from '../modules/Terminal.svelte';
import Settings from '../modules/Settings.svelte';
import Loading from '../modules/Loading.svelte';
import { isInitializing } from '$lib/stores/terminal/init.svelte';
import Login from '../modules/Login.svelte';
import { mount } from 'svelte';
import Terminal from '../modules/Terminal.svelte';
import { CircleAlert } from '@lucide/svelte';
let { form } = $props();
//export let isWelcomeSequence = false;
let terminalComponent: Terminal;
function welcomeSequence() {
//isWelcomeSequence = true;
//TODO: do magic :)
}
function initializer(formData: FormData) {
if(form?.error) return;
const password = formData.get("password")?.toString();
if(!password) throw new Error("password is null or undefined");
terminalComponent.init(password)
}
</script>
<Settings></Settings>
<div class="h-dvh w-full p-24 flex justify-center">
<TerminalModule />
<div id="main" class="h-dvh w-full p-24 relative flex justify-center items-center">
<div id="wrapper1" class=" absolute z-5 flex flex-col items-center {form?.success ? 'outro' : ''}">
<Login init={initializer} form={form}/>
</div>
<div id="wrapper2" class=" size-4/5 absolute z-4 {form?.success ? 'intro' : ''}">
<Terminal bind:this={terminalComponent} />
</div>
</div>
<style>
</style>
.outro {
animation: fadeOut 0.5s forwards cubic-bezier(.4,.7,0,.99) 1s;
}
@keyframes fadeOut {
to {
opacity: 0;
display: none;
}
}
</style>
+10
View File
@@ -0,0 +1,10 @@
<script>
import Login from "../../modules/Login.svelte";
</script>
<div class=" flex flex-col items-center">
<div class=" absolute left-1/2 z-11">
<Login init={() => {}}/>
</div>
<div class=" absolute top-1/2 left-1/2 size-96 z-10 bg-red-600"></div>
</div>