This commit is contained in:
grngxd 2025-06-21 17:44:55 +01:00
parent f47a1b2226
commit f164351011
4 changed files with 43 additions and 6 deletions

View file

@ -1,9 +1,41 @@
import { component$ } from "@builder.io/qwik"; import { component$ } from "@builder.io/qwik";
import { useNanostore$ } from "~/hooks/nanostores";
import { userInfo } from "~/lib/stores";
import { StereoUser } from "~/lib/types";
export default component$(() => { export default component$(() => {
const greetings = [
"what's on the agenda today, |?",
"what's on your mind, |?",
"what's the plan, |?",
"ready to rock, |?",
"what's brewing, |?",
"what's the latest, |?",
"how's your day going, |?",
"need some inspiration, |?",
"let's make some noise, |!",
"welcome back, |!",
"good to see you, |!",
"what are we making today, |?",
"time to make some magic, |!",
"let's get creative, |?",
"what's the vibe today, |?",
]
const greeting = greetings[Math.floor(Math.random() * greetings.length)];
const user = useNanostore$<StereoUser>(userInfo);
const splits = greeting.split("|");
return ( return (
<div class="bg-blue-500"> <div class="py-4 rounded-lg">
<p>whats on the agenda today, @hexlocation?</p> <p class="font-medium text-4xl text-stereo/45">
{splits[0]}
<span class="text-stereo">
@{user.value?.username || "..."}
</span>
{splits[1]}
</p>
</div> </div>
) )
}) })

View file

@ -3,4 +3,10 @@ import { StereoFile, StereoUser } from "./types";
export const areFilesLoaded = atom<boolean>(false); export const areFilesLoaded = atom<boolean>(false);
export const dashboardFiles = atom<StereoFile[]>([]); export const dashboardFiles = atom<StereoFile[]>([]);
export const userInfo = atom<StereoUser>({} as StereoUser); export const userInfo = atom<StereoUser>({
id: "1",
username: "user",
blacklisted: false,
email: "user@example.com",
created_at: Date.now().toString(),
});

View file

@ -26,11 +26,11 @@ export default component$(() => {
}); });
return ( return (
<> <div class="flex flex-col w-full h-screen p-8 bg-gradient-to-b from-stereo/20 to-transparent">
<TitleBar /> <TitleBar />
<Files files={files} loaded={loaded} /> <Files files={files} loaded={loaded} />
<OSBar /> <OSBar />
</> </div>
); );
}); });

View file

@ -11,7 +11,6 @@ export default component$(() => {
useOnDocument("DOMContentLoaded", $(async () => { useOnDocument("DOMContentLoaded", $(async () => {
info.value = await api.me() info.value = await api.me()
console.log(info.value);
AOS.init({ AOS.init({
once: true, once: true,