mirror of
https://github.com/stablyai/orca.git
synced 2026-10-16 00:03:09 +00:00
Remove soft contrast sidebar mode
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -58,13 +58,6 @@ export function LeftSidebarAppearanceSetting({
|
||||
'Match Terminal'
|
||||
)
|
||||
},
|
||||
{
|
||||
value: 'soft-contrast',
|
||||
label: translate(
|
||||
'auto.components.settings.AppearancePane.leftSidebarAppearance.softContrast',
|
||||
'Soft Contrast'
|
||||
)
|
||||
},
|
||||
{
|
||||
value: 'tinted',
|
||||
label: translate(
|
||||
|
||||
@@ -30,10 +30,6 @@ export const getLeftSidebarAppearanceEntry = createLocalizedCatalog(
|
||||
...translateSearchKeyword(
|
||||
'auto.components.settings.appearance.search.leftSidebarAppearance.tint',
|
||||
'tint'
|
||||
),
|
||||
...translateSearchKeyword(
|
||||
'auto.components.settings.appearance.search.leftSidebarAppearance.contrast',
|
||||
'contrast'
|
||||
)
|
||||
]
|
||||
})
|
||||
|
||||
@@ -4184,7 +4184,6 @@
|
||||
"rowDescription": "Make the left sidebar match your terminal, stay default, or use a tint.",
|
||||
"default": "Default",
|
||||
"matchTerminal": "Match Terminal",
|
||||
"softContrast": "Soft Contrast",
|
||||
"tinted": "Tinted",
|
||||
"tintColor": "Sidebar Tint",
|
||||
"tintColorDescription": "The color mixed into the left sidebar surface.",
|
||||
|
||||
@@ -4184,7 +4184,6 @@
|
||||
"rowDescription": "Haz que la barra lateral izquierda coincida con tu terminal, conserve el valor predeterminado o use un tinte.",
|
||||
"default": "Predeterminado",
|
||||
"matchTerminal": "Coincidir con terminal",
|
||||
"softContrast": "Contraste suave",
|
||||
"tinted": "Con tinte",
|
||||
"tintColor": "Tinte de la barra lateral",
|
||||
"tintColorDescription": "El color que se mezcla en la superficie de la barra lateral izquierda.",
|
||||
|
||||
@@ -4169,7 +4169,6 @@
|
||||
"rowDescription": "左サイドバーをターミナルに合わせるか、既定のままにするか、色合いを加えます。",
|
||||
"default": "デフォルト",
|
||||
"matchTerminal": "ターミナルに合わせる",
|
||||
"softContrast": "ソフトコントラスト",
|
||||
"tinted": "色合い",
|
||||
"tintColor": "サイドバーの色合い",
|
||||
"tintColorDescription": "左サイドバーの表面に混ぜる色です。",
|
||||
|
||||
@@ -4169,7 +4169,6 @@
|
||||
"rowDescription": "왼쪽 사이드바를 터미널에 맞추거나 기본값을 유지하거나 은은한 색조를 적용합니다.",
|
||||
"default": "기본값",
|
||||
"matchTerminal": "터미널에 맞춤",
|
||||
"softContrast": "부드러운 대비",
|
||||
"tinted": "색조 적용",
|
||||
"tintColor": "사이드바 색조",
|
||||
"tintColorDescription": "왼쪽 사이드바 표면에 섞을 색상입니다.",
|
||||
|
||||
@@ -4169,7 +4169,6 @@
|
||||
"rowDescription": "让左侧边栏匹配终端、保持默认,或使用色调。",
|
||||
"default": "默认",
|
||||
"matchTerminal": "匹配终端",
|
||||
"softContrast": "柔和对比",
|
||||
"tinted": "色调",
|
||||
"tintColor": "边栏色调",
|
||||
"tintColorDescription": "混入左侧边栏表面的颜色。",
|
||||
|
||||
@@ -81,17 +81,4 @@ describe('resolveLeftSidebarStyleVariables', () => {
|
||||
|
||||
expect(vars?.['--worktree-sidebar']).toBe('color-mix(in srgb, #000000 35%, var(--background))')
|
||||
})
|
||||
|
||||
it('uses the soft contrast token recipe without overriding app text tokens', () => {
|
||||
const vars = resolveLeftSidebarStyleVariables(
|
||||
settings({ leftSidebarAppearanceMode: 'soft-contrast' }),
|
||||
true
|
||||
)
|
||||
|
||||
expect(vars?.['--worktree-sidebar']).toBe(
|
||||
'color-mix(in srgb, var(--background) 96%, var(--foreground) 4%)'
|
||||
)
|
||||
expect(vars?.['--sidebar']).toBe(vars?.['--worktree-sidebar'])
|
||||
expect(vars?.['--foreground']).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -110,11 +110,6 @@ function resolveTintedSurfaceVariables(
|
||||
return buildSurfaceVariables({ background, foreground: 'var(--foreground)' })
|
||||
}
|
||||
|
||||
function resolveSoftContrastSurfaceVariables(): LeftSidebarStyleVariables {
|
||||
const background = 'color-mix(in srgb, var(--background) 96%, var(--foreground) 4%)'
|
||||
return buildSurfaceVariables({ background, foreground: 'var(--foreground)' })
|
||||
}
|
||||
|
||||
export function resolveLeftSidebarStyleVariables(
|
||||
settings: LeftSidebarAppearanceSettings | null | undefined,
|
||||
systemPrefersDark: boolean
|
||||
@@ -129,7 +124,5 @@ export function resolveLeftSidebarStyleVariables(
|
||||
return resolveTerminalSurfaceVariables(settings, systemPrefersDark)
|
||||
case 'tinted':
|
||||
return resolveTintedSurfaceVariables(settings)
|
||||
case 'soft-contrast':
|
||||
return resolveSoftContrastSurfaceVariables()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import { HEX_COLOR_RE } from './color-validation'
|
||||
import type { LeftSidebarAppearanceMode } from './types'
|
||||
|
||||
export const LEFT_SIDEBAR_APPEARANCE_MODES = [
|
||||
'default',
|
||||
'match-terminal',
|
||||
'tinted',
|
||||
'soft-contrast'
|
||||
] as const
|
||||
export const LEFT_SIDEBAR_APPEARANCE_MODES = ['default', 'match-terminal', 'tinted'] as const
|
||||
|
||||
export const DEFAULT_LEFT_SIDEBAR_TINT_COLOR = '#18181b'
|
||||
export const DEFAULT_LEFT_SIDEBAR_TINT_OPACITY = 0.08
|
||||
|
||||
+1
-1
@@ -2042,7 +2042,7 @@ export type OpenInApplication = {
|
||||
|
||||
export type SourceControlViewMode = 'list' | 'tree'
|
||||
|
||||
export type LeftSidebarAppearanceMode = 'default' | 'match-terminal' | 'tinted' | 'soft-contrast'
|
||||
export type LeftSidebarAppearanceMode = 'default' | 'match-terminal' | 'tinted'
|
||||
|
||||
export type FloatingTerminalCwdRequest = {
|
||||
path?: string
|
||||
|
||||
Reference in New Issue
Block a user