feat(danisman): soru formunda tek seçim sıradaki soruya geçirir, geçişteki kayma düzeldi; sürüm notları ağacı, bildirimde geri al oku, üst şerit ve mobil menü düzenlemeleri (→ 2.1.4)
All checks were successful
Deploy / deploy (push) Successful in 14m11s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bilalgursen
2026-10-12 21:10:23 +03:00
parent e6cbf7a782
commit ea3ebbeb44
13 changed files with 555 additions and 256 deletions

View File

@@ -57,7 +57,11 @@ export interface BildirimSecenekleri {
/** Aynı kimlikle çağrı yeni bildirim açmaz, olanı günceller. */
id?: string | number;
description?: ReactNode;
action?: { label: ReactNode; onClick: () => void };
/**
* `icon` verilirse düğme yalnız ikonu gösterir (36 px yuvarlak); `label`
* o zaman düz yazı olmalıdır: ekran okuyucuya ve ipucu balonuna gider.
*/
action?: { label: ReactNode; icon?: ReactNode; onClick: () => void };
/** ms. Verilmezse türe göre; `Infinity` kapatılana kadar kalır. */
duration?: number;
}
@@ -273,6 +277,35 @@ function TurIkonu({ tur }: { tur: Tur }) {
const AKSIYON_HAPI =
"inline-flex h-9 shrink-0 cursor-pointer items-center rounded-full bg-slate-900 px-3.5 text-sm font-semibold whitespace-nowrap text-slate-50 transition-[background-color,transform] duration-150 hover:bg-slate-700 active:scale-[0.97]";
function AksiyonDugmesi({
aksiyon,
onClick,
className,
}: {
aksiyon: NonNullable<BildirimSecenekleri["action"]>;
onClick: () => void;
className?: string;
}) {
const ikonlu = Boolean(aksiyon.icon);
return (
<button
type="button"
onClick={onClick}
title={ikonlu && typeof aksiyon.label === "string" ? aksiyon.label : undefined}
className={cn(AKSIYON_HAPI, ikonlu && "w-9 justify-center px-0", className)}
>
{ikonlu ? (
<>
{aksiyon.icon}
<span className="sr-only">{aksiyon.label}</span>
</>
) : (
aksiyon.label
)}
</button>
);
}
type Hareket = {
isaretci: number;
basX: number;
@@ -553,25 +586,20 @@ function Bildirim({
<span className="mt-0.5 block text-pretty text-slate-600">{kayit.aciklama}</span>
) : null}
{kayit.aksiyon && aksiyonAltta ? (
<button
type="button"
<AksiyonDugmesi
aksiyon={kayit.aksiyon}
onClick={() => aksiyonuCalistir(id)}
className={cn(AKSIYON_HAPI, "mt-2.5")}
>
{kayit.aksiyon.label}
</button>
className="mt-2.5"
/>
) : null}
</div>
{/* Sağ grup: aksiyon ile çarpı yan yana, ilk satırla aynı hizada */}
<div className="flex shrink-0 items-center gap-1">
{kayit.aksiyon && !aksiyonAltta ? (
<button
type="button"
<AksiyonDugmesi
aksiyon={kayit.aksiyon}
onClick={() => aksiyonuCalistir(id)}
className={AKSIYON_HAPI}
>
{kayit.aksiyon.label}
</button>
/>
) : null}
<button
type="button"