mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
- Vendor the 36 OpenCode theme palettes into the shared package, synced from the pinned OpenCode release tag via pnpm themes:sync. - Add a colorTheme user preference across the settings schema, defaults, and the assistant internal API. - Extend palettes with success, warning, info, and diff colors, and add a resolver that maps palettes to CSS tokens and applies them to the DOM. - Apply the theme app-wide through a ThemeProvider context, adopting the tokens in message, repo, session, and settings components, agent colors, git status styles, and diff viewers. - Add a theme picker to General settings and make model quick-select follow the active theme (fixes #355).
26 lines
657 B
TypeScript
26 lines
657 B
TypeScript
import { useNavigate } from "react-router-dom";
|
|
import { ArrowLeft } from "lucide-react";
|
|
|
|
interface BackButtonProps {
|
|
to?: string;
|
|
className?: string;
|
|
}
|
|
|
|
export function BackButton({ to = "/", className = "" }: BackButtonProps) {
|
|
const navigate = useNavigate();
|
|
|
|
const handleBack = () => {
|
|
navigate(to);
|
|
};
|
|
|
|
return (
|
|
<button
|
|
onClick={handleBack}
|
|
aria-label="Go back"
|
|
className={`text-muted-foreground hover:text-foreground transition-all duration-200 hover:scale-105 text-sm md:text-md border border-border rounded-md px-3 py-1.5 hover ${className}`}
|
|
>
|
|
<ArrowLeft className="w-4 h-4" />
|
|
</button>
|
|
);
|
|
}
|