Files
DeepTutor/web/components/settings/SettingsMiniNav.tsx
Bingxi Zhao (Frank) 6153d8c092 release: v1.4.0 — release notes, version bump, repo hygiene
- Add assets/releases/ver1-4-0.md covering deltas since v1.4.0-beta
  (reasoning_effort normalization, tool-schema fallback, restart-safe
  turn runtime, frontend placeholder hardening, CLI chat REPL config).
- Bump deeptutor/__version__ to 1.4.0.
- Update README Releases section: v1.4.0 at top, install opt-in note
  updated for stable.
- Fix pre-existing pre-commit failures so the v1.4.0 cut runs clean:
  bandit B324 (mark _sha1 as non-security), mypy no-redef in
  document.py / line_doc.py, mypy arg-type/assignment in
  snapshot/adapters.py, mypy assignment + arg-type in
  services/memory/settings.py, mypy func-returns-value on
  set.add idiom in deeptutor_cli/init_wizard.py.
- Apply ruff format / prettier sweep across the repo.
- Remove stale workspace + i18n env example + playwright captures
  already cleaned locally; ignore .playwright-cli/ going forward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:09:22 +08:00

70 lines
2.3 KiB
TypeScript

"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useTranslation } from "react-i18next";
import { SETTINGS_ITEMS } from "@/lib/settings-items";
export default function SettingsMiniNav() {
const pathname = usePathname();
const { t } = useTranslation();
return (
<aside className="flex h-full w-[248px] shrink-0 flex-col border-r border-[var(--border)] bg-[var(--card)]">
<div className="px-5 pb-4 pt-6">
<h1 className="text-[19px] font-semibold leading-tight tracking-tight text-[var(--foreground)]">
{t("Settings")}
</h1>
<p className="mt-1.5 text-[12.5px] leading-snug text-[var(--muted-foreground)]/80">
{t(
"Tune the app, configure model services, and inspect built-in tools.",
)}
</p>
</div>
<div
aria-hidden
className="mx-5 h-px bg-gradient-to-r from-transparent via-[var(--border)] to-transparent"
/>
<nav className="flex-1 px-2.5 py-3">
{SETTINGS_ITEMS.map(({ href, label, description, icon: Icon }) => {
const active = pathname.startsWith(href);
return (
<Link
key={href}
href={href}
title={t(description)}
className={`group relative flex h-11 items-center gap-3 rounded-md px-3 transition-colors ${
active
? "bg-[var(--muted)]/70 text-[var(--foreground)]"
: "text-[var(--muted-foreground)] hover:bg-[var(--muted)]/40 hover:text-[var(--foreground)]"
}`}
>
{active && (
<span
aria-hidden
className="absolute left-0 top-1/2 h-5 w-[2.5px] -translate-y-1/2 rounded-r-full bg-[var(--foreground)]"
/>
)}
<Icon
size={17}
strokeWidth={active ? 2 : 1.7}
className="shrink-0"
/>
<span
className={`min-w-0 flex-1 truncate text-[14px] leading-none tracking-tight ${
active ? "font-medium" : "font-normal"
}`}
>
{t(label)}
</span>
</Link>
);
})}
</nav>
</aside>
);
}