lil update bro

This commit is contained in:
k
2026-09-21 11:24:16 +02:00
parent 739c14324a
commit d37f4efd69
6 changed files with 171 additions and 59 deletions
+4 -6
View File
@@ -1,8 +1,8 @@
import { useEffect, useState } from "react";
import { Bot, Globe, Sparkles, User as UserIcon } from "lucide-react";
import { Bot, Globe, User as UserIcon } from "lucide-react";
import { api } from "../lib/api.ts";
import type { SharedChat } from "../lib/types.ts";
import { Avatar } from "./ui.tsx";
import { Avatar, LOGO_URL, Logo } from "./ui.tsx";
import { Markdown } from "./Markdown.tsx";
export function SharePage({ publicId }: { publicId: string }) {
@@ -19,9 +19,7 @@ export function SharePage({ publicId }: { publicId: string }) {
<div className="min-h-full">
<header className="border-b border-stone-200/70 bg-white/70 backdrop-blur dark:border-zinc-800 dark:bg-zinc-900/70">
<div className="mx-auto flex w-full max-w-3xl items-center gap-2.5 px-4 py-3">
<span className="grid h-9 w-9 place-items-center rounded-2xl bg-gradient-to-br from-emerald-500 to-teal-600 text-white">
<Sparkles size={17} />
</span>
<Logo size={36} className="rounded-2xl" />
<div className="min-w-0 flex-1">
<p className="truncate font-semibold">{chat?.title ?? "Shared chat"}</p>
{chat && (
@@ -41,7 +39,7 @@ export function SharePage({ publicId }: { publicId: string }) {
{!chat && !error && <p className="py-16 text-center text-sm opacity-60">Loading shared chat…</p>}
{chat?.messages.map((m, i) => (
<div key={i} className="flex gap-3">
<Avatar name={m.role === "user" ? chat.authorName : "KisAssistant"} size={32} />
<Avatar name={m.role === "user" ? chat.authorName : "KisAssistant"} url={m.role === "user" ? undefined : LOGO_URL} size={32} />
<div className="min-w-0 max-w-[90%] flex-1">
<div className="mb-1 flex items-center gap-1.5 text-xs opacity-60">
{m.role === "user" ? <UserIcon size={12} /> : <Bot size={12} />}