mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-30 12:03:59 +01:00
Settings: one shared page layout with a fixed gap under the header
Every settings tab in Yaak and Yaak Proxy now renders its heading, description, optional banner and content through SettingsPage, which puts the same 1.5rem gap between each. The banner slot hides itself when nothing inside it has content, so Yaak's General tab no longer gets an accidental gap from the empty commercial-use banner, and the proxy's General tab no longer sits tight under its description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc09688bc9
commit
17b1623e83
11 files changed
+174
-133
No files matched your search
@@ -3,8 +3,6 @@ import { useState } from "react";
|
||||
import { clamp } from "../../lib/clamp";
|
||||
import { Button } from "../Button";
|
||||
import { Checkbox } from "../Checkbox";
|
||||
import { Heading } from "../Heading";
|
||||
import { VStack } from "../Stacks";
|
||||
import {
|
||||
SettingRow,
|
||||
SettingRowBoolean,
|
||||
@@ -13,6 +11,7 @@ import {
|
||||
SettingsList,
|
||||
SettingsSection,
|
||||
} from "./SettingRow";
|
||||
import { SettingsPage } from "./SettingsPage";
|
||||
import type {
|
||||
SettingsCallbacks,
|
||||
SettingsEditorKeymap,
|
||||
@@ -52,11 +51,7 @@ export function SettingsInterface({
|
||||
const shown = (row: SettingsInterfaceRow) => !view.hiddenInterfaceRows?.includes(row);
|
||||
|
||||
return (
|
||||
<VStack space={1.5} className="mb-4">
|
||||
<div className="mb-3">
|
||||
<Heading>Interface</Heading>
|
||||
<p className="text-text-subtle">Tweak settings related to the user interface.</p>
|
||||
</div>
|
||||
<SettingsPage title="Interface" description="Tweak settings related to the user interface.">
|
||||
<SettingsList className="space-y-8">
|
||||
{leadingSections}
|
||||
|
||||
@@ -183,7 +178,7 @@ export function SettingsInterface({
|
||||
|
||||
{trailingSections}
|
||||
</SettingsList>
|
||||
</VStack>
|
||||
</SettingsPage>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user