mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 17:58:10 +01:00
#144 put the bot pages on the brand. This does the other 60 files, so the whole product reads as one thing, and adds the guard that keeps it that way. ~410 raw palette classes became semantic tokens across the public marketing surface (/try, /enterprise, /about, /knowledge, /personal, /professionals, /bots, blog, navigation) and the app internals (dashboard, documents, chat, conversations, onboarding, auth, settings, profile). Gradient text is gone. Fifteen headings were `bg-gradient-to-r from-X to-Y bg-clip-text text-transparent`; they are now solid text-ink or text-action. globals.css says the identity is carried by typography, and a serif display does not need a gradient to do that. The 'B' mark was still a blue/purple gradient in BotNavigation's MOBILE menu. #144 only fixed the desktop header. Both now render the shared <Logo>. Three defects introduced mid-sweep and corrected, all caught by reading the diff rather than trusting the regex: - degenerate gradients (`from-action-tint to-action-tint`) collapsed to solid - dead hovers (tint on tint) rebased to bg-surface + hover:bg-action-tint - `to-action\b` matched the prefix of `to-action-hover`, so a collapse left a stray `bg-action-hover` as a BASE background in 11 places -- those are the primary, not the hover shade Deliberately NOT changed: - components/knowledge/Callout.tsx -- its blue is the `info` half of an info/warning/error triad. Semantic status colour is a separate scale from the brand accent, and warning is amber, so ochre-ing info would make the two nearly indistinguishable. - the custom-bot surfaces -- custom_bots.accent_color is a real column with a CHECK constraint and the owner picks it. User data, not a design token. Never-twice: tests/__tests__/lib/design-tokens.test.ts refuses any raw brand-palette class, and any bg-clip-text, outside those two documented exceptions. Mutation-verified -- swap one token back to bg-blue-600 and it fails and names the file. No allowlist debt: every other file was swept rather than excused. verify: format, lint, typecheck, 256 tests, build -- all green. Twelve pages smoke-tested and checked visually against a local production build. Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
122 lines
4.2 KiB
TypeScript
122 lines
4.2 KiB
TypeScript
'use client';
|
|
|
|
import Link from 'next/link';
|
|
import type { Route } from 'next';
|
|
|
|
export function QuickActions() {
|
|
return (
|
|
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-8">
|
|
<h2 className="text-lg font-semibold text-gray-900 mb-4">Quick Actions</h2>
|
|
<div className="grid grid-cols-2 md:grid-cols-5 gap-4">
|
|
<QuickActionCard
|
|
href="/documents"
|
|
icon={
|
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
strokeWidth={2}
|
|
d="M12 4v16m8-8H4"
|
|
/>
|
|
</svg>
|
|
}
|
|
label="Upload Document"
|
|
color="blue"
|
|
/>
|
|
<QuickActionCard
|
|
href="/bots/create"
|
|
icon={<span className="text-2xl">🤖</span>}
|
|
label="Create Bot"
|
|
color="purple"
|
|
/>
|
|
<QuickActionCard
|
|
href="/documents"
|
|
icon={
|
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
strokeWidth={2}
|
|
d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"
|
|
/>
|
|
</svg>
|
|
}
|
|
label="Chat with Docs"
|
|
color="green"
|
|
/>
|
|
<QuickActionCard
|
|
href="/bots/mine"
|
|
icon={
|
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
strokeWidth={2}
|
|
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
|
|
/>
|
|
</svg>
|
|
}
|
|
label="My Bots"
|
|
color="indigo"
|
|
/>
|
|
<QuickActionCard
|
|
href="/infrastructure"
|
|
icon={
|
|
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
strokeWidth={2}
|
|
d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
|
|
/>
|
|
<path
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
strokeWidth={2}
|
|
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
/>
|
|
</svg>
|
|
}
|
|
label="AI Settings"
|
|
color="orange"
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
interface QuickActionCardProps {
|
|
href: Route;
|
|
icon: React.ReactNode;
|
|
label: string;
|
|
color: 'blue' | 'green' | 'purple' | 'orange' | 'indigo';
|
|
}
|
|
|
|
function QuickActionCard({ href, icon, label, color }: QuickActionCardProps) {
|
|
const colorClasses = {
|
|
blue: 'hover:bg-action-tint hover:border-action',
|
|
green: 'hover:bg-green-50 hover:border-green-200',
|
|
purple: 'hover:bg-action-tint hover:border-action',
|
|
orange: 'hover:bg-orange-50 hover:border-orange-200',
|
|
indigo: 'hover:bg-action-tint hover:border-action',
|
|
};
|
|
|
|
const iconColorClasses = {
|
|
blue: 'text-action',
|
|
green: 'text-green-600',
|
|
purple: 'text-action',
|
|
orange: 'text-orange-600',
|
|
indigo: 'text-action',
|
|
};
|
|
|
|
return (
|
|
<Link
|
|
href={href}
|
|
className={`flex flex-col items-center justify-center p-4 border border-gray-200 rounded-xl transition-colors ${colorClasses[color]}`}
|
|
>
|
|
<div className={iconColorClasses[color]}>{icon}</div>
|
|
<p className="text-sm font-medium text-gray-700 mt-2 text-center">{label}</p>
|
|
</Link>
|
|
);
|
|
}
|