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 { useNanostore$ } from "~/hooks/nanostores";
import { userInfo } from "~/lib/stores";
import { StereoUser } from "~/lib/types";
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 (
<div class="bg-blue-500">
<p>whats on the agenda today, @hexlocation?</p>
<div class="py-4 rounded-lg">
<p class="font-medium text-4xl text-stereo/45">
{splits[0]}
<span class="text-stereo">
@{user.value?.username || "..."}
</span>
{splits[1]}
</p>
</div>
)
})

View file

@ -3,4 +3,10 @@ import { StereoFile, StereoUser } from "./types";
export const areFilesLoaded = atom<boolean>(false);
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 (
<>
<div class="flex flex-col w-full h-screen p-8 bg-gradient-to-b from-stereo/20 to-transparent">
<TitleBar />
<Files files={files} loaded={loaded} />
<OSBar />
</>
</div>
);
});

View file

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