feat(odin): refine hero — Newsreader serif, red name, staggered entrance
- Swap Fraunces → Newsreader (literary serif, full Czech, optical sizing). - Split the greeting so the user's first name renders in brand-red italic. - Add a subtle staggered fade-in (framer-motion), skipped under prefers-reduced-motion. - New description that names Odin and covers chat + invoice import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,21 +67,18 @@ export default function OdinChat() {
|
||||
// Odin itself only needs ai.use, so the Save affordance is gated separately.
|
||||
const canSave = hasPermission("invoices.create");
|
||||
// Time-based Czech greeting + the user's first name (client-local time).
|
||||
const greeting = (() => {
|
||||
const h = new Date().getHours();
|
||||
const part =
|
||||
h < 9
|
||||
? "Dobré ráno"
|
||||
: h < 12
|
||||
? "Dobrý den"
|
||||
: h < 18
|
||||
? "Dobré odpoledne"
|
||||
: "Dobrý večer";
|
||||
const name = (user?.fullName || user?.username || "")
|
||||
.trim()
|
||||
.split(/\s+/)[0];
|
||||
return name ? `${part}, ${name}` : part;
|
||||
})();
|
||||
const greetingHour = new Date().getHours();
|
||||
const greetingPhrase =
|
||||
greetingHour < 9
|
||||
? "Dobré ráno"
|
||||
: greetingHour < 12
|
||||
? "Dobrý den"
|
||||
: greetingHour < 18
|
||||
? "Dobré odpoledne"
|
||||
: "Dobrý večer";
|
||||
const userName = (user?.fullName || user?.username || "")
|
||||
.trim()
|
||||
.split(/\s+/)[0];
|
||||
const { data: usage } = useQuery(aiUsageOptions());
|
||||
const { data: convData, isPending: convPending } = useQuery(
|
||||
aiConversationsOptions(),
|
||||
@@ -441,7 +438,8 @@ export default function OdinChat() {
|
||||
turns={turns}
|
||||
busy={busy}
|
||||
loading={messagesLoading}
|
||||
greeting={greeting}
|
||||
greetingPhrase={greetingPhrase}
|
||||
userName={userName}
|
||||
threadRef={threadRef}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user