fix(web): quiet settings labels to match the navigation
Keep card titles at 14px semibold. Setting names and the settings navigation use 12px at regular weight, without shrinking the rows.
This commit is contained in:
1 parent
574e15c576
commit
ed3ea90576
9 files changed
+18
-18
No files matched your search
@@ -304,7 +304,7 @@ export const SettingsPane = ({
|
||||
type="button"
|
||||
onClick={() => setActiveTab(item.key)}
|
||||
className={cn(
|
||||
"flex items-center gap-3 px-3.5 py-2.5 rounded-xl text-sm font-semibold transition-all duration-150 text-left w-full",
|
||||
"flex items-center gap-3 px-3.5 py-2.5 rounded-xl text-xs font-normal leading-5 transition-all duration-150 text-left w-full",
|
||||
isSelected
|
||||
? `${item.colorClass} ${item.bgColorClass}`
|
||||
: "text-slate-600 hover:bg-slate-200/50 hover:text-slate-900"
|
||||
@@ -352,7 +352,7 @@ export const SettingsPane = ({
|
||||
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-emerald-50/80">
|
||||
<LayoutTemplate className="h-4 w-4 text-emerald-600" />
|
||||
</div>
|
||||
<span className="text-sm font-semibold text-slate-800">{t("nav.templates")}</span>
|
||||
<span className="text-xs font-normal leading-5 text-slate-800">{t("nav.templates")}</span>
|
||||
</div>
|
||||
<ChevronRight className="h-4 w-4 text-slate-400" />
|
||||
</button>
|
||||
@@ -365,7 +365,7 @@ export const SettingsPane = ({
|
||||
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-emerald-50/80">
|
||||
<Sparkles className="h-4 w-4 text-emerald-600" />
|
||||
</div>
|
||||
<span className="text-sm font-semibold text-slate-800">{t("nav.prompts")}</span>
|
||||
<span className="text-xs font-normal leading-5 text-slate-800">{t("nav.prompts")}</span>
|
||||
</div>
|
||||
<ChevronRight className="h-4 w-4 text-slate-400" />
|
||||
</button>
|
||||
@@ -384,7 +384,7 @@ export const SettingsPane = ({
|
||||
<div className={cn("flex h-8 w-8 items-center justify-center rounded-lg", item.bgColorClass)}>
|
||||
<Icon className={cn("h-4 w-4", item.iconColorClass)} />
|
||||
</div>
|
||||
<span className="text-sm font-semibold text-slate-800">{item.label}</span>
|
||||
<span className="text-xs font-normal leading-5 text-slate-800">{item.label}</span>
|
||||
{item.badge ? (
|
||||
<span className="rounded-full border border-emerald-200/80 bg-emerald-50 px-1.5 py-0.5 text-xs font-semibold text-emerald-700">
|
||||
{item.badge}
|
||||
|
||||
@@ -52,7 +52,7 @@ const PluginSettingListDialog = ({ field }: { field: PluginSettingField }) => {
|
||||
<ul className="min-h-0 divide-y divide-slate-100 overflow-y-auto pb-1">
|
||||
{list.items.map((item, index) => (
|
||||
<li key={`${item.title}:${item.description ?? ""}:${index}`} className="px-6 py-3">
|
||||
<div className="text-sm font-medium text-slate-800">{item.title}</div>
|
||||
<div className="text-xs font-normal leading-5 text-slate-800">{item.title}</div>
|
||||
{item.description ? <div className="mt-0.5 text-xs leading-5 text-slate-500">{item.description}</div> : null}
|
||||
</li>
|
||||
))}
|
||||
|
||||
@@ -297,7 +297,7 @@ export const AiModelCard = () => {
|
||||
};
|
||||
|
||||
const Field = ({ label, hint, children }: { label: string; hint?: string; children: ReactNode }) => (
|
||||
<label className="grid gap-1.5 text-sm font-medium text-slate-700">
|
||||
<label className="grid gap-1.5 text-xs font-normal leading-5 text-slate-700">
|
||||
{label}{children}{hint ? <span className="text-xs font-normal leading-4 text-slate-500">{hint}</span> : null}
|
||||
</label>
|
||||
);
|
||||
|
||||
@@ -39,7 +39,7 @@ export const AiPromptsCard = ({ onOpenLibrary }: { onOpenLibrary: () => void })
|
||||
<CardContent className="grid gap-3 p-4 pt-0 sm:px-5 sm:pb-5">
|
||||
<div className="flex items-center justify-between gap-3 rounded-lg border border-slate-200/70 bg-slate-50/50 px-3.5 py-3">
|
||||
<div className="min-w-0">
|
||||
<p className="text-sm font-medium text-slate-800">{t("aiPrompts.listTitle")}</p>
|
||||
<p className="text-xs font-normal leading-5 text-slate-800">{t("aiPrompts.listTitle")}</p>
|
||||
<p className="mt-0.5 text-xs text-slate-500">{t("aiPrompts.count", { count })}</p>
|
||||
</div>
|
||||
<Button type="button" variant="outline" size="sm" className="h-8 gap-1.5 bg-card text-xs" onClick={onOpenLibrary}>
|
||||
|
||||
@@ -408,7 +408,7 @@ const formatBaseUrl = (baseUrl: string) => {
|
||||
};
|
||||
|
||||
const Field = ({ label, hint, children }: { label: string; hint?: string; children: ReactNode }) => (
|
||||
<label className="grid gap-1.5 text-sm font-medium text-slate-700">
|
||||
<label className="grid gap-1.5 text-xs font-normal leading-5 text-slate-700">
|
||||
{label}{children}{hint ? <span className="text-xs font-normal leading-4 text-slate-500">{hint}</span> : null}
|
||||
</label>
|
||||
);
|
||||
@@ -133,7 +133,7 @@ export const ObjectStorageCard = ({ demoMode }: { demoMode: boolean }) => {
|
||||
<Field label={t("objectStorage.accessKeyId")}><Input value={accessKeyId} onChange={(event) => setAccessKeyId(event.target.value)} required autoComplete="off" /></Field>
|
||||
<Field label={t("objectStorage.secretAccessKey")} hint={hasSavedSecret ? t("objectStorage.secretSavedHint") : undefined}><Input type="password" value={secretAccessKey} onChange={(event) => setSecretAccessKey(event.target.value)} required={!hasSavedSecret} autoComplete="new-password" placeholder={hasSavedSecret ? "••••••••••••" : ""} /></Field>
|
||||
<Field label={t("objectStorage.objectPrefix")} hint={t("objectStorage.objectPrefixHint")}><Input value={objectPrefix} onChange={(event) => setObjectPrefix(event.target.value)} placeholder="edgeever" /></Field>
|
||||
<label className="flex items-center justify-between gap-3 rounded-lg border border-slate-200 bg-card px-3 py-2.5 text-sm font-medium text-slate-700">
|
||||
<label className="flex items-center justify-between gap-3 rounded-lg border border-slate-200 bg-card px-3 py-2.5 text-xs font-normal leading-5 text-slate-700">
|
||||
<span><span className="block">{t("objectStorage.pathStyle")}</span><span className="mt-0.5 block text-xs font-normal text-slate-500">{t("objectStorage.pathStyleHint")}</span></span>
|
||||
<Switch checked={forcePathStyle} onCheckedChange={setForcePathStyle} />
|
||||
</label>
|
||||
@@ -171,7 +171,7 @@ export const ObjectStorageCard = ({ demoMode }: { demoMode: boolean }) => {
|
||||
};
|
||||
|
||||
const Field = ({ label, hint, children }: { label: string; hint?: string; children: ReactNode }) => (
|
||||
<label className="grid gap-1.5 text-sm font-medium text-slate-700">
|
||||
<label className="grid gap-1.5 text-xs font-normal leading-5 text-slate-700">
|
||||
{label}
|
||||
{children}
|
||||
{hint ? <span className="text-xs font-normal leading-4 text-slate-500">{hint}</span> : null}
|
||||
|
||||
@@ -80,7 +80,7 @@ export const PasswordCard = ({ authRequired, demoMode }: PasswordCardProps) => {
|
||||
</p>
|
||||
) : (
|
||||
<form className="grid gap-3 lg:grid-cols-3 lg:gap-y-2.5" onSubmit={handleSubmit}>
|
||||
<label className="grid gap-1.5 text-sm font-medium text-slate-700">
|
||||
<label className="grid gap-1.5 text-xs font-normal leading-5 text-slate-700">
|
||||
{t("password.currentPassword")}
|
||||
<Input
|
||||
className="lg:h-9"
|
||||
@@ -91,7 +91,7 @@ export const PasswordCard = ({ authRequired, demoMode }: PasswordCardProps) => {
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
<label className="grid gap-1.5 text-sm font-medium text-slate-700">
|
||||
<label className="grid gap-1.5 text-xs font-normal leading-5 text-slate-700">
|
||||
{t("password.newPassword")}
|
||||
<Input
|
||||
className="lg:h-9"
|
||||
@@ -103,7 +103,7 @@ export const PasswordCard = ({ authRequired, demoMode }: PasswordCardProps) => {
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
<label className="grid gap-1.5 text-sm font-medium text-slate-700">
|
||||
<label className="grid gap-1.5 text-xs font-normal leading-5 text-slate-700">
|
||||
{t("password.confirmPassword")}
|
||||
<Input
|
||||
className="lg:h-9"
|
||||
|
||||
@@ -136,7 +136,7 @@ export const UserManagementCard = ({ demoMode }: UserManagementCardProps) => {
|
||||
<DialogDescription className="leading-6">{t("users.createDescription")}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<form className="grid gap-5 px-6 py-5" autoComplete="off" onSubmit={handleCreate}>
|
||||
<label className="grid gap-2 text-sm font-medium text-slate-700" htmlFor="edgeever-new-account-username">
|
||||
<label className="grid gap-2 text-xs font-normal leading-5 text-slate-700" htmlFor="edgeever-new-account-username">
|
||||
{t("users.username")}
|
||||
<Input
|
||||
id="edgeever-new-account-username"
|
||||
@@ -153,7 +153,7 @@ export const UserManagementCard = ({ demoMode }: UserManagementCardProps) => {
|
||||
maxLength={80}
|
||||
/>
|
||||
</label>
|
||||
<label className="grid gap-2 text-sm font-medium text-slate-700" htmlFor="edgeever-new-account-display-name">
|
||||
<label className="grid gap-2 text-xs font-normal leading-5 text-slate-700" htmlFor="edgeever-new-account-display-name">
|
||||
{t("users.displayName")}
|
||||
<Input
|
||||
id="edgeever-new-account-display-name"
|
||||
@@ -167,7 +167,7 @@ export const UserManagementCard = ({ demoMode }: UserManagementCardProps) => {
|
||||
maxLength={80}
|
||||
/>
|
||||
</label>
|
||||
<label className="grid gap-2 text-sm font-medium text-slate-700" htmlFor="edgeever-new-account-password">
|
||||
<label className="grid gap-2 text-xs font-normal leading-5 text-slate-700" htmlFor="edgeever-new-account-password">
|
||||
{t("users.password")}
|
||||
<Input
|
||||
id="edgeever-new-account-password"
|
||||
@@ -199,7 +199,7 @@ export const UserManagementCard = ({ demoMode }: UserManagementCardProps) => {
|
||||
<DialogContent className="max-w-md">
|
||||
<DialogHeader><DialogTitle>{t("users.resetTitle", { username: resetUser?.username })}</DialogTitle><DialogDescription>{t("users.resetDescription")}</DialogDescription></DialogHeader>
|
||||
<form className="grid gap-4" autoComplete="off" onSubmit={handleReset}>
|
||||
<label className="grid gap-2 text-sm font-medium text-slate-700" htmlFor="edgeever-reset-account-password">
|
||||
<label className="grid gap-2 text-xs font-normal leading-5 text-slate-700" htmlFor="edgeever-reset-account-password">
|
||||
{t("users.newPassword")}
|
||||
<Input id="edgeever-reset-account-password" name="edgeever-reset-account-password" type="password" autoComplete="new-password" value={resetPassword} onChange={(event) => setResetPassword(event.target.value)} placeholder={t("users.passwordPlaceholder")} minLength={8} required />
|
||||
</label>
|
||||
|
||||
@@ -9,6 +9,6 @@ export const SETTINGS_CARD_ICON_CLASSNAME = "h-4 w-4 text-emerald-700 shrink-0";
|
||||
/**
|
||||
* Unified typography and layout constants for setting rows/items within cards.
|
||||
*/
|
||||
export const SETTINGS_ITEM_TITLE_CLASSNAME = "text-sm font-medium text-slate-800";
|
||||
export const SETTINGS_ITEM_TITLE_CLASSNAME = "text-xs font-normal leading-5 text-slate-800";
|
||||
export const SETTINGS_ITEM_DESCRIPTION_CLASSNAME = "mt-0.5 text-xs leading-4 text-slate-500";
|
||||
export const SETTINGS_ITEM_ICON_CLASSNAME = "mt-0.5 h-4 w-4 shrink-0 text-slate-500";
|
||||
Reference in new issue
Block a user