mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-05 14:26:23 +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
@@ -1,7 +1,5 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { Heading } from "../Heading";
|
||||
import { IconButton } from "../IconButton";
|
||||
import { VStack } from "../Stacks";
|
||||
import {
|
||||
SettingRow,
|
||||
SettingRowBoolean,
|
||||
@@ -11,6 +9,7 @@ import {
|
||||
SettingsSection,
|
||||
SettingValue,
|
||||
} from "./SettingRow";
|
||||
import { SettingsPage } from "./SettingsPage";
|
||||
import type { SettingsCallbacks, SettingsView } from "./types";
|
||||
|
||||
export interface SettingsGeneralProps {
|
||||
@@ -25,12 +24,11 @@ export interface SettingsGeneralProps {
|
||||
export function SettingsGeneral({ view, callbacks, banner, extraSections }: SettingsGeneralProps) {
|
||||
const { app, values } = view;
|
||||
return (
|
||||
<VStack space={1.5} className="mb-4">
|
||||
<div>
|
||||
<Heading>General</Heading>
|
||||
<p className="text-text-subtle">Configure general settings for update behavior and more.</p>
|
||||
</div>
|
||||
{banner != null && <div className="mt-3 mb-5">{banner}</div>}
|
||||
<SettingsPage
|
||||
title="General"
|
||||
description="Configure general settings for update behavior and more."
|
||||
banner={banner}
|
||||
>
|
||||
<SettingsList className="space-y-8">
|
||||
{view.updates != null && <SettingsUpdatesSection view={view} callbacks={callbacks} />}
|
||||
|
||||
@@ -85,7 +83,7 @@ export function SettingsGeneral({ view, callbacks, banner, extraSections }: Sett
|
||||
</SettingRow>
|
||||
</SettingsSection>
|
||||
</SettingsList>
|
||||
</VStack>
|
||||
</SettingsPage>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user