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
@@ -239,7 +239,7 @@ describe('FloatingTTSButton', () => {
|
||||
|
||||
const button = screen.getByRole('button', { name: /stop playback/i })
|
||||
|
||||
expect(button).toHaveClass('from-red-600')
|
||||
expect(button).toHaveClass('bg-destructive')
|
||||
expect(button).toHaveClass('rounded-lg')
|
||||
expect(button).not.toHaveClass('rounded-full')
|
||||
expect(button).not.toHaveClass('hidden')
|
||||
@@ -251,7 +251,7 @@ describe('FloatingTTSButton', () => {
|
||||
setup({ activeMessageId: TEST_MESSAGE_ID, isLoading: true })
|
||||
render(<FloatingTTSButton messageId={TEST_MESSAGE_ID} content={TEST_CONTENT} />)
|
||||
|
||||
expect(screen.getByRole('button', { name: /stop playback/i })).toHaveClass('from-red-600')
|
||||
expect(screen.getByRole('button', { name: /stop playback/i })).toHaveClass('bg-destructive')
|
||||
})
|
||||
|
||||
it('shows autoplay state with button color when autoPlay is enabled', () => {
|
||||
@@ -260,7 +260,7 @@ describe('FloatingTTSButton', () => {
|
||||
|
||||
const button = screen.getByRole('button', { name: /auto-play enabled/i })
|
||||
|
||||
expect(button).toHaveClass('from-blue-500')
|
||||
expect(button).toHaveClass('bg-primary')
|
||||
expect(button).toHaveClass('rounded-lg')
|
||||
expect(screen.queryByText('Play')).not.toBeInTheDocument()
|
||||
expect(screen.queryByText('Auto')).not.toBeInTheDocument()
|
||||
@@ -273,8 +273,8 @@ describe('FloatingTTSButton', () => {
|
||||
|
||||
const button = screen.getByRole('button', { name: /play latest reply/i })
|
||||
|
||||
expect(button).toHaveClass('from-amber-500')
|
||||
expect(button).not.toHaveClass('from-blue-500')
|
||||
expect(button).toHaveClass('from-warning')
|
||||
expect(button).not.toHaveClass('bg-primary')
|
||||
expect(screen.queryByText('Play')).not.toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user