fix(ui): visible History button + remove left rail + dark JSON viewer
This commit is contained in:
@@ -1823,11 +1823,17 @@ function JsonTabContent({ detail }: { detail: { schemaJson: import('@/api/client
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleCopy}
|
||||
className="absolute top-2 right-2 z-10 px-2.5 py-1 rounded-sm border border-line bg-surface text-cap hover:border-accent transition-colors"
|
||||
// Copy button — dark-glass overlay поверх code block для contrast
|
||||
// с тёмным фоном (см. pre).
|
||||
className="absolute top-2 right-2 z-10 px-2.5 py-1 rounded-sm border border-[#3d3863] bg-[#1c1840]/85 backdrop-blur text-cap text-[#c5bff0] hover:text-[#f0eaff] hover:border-[#ff9a64] transition-colors"
|
||||
>
|
||||
{copied ? t('json.copied', { defaultValue: 'Скопировано' }) : t('json.copy', { defaultValue: 'Копировать' })}
|
||||
</button>
|
||||
<pre className="rounded-lg border border-line bg-surface-2 p-4 overflow-x-auto text-[12px] font-mono text-ink whitespace-pre">
|
||||
{/* Code block — dark theme (space palette из graph), убираем cream
|
||||
* bg-surface-2 который user feedback'нул как «желтый кремовый».
|
||||
* Highlight token colors (text-accent/green/pink/warn) работают на
|
||||
* тёмном фоне OK благодаря accessible contrast. */}
|
||||
<pre className="rounded-lg border border-[#3d3863] bg-[#0c0a23] p-4 overflow-x-auto text-[12px] font-mono text-[#f0eaff] whitespace-pre">
|
||||
<code dangerouslySetInnerHTML={{ __html: highlightJson(json) }} />
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user