mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
feat(themes): apply OpenCode color themes app-wide with a settings picker (#364)
- 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).
This commit is contained in:
1 parent
702e3c4e13
commit
5bd688de4b
116 files changed
+2702
-760
No files matched your search
@@ -182,7 +182,7 @@ const TabBarRow = memo(function TabBarRow({ tabs }: TabBarRowProps) {
|
||||
<div className="relative">
|
||||
<Icon className="w-5 h-5" />
|
||||
{tab.badge && (
|
||||
<span className="absolute -top-0.5 -right-1 w-2 h-2 rounded-full bg-orange-500 ring-2 ring-card animate-pulse" />
|
||||
<span className="absolute -top-0.5 -right-1 w-2 h-2 rounded-full bg-highlight ring-2 ring-card animate-pulse" />
|
||||
)}
|
||||
</div>
|
||||
<span className="leading-none">{tab.label}</span>
|
||||
|
||||
@@ -150,7 +150,7 @@ export function MoreDrawer({ isOpen, onClose }: MoreDrawerProps) {
|
||||
{(repoDisplayName || currentBranch) && (
|
||||
<div className="flex items-center gap-2 text-xs text-muted-foreground">
|
||||
{repoDisplayName && (
|
||||
<span className="font-medium text-orange-600 dark:text-orange-400">{repoDisplayName}</span>
|
||||
<span className="font-medium text-highlight">{repoDisplayName}</span>
|
||||
)}
|
||||
|
||||
{currentBranch && (
|
||||
@@ -207,7 +207,7 @@ export function MoreDrawer({ isOpen, onClose }: MoreDrawerProps) {
|
||||
onClick={() => handleCommandClick(command)}
|
||||
className="flex w-full min-w-0 items-start gap-3 rounded-md px-3 py-2 text-left transition-colors hover:bg-accent"
|
||||
>
|
||||
<span className="font-mono text-sm font-medium text-blue-600 dark:text-blue-400">{command.name}</span>
|
||||
<span className="font-mono text-sm font-medium text-primary">{command.name}</span>
|
||||
{command.description && (
|
||||
<span className="min-w-0 flex-1 truncate text-xs text-muted-foreground">{command.description}</span>
|
||||
)}
|
||||
|
||||
@@ -38,7 +38,7 @@ export function NotificationsSheet({ isOpen, onClose }: NotificationsSheetProps)
|
||||
<BottomSheetContent className="flex flex-col gap-4">
|
||||
<div>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<Bell className="w-5 h-5 text-orange-500" />
|
||||
<Bell className="w-5 h-5 text-highlight" />
|
||||
<h3 className="font-semibold text-foreground">Pending permissions</h3>
|
||||
</div>
|
||||
{permissionCount === 0 ? (
|
||||
@@ -72,7 +72,7 @@ export function NotificationsSheet({ isOpen, onClose }: NotificationsSheetProps)
|
||||
|
||||
<div>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<HelpCircle className="w-5 h-5 text-blue-500" />
|
||||
<HelpCircle className="w-5 h-5 text-info" />
|
||||
<h3 className="font-semibold text-foreground">Pending forms</h3>
|
||||
</div>
|
||||
{formCount === 0 ? (
|
||||
|
||||
@@ -72,18 +72,18 @@ export function RepoNavGroup({
|
||||
onClick={onOpenRepo}
|
||||
aria-current={isCurrent ? 'page' : undefined}
|
||||
className={cn(
|
||||
'flex min-w-0 flex-1 flex-col justify-center gap-0.5 pr-2 text-left hover:bg-white/[0.03]',
|
||||
'flex min-w-0 flex-1 flex-col justify-center gap-0.5 pr-2 text-left hover:bg-accent/30',
|
||||
onToggle ? 'pl-0' : 'pl-4',
|
||||
)}
|
||||
>
|
||||
<span className="truncate text-[15px] font-bold tracking-tight text-orange-600 dark:text-orange-400">
|
||||
<span className="truncate text-[15px] font-bold tracking-tight text-highlight">
|
||||
{name}
|
||||
</span>
|
||||
{branch && (
|
||||
<span
|
||||
className={cn(
|
||||
'truncate font-mono text-[11.5px]',
|
||||
isWorktree ? 'text-purple-400' : 'text-muted-foreground',
|
||||
isWorktree ? 'text-primary' : 'text-muted-foreground',
|
||||
)}
|
||||
>
|
||||
{branch}
|
||||
@@ -129,14 +129,14 @@ export function SessionNavRow({ item, isCurrent, onSelect, repoLabel }: SessionN
|
||||
</span>
|
||||
<span className="min-w-0 flex-1 truncate">{item.session.title || 'Untitled Session'}</span>
|
||||
{repoLabel && (
|
||||
<span className="max-w-24 shrink-0 truncate text-xs text-orange-600 dark:text-orange-400">{repoLabel}</span>
|
||||
<span className="max-w-24 shrink-0 truncate text-xs text-highlight">{repoLabel}</span>
|
||||
)}
|
||||
<SessionStatusIndicator sessionID={item.session.id} size="sm" />
|
||||
{hasPermission(item.session.id) && (
|
||||
<Bell className="h-3 w-3 shrink-0 text-orange-500" aria-label="Pending permission" />
|
||||
<Bell className="h-3 w-3 shrink-0 text-highlight" aria-label="Pending permission" />
|
||||
)}
|
||||
{hasForm(item.session.id) && (
|
||||
<HelpCircle className="h-3 w-3 shrink-0 text-blue-500" aria-label="Pending form" />
|
||||
<HelpCircle className="h-3 w-3 shrink-0 text-info" aria-label="Pending form" />
|
||||
)}
|
||||
<span className="ml-auto min-w-[30px] shrink-0 text-right text-xs tabular-nums text-muted-foreground">
|
||||
{formatShortRelativeTime(new Date(item.session.time.updated))}
|
||||
|
||||
Reference in new issue
Block a user