feat: add more colors to cards

This commit is contained in:
Vasily Zubarev
2025-07-23 11:07:51 +02:00
parent 8897134901
commit 9305deda86
7 changed files with 404 additions and 287 deletions

View File

@@ -11,8 +11,8 @@ import { getFilesByTransactionId } from "@/models/files"
import { getProjects } from "@/models/projects"
import { getSettings } from "@/models/settings"
import { getTransactionById } from "@/models/transactions"
import { notFound } from "next/navigation"
import Link from "next/link"
import { notFound } from "next/navigation"
export default async function TransactionPage({ params }: { params: Promise<{ transactionId: string }> }) {
const { transactionId } = await params
@@ -32,7 +32,7 @@ export default async function TransactionPage({ params }: { params: Promise<{ tr
return (
<div className="flex flex-wrap flex-row items-start justify-center gap-4 max-w-6xl">
<Card className="w-full flex-1 flex flex-col flex-wrap justify-center items-start overflow-hidden">
<Card className="w-full flex-1 flex flex-col flex-wrap justify-center items-start overflow-hidden bg-gradient-to-br from-violet-50/80 via-indigo-50/80 to-white border-violet-200/60">
{incompleteFields.length > 0 && (
<div className="w-full flex flex-col gap-1 rounded-md bg-yellow-50 p-5">
<span>
@@ -47,7 +47,7 @@ export default async function TransactionPage({ params }: { params: Promise<{ tr
</span>
</div>
)}
<div className="w-full p-5 bg-accent">
<div className="w-full p-5">
<TransactionEditForm
transaction={transaction}
categories={categories}

View File

@@ -38,29 +38,32 @@ export default async function UnsortedPage() {
{files.length > 1 && <AnalyzeAllButton />}
</header>
{config.selfHosted.isEnabled && !settings.openai_api_key && !settings.google_api_key && !settings.mistral_api_key && (
<Alert>
<Settings className="h-4 w-4 mt-2" />
<div className="flex flex-row justify-between pt-2">
<div className="flex flex-col">
<AlertTitle>LLM provider API Key is required for analyzing files</AlertTitle>
<AlertDescription>
Please set your LLM provider API key in the settings to use the analyze form.
</AlertDescription>
{config.selfHosted.isEnabled &&
!settings.openai_api_key &&
!settings.google_api_key &&
!settings.mistral_api_key && (
<Alert>
<Settings className="h-4 w-4 mt-2" />
<div className="flex flex-row justify-between pt-2">
<div className="flex flex-col">
<AlertTitle>LLM provider API Key is required for analyzing files</AlertTitle>
<AlertDescription>
Please set your LLM provider API key in the settings to use the analyze form.
</AlertDescription>
</div>
<Link href="/settings/llm">
<Button>Go to Settings</Button>
</Link>
</div>
<Link href="/settings/llm">
<Button>Go to Settings</Button>
</Link>
</div>
</Alert>
)}
</Alert>
)}
<main className="flex flex-col gap-5">
{files.map((file) => (
<Card
key={file.id}
id={file.id}
className="flex flex-row flex-wrap md:flex-nowrap justify-center items-start gap-5 p-5 bg-accent"
className="flex flex-row flex-wrap md:flex-nowrap justify-center items-start gap-5 p-5 bg-gradient-to-br from-violet-50/80 via-indigo-50/80 to-white border-violet-200/60 rounded-2xl"
>
<div className="w-full max-w-[500px]">
<Card>