mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +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
@@ -207,7 +207,7 @@ export function BranchesTab({ repoId, currentBranch }: BranchesTabProps) {
|
||||
key={branch.name}
|
||||
className={cn(
|
||||
'flex items-center gap-2 px-3 py-2 w-full text-left transition-colors',
|
||||
isCurrent && 'bg-orange-500/10',
|
||||
isCurrent && 'bg-highlight/10',
|
||||
isCheckedOutElsewhere ? 'opacity-60 cursor-not-allowed' : 'hover:bg-accent/50'
|
||||
)}
|
||||
onClick={handleClick}
|
||||
@@ -215,13 +215,13 @@ export function BranchesTab({ repoId, currentBranch }: BranchesTabProps) {
|
||||
title={isCheckedOutElsewhere ? 'Branch is checked out in another worktree' : undefined}
|
||||
>
|
||||
{isRemote ? (
|
||||
<Globe className="w-4 h-4 text-blue-500" />
|
||||
<Globe className="w-4 h-4 text-info" />
|
||||
) : (
|
||||
<GitBranch className={cn('w-4 h-4', isCurrent ? GIT_UI_COLORS.current : 'text-muted-foreground')} />
|
||||
)}
|
||||
<span className="flex-1 text-sm truncate">{branch.name}</span>
|
||||
{(isCheckedOutElsewhere || (isCurrent && isRepoWorktree)) && (
|
||||
<span className="text-[10px] px-1.5 py-0.5 rounded bg-purple-500/20 text-purple-400">worktree</span>
|
||||
<span className="text-[10px] px-1.5 py-0.5 rounded bg-primary/20 text-primary">worktree</span>
|
||||
)}
|
||||
{branch.type === 'local' && !branch.upstream && !branch.isWorktree && !(isCurrent && isRepoWorktree) && (
|
||||
<span className="text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground">local</span>
|
||||
|
||||
@@ -70,10 +70,10 @@ export function GitFlatFileItem({ file, isSelected, onSelect, onStage, onUnstage
|
||||
{(file.additions !== undefined || file.deletions !== undefined) && (
|
||||
<div className="flex items-center gap-1 text-xs flex-shrink-0">
|
||||
{file.additions !== undefined && file.additions > 0 && (
|
||||
<span className="text-green-500">+{file.additions}</span>
|
||||
<span className="text-diff-add">+{file.additions}</span>
|
||||
)}
|
||||
{file.deletions !== undefined && file.deletions > 0 && (
|
||||
<span className="text-red-500">-{file.deletions}</span>
|
||||
<span className="text-diff-delete">-{file.deletions}</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
@@ -99,7 +99,7 @@ export function GitFlatFileItem({ file, isSelected, onSelect, onStage, onUnstage
|
||||
onClick={handleDiscard}
|
||||
title="Discard changes"
|
||||
>
|
||||
<RotateCcw className="w-3 h-3 text-rose-500" />
|
||||
<RotateCcw className="w-3 h-3 text-destructive" />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -110,8 +110,8 @@ export function GitFlatFileList({
|
||||
</span>
|
||||
{(totalAdditions !== undefined && totalAdditions > 0 || totalDeletions !== undefined && totalDeletions > 0) && (
|
||||
<div className="flex items-center gap-1 text-xs">
|
||||
{totalAdditions !== undefined && totalAdditions > 0 && <span className="text-green-500">+{totalAdditions}</span>}
|
||||
{totalDeletions !== undefined && totalDeletions > 0 && <span className="text-red-500">-{totalDeletions}</span>}
|
||||
{totalAdditions !== undefined && totalAdditions > 0 && <span className="text-diff-add">+{totalAdditions}</span>}
|
||||
{totalDeletions !== undefined && totalDeletions > 0 && <span className="text-diff-delete">-{totalDeletions}</span>}
|
||||
</div>
|
||||
)}
|
||||
{!readOnly && (
|
||||
@@ -120,7 +120,7 @@ export function GitFlatFileList({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-6 px-2 text-xs text-rose-500 hover:text-rose-600"
|
||||
className="h-6 px-2 text-xs text-destructive hover:text-destructive/90"
|
||||
onClick={handleDiscardAll}
|
||||
>
|
||||
Discard All
|
||||
|
||||
Reference in new issue
Block a user