mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
Merge pull request #196 from jhd3197/feat/less-text-info-tips
feat(frontend): less text, more icons - InfoTip, IconStepStrip, illustrations
This commit is contained in:
35 files changed
+811
-212
No files matched your search
@@ -2,6 +2,7 @@ import { useId, useMemo } from 'react';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { FieldContext } from '@/components/ui/field-context';
|
||||
import { cn } from '@/lib/utils';
|
||||
import InfoTip from './InfoTip';
|
||||
|
||||
/**
|
||||
* Standard form field wrapper: label, hint, error message, and input slot.
|
||||
@@ -22,6 +23,7 @@ export function FormField({
|
||||
children,
|
||||
error,
|
||||
hint,
|
||||
info,
|
||||
required = false,
|
||||
className,
|
||||
labelClassName,
|
||||
@@ -42,12 +44,17 @@ export function FormField({
|
||||
|
||||
return (
|
||||
<div className={cn('form-field', invalid && 'form-field--invalid', className)}>
|
||||
{label && (
|
||||
<Label htmlFor={inputId} className={cn('form-field__label', labelClassName)}>
|
||||
{label}
|
||||
{required && <span className="form-field__required" aria-hidden="true">*</span>}
|
||||
</Label>
|
||||
)}
|
||||
{label && (() => {
|
||||
const labelEl = (
|
||||
<Label htmlFor={inputId} className={cn('form-field__label', labelClassName)}>
|
||||
{label}
|
||||
{required && <span className="form-field__required" aria-hidden="true">*</span>}
|
||||
</Label>
|
||||
);
|
||||
return info
|
||||
? <div className="form-field__head">{labelEl}<InfoTip>{info}</InfoTip></div>
|
||||
: labelEl;
|
||||
})()}
|
||||
<div className="form-field__control">
|
||||
<FieldContext.Provider value={field}>
|
||||
{children}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import { Info, ChevronRight } from 'lucide-react';
|
||||
import InfoTip from './InfoTip';
|
||||
|
||||
// 2-4 steps as equal-width pills (icon + short label) joined by chevrons.
|
||||
// A step with `info` makes its whole pill the tap/hover target for the detail.
|
||||
// steps = [{ icon: ReactNode, label: string, info?: ReactNode }]
|
||||
export default function IconStepStrip({ steps, className = '' }) {
|
||||
return (
|
||||
<ol className={`icon-step-strip ${className}`.trim()}>
|
||||
{steps.map((s, i) => {
|
||||
const body = (
|
||||
<>
|
||||
<span className="icon-step-strip__icon" aria-hidden="true">{s.icon}</span>
|
||||
<span className="icon-step-strip__label">{s.label}</span>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<li className="icon-step-strip__step" key={i}>
|
||||
{i > 0 && <ChevronRight className="icon-step-strip__arrow" aria-hidden="true" />}
|
||||
{s.info ? (
|
||||
<InfoTip
|
||||
className="icon-step-strip__pill icon-step-strip__pill--info"
|
||||
title={s.label}
|
||||
trigger={<>{body}<Info className="icon-step-strip__more" aria-hidden="true" /></>}
|
||||
>
|
||||
{s.info}
|
||||
</InfoTip>
|
||||
) : (
|
||||
<span className="icon-step-strip__pill">{body}</span>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ol>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import { useRef, useState } from 'react';
|
||||
import { Info } from 'lucide-react';
|
||||
import { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover';
|
||||
import { Sheet, SheetTrigger, SheetContent, SheetTitle } from '@/components/ui/sheet';
|
||||
import useMediaQuery from '../hooks/useMediaQuery';
|
||||
import { t } from '../i18n/t';
|
||||
|
||||
// An (i) button that holds the explanation a page used to print inline.
|
||||
// Mouse: hover/focus previews it. Touch, click, Enter and Space: toggles a
|
||||
// pinned popover that closes on outside tap or Escape. Narrow screens get a
|
||||
// bottom sheet instead, so the text never sits on top of the content it
|
||||
// explains. Both are portalled (no button-in-button) and above Modal/Sheet.
|
||||
// `trigger` replaces the (i) glyph (e.g. a whole step pill); `title` heads the sheet.
|
||||
export default function InfoTip({ children, label, title, trigger, side = 'top', size = 'sm', className = '' }) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const narrow = useMediaQuery('(max-width: 640px)');
|
||||
const pinned = useRef(false);
|
||||
const hoverable = (e) => e.pointerType === 'mouse';
|
||||
|
||||
const onOpenChange = (next) => {
|
||||
pinned.current = next;
|
||||
setOpen(next);
|
||||
};
|
||||
const stop = (e) => e.stopPropagation();
|
||||
const noFocus = (e) => e.preventDefault();
|
||||
|
||||
const button = (
|
||||
// eslint-disable-next-line no-restricted-syntax -- bare 18px glyph button; Button/IconButton add control-sized chrome and a nested Tip
|
||||
<button
|
||||
type="button"
|
||||
className={(trigger ? className : `info-tip info-tip--${size} ${className}`).trim()}
|
||||
aria-label={trigger ? label : (label || t('common.moreInfo', 'More info'))}
|
||||
onClick={stop}
|
||||
onPointerEnter={(e) => { if (hoverable(e)) setOpen(true); }}
|
||||
onPointerLeave={(e) => { if (hoverable(e) && !pinned.current) setOpen(false); }}
|
||||
onFocus={(e) => { if (e.currentTarget.matches(':focus-visible')) setOpen(true); }}
|
||||
onBlur={() => { if (!pinned.current) setOpen(false); }}
|
||||
>
|
||||
{trigger || <Info aria-hidden="true" />}
|
||||
</button>
|
||||
);
|
||||
|
||||
if (narrow) {
|
||||
return (
|
||||
<Sheet open={open} onOpenChange={onOpenChange}>
|
||||
<SheetTrigger asChild>{button}</SheetTrigger>
|
||||
<SheetContent
|
||||
side="bottom"
|
||||
className="info-tip__sheet"
|
||||
overlayClassName="info-tip__overlay"
|
||||
aria-describedby={undefined}
|
||||
onOpenAutoFocus={noFocus}
|
||||
onCloseAutoFocus={noFocus}
|
||||
onClick={stop}
|
||||
>
|
||||
<SheetTitle className="info-tip__sheet-title">{title || label || t('common.moreInfo', 'More info')}</SheetTitle>
|
||||
<div className="info-tip__sheet-body">{children}</div>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Popover open={open} onOpenChange={onOpenChange}>
|
||||
<PopoverTrigger asChild>{button}</PopoverTrigger>
|
||||
<PopoverContent
|
||||
side={side}
|
||||
avoidCollisions
|
||||
collisionPadding={8}
|
||||
className="info-tip__panel"
|
||||
onOpenAutoFocus={noFocus}
|
||||
onCloseAutoFocus={noFocus}
|
||||
onClick={stop}
|
||||
>
|
||||
{children}
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import InfoTip from './InfoTip';
|
||||
import IconStepStrip from './IconStepStrip';
|
||||
|
||||
// One short line with the longer explanation tucked in an (i). With `icon`
|
||||
// and/or `steps` it becomes a compact card banner: icon tile + title + (i),
|
||||
// then the IconStepStrip (one row on desktop, two on mobile).
|
||||
export default function SectionIntro({ children, info, icon, steps, className = '' }) {
|
||||
if (!icon && !steps) {
|
||||
return (
|
||||
<p className={`section-intro ${className}`.trim()}>
|
||||
<span>{children}</span>
|
||||
{info && <InfoTip>{info}</InfoTip>}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className={`section-intro section-intro--banner ${className}`.trim()}>
|
||||
<div className="section-intro__head">
|
||||
{icon && <span className="section-intro__icon" aria-hidden="true">{icon}</span>}
|
||||
<span className="section-intro__title">{children}</span>
|
||||
{info && <InfoTip title={children}>{info}</InfoTip>}
|
||||
</div>
|
||||
{steps && <IconStepStrip steps={steps} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import api from '../../services/api';
|
||||
import { formatBytes } from '@/utils/formatBytes';
|
||||
import { KpiBand, MetricCard, Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import EmptyState from '../EmptyState';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { formatDuration, formatNumber } from '@/utils/intl';
|
||||
|
||||
@@ -407,9 +408,12 @@ export default function BackupsOverview({
|
||||
</div>
|
||||
))}
|
||||
{destinations.count === 1 && (
|
||||
<p className="bk-hint bk-hint--warn">
|
||||
<AlertTriangle size={13} />
|
||||
{t('app.backupsOverview.everythingIsOnOneDiskAdd', 'Everything is on one disk. Add a remote destination so a dead server doesn\'t take the backups with it.')}
|
||||
<p className="bk-hint bk-hint--warn tip-chip-row">
|
||||
<span className="tip-chip tip-chip--warning">
|
||||
<AlertTriangle aria-hidden="true" />
|
||||
{t('app.backupsOverview.singleDisk', 'Single disk')}
|
||||
</span>
|
||||
<InfoTip>{t('app.backupsOverview.everythingIsOnOneDiskAdd', 'Everything is on one disk. Add a remote destination so a dead server doesn\'t take the backups with it.')}</InfoTip>
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Star } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { t } from '@/i18n/t';
|
||||
import InfoTip from '@/components/InfoTip';
|
||||
|
||||
/**
|
||||
* The one card for things you browse to install or deploy: extensions,
|
||||
@@ -21,6 +22,9 @@ import { t } from '@/i18n/t';
|
||||
* />
|
||||
* </CatalogGrid>
|
||||
*
|
||||
* `description` lives in an (i) beside the tag, not as a paragraph; `chips`
|
||||
* (short strings) show as a tag row in its place.
|
||||
*
|
||||
* One tag, one action. Version, author and counts go in `sub` / `facts` as
|
||||
* plain text rather than as more badges.
|
||||
*
|
||||
@@ -35,6 +39,7 @@ export function CatalogCard({
|
||||
sub,
|
||||
tag,
|
||||
description,
|
||||
chips,
|
||||
facts,
|
||||
action,
|
||||
featured = false,
|
||||
@@ -78,8 +83,13 @@ export function CatalogCard({
|
||||
{sub && <span className="sk-catalog-card__sub">{sub}</span>}
|
||||
</span>
|
||||
{tag && <span className="sk-catalog-card__tag">{tag}</span>}
|
||||
{description && <InfoTip>{description}</InfoTip>}
|
||||
</div>
|
||||
{description && <p className="sk-catalog-card__desc">{description}</p>}
|
||||
{chips?.length > 0 && (
|
||||
<div className="tip-chip-row">
|
||||
{chips.map((c) => <span key={c} className="tip-chip">{c}</span>)}
|
||||
</div>
|
||||
)}
|
||||
{(facts || action) && (
|
||||
<div className="sk-catalog-card__foot">
|
||||
<span className="sk-catalog-card__facts">{facts}</span>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Decorative; the surrounding text carries the meaning.
|
||||
export default function LockShieldIllustration() {
|
||||
return (
|
||||
<svg className="tip-illustration" viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false">
|
||||
<path d="M24 5 8 11v11c0 10 7 18 16 21 9-3 16-11 16-21V11L24 5Z" fill="currentColor" fillOpacity="0.12" /><rect x="17" y="21" width="14" height="11" rx="2" /><path d="M20 21v-3a4 4 0 0 1 8 0v3" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { SiNginx, SiTraefikproxy, SiCaddy } from 'react-icons/si';
|
||||
import { t } from '../../i18n/t';
|
||||
|
||||
// The three proxy choices as logo tiles with a one-line caption each.
|
||||
export default function ProxyLogoTiles() {
|
||||
const items = [
|
||||
{ Icon: SiNginx, name: 'Nginx', sub: t('app.proxyLogoTiles.hostDefault', 'Host default') },
|
||||
{ Icon: SiTraefikproxy, name: 'Traefik', sub: t('app.proxyLogoTiles.dockerStack', 'Docker stack') },
|
||||
{ Icon: SiCaddy, name: 'Caddy', sub: t('app.proxyLogoTiles.dockerStack', 'Docker stack') },
|
||||
];
|
||||
return (
|
||||
<ul className="logo-tile-row">
|
||||
{items.map(({ Icon, name, sub }) => (
|
||||
<li key={name} className="logo-tile-row__item">
|
||||
<span className="logo-tile-row__tile"><Icon aria-hidden="true" /></span>
|
||||
<span>{name}</span>
|
||||
<span>{sub}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import { Button } from '@/components/ui/button';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { Pill, SegControl, serviceStatusKind } from '../ds';
|
||||
import EmptyState from '../EmptyState';
|
||||
import InfoTip from '../InfoTip';
|
||||
import ProxyLogoTiles from './ProxyLogoTiles';
|
||||
import { AlertTriangle, CheckCircle2, Network } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
@@ -199,9 +201,10 @@ const ProxyStackPanel = ({ serverId }) => {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<p className="proxy-panel__hint">
|
||||
{t('app.proxyStackPanel.hostNginxIsTheDefaultAnd', 'Host Nginx is the default and is recommended for PHP/WordPress. You can opt into a Dockerized Traefik or Caddy proxy deployed as a Compose stack.')}
|
||||
</p>
|
||||
<div className="proxy-panel__hint tip-chip-row">
|
||||
<ProxyLogoTiles />
|
||||
<InfoTip>{t('app.proxyStackPanel.hostNginxIsTheDefaultAnd', 'Host Nginx is the default and is recommended for PHP/WordPress. You can opt into a Dockerized Traefik or Caddy proxy deployed as a Compose stack.')}</InfoTip>
|
||||
</div>
|
||||
|
||||
{audit && audit.mismatch_count > 0 && (
|
||||
<div className="proxy-panel__ingress-warning" role="alert">
|
||||
@@ -301,7 +304,7 @@ const ProxyStackPanel = ({ serverId }) => {
|
||||
<EmptyState
|
||||
icon={Network}
|
||||
title={t('app.proxyStackPanel.hostNginxIsActive', 'Host Nginx is active')}
|
||||
description={t('app.proxyStackPanel.theHostSNginxIsHandling', 'The host\'s Nginx is handling reverse proxying. Switch to Traefik or Caddy above to run a managed Docker proxy stack instead.')}
|
||||
description={<InfoTip>{t('app.proxyStackPanel.theHostSNginxIsHandling', 'The host\'s Nginx is handling reverse proxying. Switch to Traefik or Caddy above to run a managed Docker proxy stack instead.')}</InfoTip>}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,9 @@ import {
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Camera, Eye, FileCheck, GitCompare, ShieldOff } from 'lucide-react';
|
||||
import InfoTip from '@/components/InfoTip';
|
||||
import SectionIntro from '@/components/SectionIntro';
|
||||
import { Card as SharedCard, CardHeader as SharedCardHeader, CardContent as SharedCardContent } from '@/components/ui/card';
|
||||
|
||||
// Scoped file-integrity monitoring: baseline-and-diff over the paths
|
||||
@@ -309,17 +312,26 @@ const IntegrityTab = () => {
|
||||
: <span className="sec-state sec-state--green">clean</span>)}
|
||||
</SharedCardHeader>
|
||||
<SharedCardContent variant="legacy" className="card-body">
|
||||
<p className="sec-hint--lead sec-hint">
|
||||
{baseline
|
||||
? t('app.integrityTab.baselineSummary', {
|
||||
{baseline ? (
|
||||
<p className="sec-hint--lead sec-hint">
|
||||
{t('app.integrityTab.baselineSummary', {
|
||||
count: baseline.file_count,
|
||||
age: formatAge(baseline.created_at) || t('app.integrityTab.unknownAge', 'unknown age'),
|
||||
defaultValue_one: 'Baseline: 1 file, {{age}}',
|
||||
defaultValue_other: 'Baseline: {{count}} files, {{age}}',
|
||||
})
|
||||
: t('app.integrityTab.noBaselineYet', 'No baseline yet. Create one to start tracking changes.')}
|
||||
{check && ` · ${t('app.integrityTab.lastCheck', 'Last check {{age}}', { age: formatAge(check.checked_at) || '' })}`}
|
||||
</p>
|
||||
})}
|
||||
{check && ` · ${t('app.integrityTab.lastCheck', 'Last check {{age}}', { age: formatAge(check.checked_at) || '' })}`}
|
||||
</p>
|
||||
) : (
|
||||
<p className="sec-hint--lead sec-hint tip-chip-row">
|
||||
<span className="tip-chip tip-chip--warning">
|
||||
<ShieldOff aria-hidden="true" />
|
||||
{t('app.integrityTab.noBaselineChip', 'No baseline')}
|
||||
</span>
|
||||
<InfoTip>{t('app.integrityTab.noBaselineYet', 'No baseline yet. Create one to start tracking changes.')}</InfoTip>
|
||||
{check && ` · ${t('app.integrityTab.lastCheck', 'Last check {{age}}', { age: formatAge(check.checked_at) || '' })}`}
|
||||
</p>
|
||||
)}
|
||||
{/* These act on the SCOPE and are there whether or not the
|
||||
changes list is open, so they keep their own bar; the
|
||||
table's chrome rides the view line below. */}
|
||||
@@ -427,21 +439,28 @@ const IntegrityTab = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p className="sec-hint sec-hint--lead">
|
||||
{t('app.integrityTab.baselineAndDiffMonitoringOverThe', 'Baseline-and-diff monitoring over the paths ServerKit manages. Baseline a scope, then check it (or let the scheduled sweep do it). Any added, removed or modified files are flagged and admins are notified. Accepting changes re-baselines the scope.')}
|
||||
</p>
|
||||
<SectionIntro
|
||||
icon={<FileCheck />}
|
||||
info={t('app.integrityTab.baselineAndDiffMonitoringOverThe', 'Baseline-and-diff monitoring over the paths ServerKit manages. Baseline a scope, then check it (or let the scheduled sweep do it). Any added, removed or modified files are flagged and admins are notified. Accepting changes re-baselines the scope.')}
|
||||
steps={[
|
||||
{ icon: <Camera />, label: t('app.integrityTab.stepBaseline', 'Baseline'), info: t('app.integrityTab.stepBaselineInfo', 'Snapshot the current files of a scope.') },
|
||||
{ icon: <Eye />, label: t('app.integrityTab.stepWatch', 'Watch'), info: t('app.integrityTab.stepWatchInfo', 'Check manually or let the scheduled sweep run.') },
|
||||
{ icon: <GitCompare />, label: t('app.integrityTab.stepDiff', 'Diff'), info: t('app.integrityTab.stepDiffInfo', 'Added, removed or modified files are flagged and admins are notified. Accepting re-baselines.') },
|
||||
]}
|
||||
>
|
||||
{t('app.integrityTab.headerLine', 'Detect changed config files')}
|
||||
</SectionIntro>
|
||||
|
||||
{managedScopes.map(renderScopeCard)}
|
||||
{appScopes.map(renderScopeCard)}
|
||||
|
||||
<SharedCard variant="legacy" className="card">
|
||||
<SharedCardHeader variant="legacy" className="card-header">
|
||||
<h3>{t('app.integrityTab.applicationDocroots', 'Service docroots')} <span className="sec-count">{t('app.integrityTab.optIn', '· opt-in')}</span></h3>
|
||||
<h3>{t('app.integrityTab.applicationDocroots', 'Service docroots')} <span className="sec-count">{t('app.integrityTab.optIn', '· opt-in')}</span>{' '}
|
||||
<InfoTip>{t('app.integrityTab.watchingADocrootHashesEveryFile', 'Watching a docroot hashes every file outside upload/cache directories, so it is opt-in per service.')}</InfoTip>
|
||||
</h3>
|
||||
</SharedCardHeader>
|
||||
<SharedCardContent variant="legacy" className="card-body">
|
||||
<p className="sec-hint sec-hint--lead">
|
||||
{t('app.integrityTab.watchingADocrootHashesEveryFile', 'Watching a docroot hashes every file outside upload/cache directories, so it is opt-in per service.')}
|
||||
</p>
|
||||
{appsError ? (
|
||||
<ErrorState compact error={appsError} onRetry={loadApps} />
|
||||
) : apps.length === 0 ? (
|
||||
|
||||
@@ -15,7 +15,10 @@ import {
|
||||
Siren,
|
||||
Bug,
|
||||
Radar,
|
||||
Puzzle,
|
||||
Bell,
|
||||
} from 'lucide-react';
|
||||
import InfoTip from '@/components/InfoTip';
|
||||
import { Card as SharedCard, CardHeader as SharedCardHeader, CardContent as SharedCardContent } from '@/components/ui/card';
|
||||
|
||||
// Status glyph per check state — paired with the label so state never relies on
|
||||
@@ -196,17 +199,22 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
|
||||
})}
|
||||
</div>
|
||||
|
||||
<p className="sec-hint sec-posture__foot">
|
||||
<div className="sec-posture__foot tip-chip-row">
|
||||
{!hasSecurityExtensions && (
|
||||
<>
|
||||
{t('app.overviewTab.moreSecurityTools', 'More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the')}
|
||||
{' '}
|
||||
<Link to="/marketplace">{t('app.overviewTab.marketplaceLink', 'Extensions')}</Link>
|
||||
{'. '}
|
||||
<Link to="/marketplace" className="tip-chip tip-chip--accent">
|
||||
<Puzzle aria-hidden="true" />
|
||||
{t('app.overviewTab.marketplaceLink', 'Extensions')}
|
||||
</Link>
|
||||
<InfoTip>{t('app.overviewTab.moreSecurityTools', 'More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the Extensions marketplace.')}</InfoTip>
|
||||
</>
|
||||
)}
|
||||
{t('app.overviewTab.addAlertDeliveryChannelsDiscordSlack', 'Add alert delivery channels (Discord, Slack, Telegram) in Settings → Notifications.')}
|
||||
</p>
|
||||
<Link to="/settings/notifications" className="tip-chip tip-chip--accent">
|
||||
<Bell aria-hidden="true" />
|
||||
{t('app.overviewTab.notificationsLink', 'Notifications')}
|
||||
</Link>
|
||||
<InfoTip>{t('app.overviewTab.addAlertDeliveryChannelsDiscordSlack', 'Add alert delivery channels (Discord, Slack, Telegram) in Settings → Notifications.')}</InfoTip>
|
||||
</div>
|
||||
</SharedCardContent>
|
||||
</SharedCard>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useToast } from '../../contexts/useToast.js';
|
||||
import { useConfirm } from '../../hooks/useConfirm';
|
||||
import CopyField from '@/components/CopyField';
|
||||
import { InfoList, InfoItem } from '../InfoList';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { DangerZone } from '../DangerZone';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -45,12 +46,13 @@ const AgentRegistrationSection = ({ server, onRegenerateToken }) => {
|
||||
<div className="form-section__header">
|
||||
<span className="form-section__icon"><KeyIcon /></span>
|
||||
<div>
|
||||
<h3>{t('app.serverSettingsTab.connectionString', 'Connection string')}</h3>
|
||||
<p className="section-description">
|
||||
<h3>{t('app.serverSettingsTab.connectionString', 'Connection string')}
|
||||
<InfoTip>
|
||||
{t('app.serverSettingsTab.generateAFreshConnectionStringTo', 'Generate a fresh connection string to pair (or re-pair) this server. Useful after reinstalling the agent: old credentials are gone, but a new string brings the agent right back to this row.')}
|
||||
{isOnline && ` ${t('app.serverSettingsTab.onlineRegenerateNote', 'This server is online now; a new string only affects re-pairing.')}`}
|
||||
{isExpired && ` ${t('app.serverSettingsTab.previousTokenExpired', 'The previous token has expired.')}`}
|
||||
</p>
|
||||
</InfoTip></h3>
|
||||
<p className="section-description">{t('app.serverSettingsTab.pairOrRepair', 'Pair or re-pair this server.')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<Button onClick={onRegenerateToken}>
|
||||
@@ -261,10 +263,9 @@ const ServerSettingsTab = ({ server, onUpdate, onRegenerateToken, onDelete }) =>
|
||||
<div className="form-section__header">
|
||||
<span className="form-section__icon"><NetworkIcon /></span>
|
||||
<div>
|
||||
<h3>{t('app.serverSettingsTab.connectionIpAllowlist', 'Connection and IP allowlist')}</h3>
|
||||
<p className="section-description">
|
||||
{t('app.serverSettingsTab.restrictWhichIpsCanConnectSupports', 'Restrict which IPs can connect. Supports single IPs, CIDR notation, and wildcards.')}
|
||||
</p>
|
||||
<h3>{t('app.serverSettingsTab.connectionIpAllowlist', 'Connection and IP allowlist')}
|
||||
<InfoTip>{t('app.serverSettingsTab.restrictWhichIpsCanConnectSupports', 'Restrict which IPs can connect. Supports single IPs, CIDR notation, and wildcards.')}</InfoTip></h3>
|
||||
<p className="section-description">{t('app.serverSettingsTab.allowedIps', 'Allowed IPs only.')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -334,10 +335,9 @@ const ServerSettingsTab = ({ server, onUpdate, onRegenerateToken, onDelete }) =>
|
||||
<div className="form-section__header">
|
||||
<span className="form-section__icon"><KeyIcon /></span>
|
||||
<div>
|
||||
<h3>{t('app.serverSettingsTab.apiKeyRotation', 'API key rotation')}</h3>
|
||||
<p className="section-description">
|
||||
{t('app.serverSettingsTab.rotateTheApiCredentialsUsedBy', 'Rotate the API credentials used by the agent. The agent must be online to receive new credentials.')}
|
||||
</p>
|
||||
<h3>{t('app.serverSettingsTab.apiKeyRotation', 'API key rotation')}
|
||||
<InfoTip>{t('app.serverSettingsTab.rotateTheApiCredentialsUsedBy', 'Rotate the API credentials used by the agent. The agent must be online to receive new credentials.')}</InfoTip></h3>
|
||||
<p className="section-description">{t('app.serverSettingsTab.rotateAgentCredentials', 'Rotate agent credentials.')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="key-rotation-actions">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useEffect, useState, useId } from 'react';
|
||||
import { Unlink } from 'lucide-react';
|
||||
import { KeyRound, Link2, Server, Unlink } from 'lucide-react';
|
||||
import IconStepStrip from '../IconStepStrip';
|
||||
import api from '../../services/api';
|
||||
import { useToast } from '../../contexts/useToast.js';
|
||||
import { ConfirmDialog } from '../ConfirmDialog';
|
||||
@@ -130,9 +131,11 @@ const LinkPanelForm = ({ onClose }) => {
|
||||
return (
|
||||
<form className="server-setup-form" onSubmit={handleLink}>
|
||||
<div className="server-setup-form__body">
|
||||
<p className="section-description">
|
||||
{t('app.linkPanelForm.linkThisPanelToAMaster', 'Link this panel to a master ServerKit so it can manage this server. No separate agent install is needed. Generate a registration token on the master: Servers → Add server / regenerate token.')}
|
||||
</p>
|
||||
<IconStepStrip steps={[
|
||||
{ icon: <KeyRound />, label: t('app.linkPanelForm.stepMasterToken', 'Master token'), info: t('app.linkPanelForm.linkThisPanelToAMaster', 'Link this panel to a master ServerKit so it can manage this server. No separate agent install is needed. Generate a registration token on the master: Servers → Add server / regenerate token.') },
|
||||
{ icon: <Link2 />, label: t('app.linkPanelForm.stepPasteHere', 'Paste here') },
|
||||
{ icon: <Server />, label: t('app.linkPanelForm.stepLinked', 'Linked') },
|
||||
]} />
|
||||
|
||||
{linkError && <div className="error-message">{linkError}</div>}
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@ import { Input } from '../ui/input';
|
||||
import { Switch } from '../ui/switch';
|
||||
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '../ui/select';
|
||||
import ModelPicker from '../ai/ModelPicker';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { SiAnthropic, SiGooglegemini, SiMistralai, SiOllama } from 'react-icons/si';
|
||||
import { Network } from 'lucide-react';
|
||||
import useSettingFocus from '../../hooks/useSettingFocus';
|
||||
|
||||
function ChoiceField({ id, label, value, onChange, disabled, placeholder, options, children }) {
|
||||
@@ -106,8 +109,12 @@ export default function AIConnectionsSettings({ connections, providers, defaultI
|
||||
|
||||
return (
|
||||
<div className="settings-card ai-connections">
|
||||
<h3>{t('ai.connections.title', 'Provider connections')}</h3>
|
||||
<p className="section-description">{t('ai.connections.description', 'Configure native Prompture providers or connect a gateway such as OmniRoute. Credentials stay encrypted on the server.')}</p>
|
||||
<h3>{t('ai.connections.title', 'Provider connections')} <InfoTip>{t('ai.connections.description', 'Configure native Prompture providers or connect a gateway such as OmniRoute. Credentials stay encrypted on the server.')}</InfoTip></h3>
|
||||
<ul className="logo-tile-row" aria-hidden="true">
|
||||
{[SiAnthropic, SiGooglegemini, SiMistralai, SiOllama, Network].map((Icon, i) => (
|
||||
<li key={i} className="logo-tile-row__item"><span className="logo-tile-row__tile"><Icon /></span></li>
|
||||
))}
|
||||
</ul>
|
||||
<ChoiceField id="ai-connection" label={t('ai.connections.saved', 'Saved connection')}
|
||||
value={draft.id} onChange={selectConnection} disabled={busy}
|
||||
placeholder={t('ai.connections.add', 'Add a connection…')}
|
||||
@@ -136,7 +143,7 @@ export default function AIConnectionsSettings({ connections, providers, defaultI
|
||||
{(meta?.fields || []).map((field) => (
|
||||
<FormField key={field.name} htmlFor={`ai-config-${field.name}`}
|
||||
label={<>{field.label}{field.required ? t('ai.connections.required', ' (required)') : t('ai.connections.optional', ' (optional)')}</>}
|
||||
hint={field.type === 'url' ? t('ai.connections.endpointHelp', 'Use an address reachable from the ServerKit backend. In Docker, localhost refers to the panel container. Changing this URL requires re-entering credentials.') : undefined}>
|
||||
info={field.type === 'url' ? t('ai.connections.endpointHelp', 'Use an address reachable from the ServerKit backend. In Docker, localhost refers to the panel container. Changing this URL requires re-entering credentials.') : undefined}>
|
||||
<Input id={`ai-config-${field.name}`} type={field.secret ? 'password' : field.type}
|
||||
autoComplete="off" disabled={busy} value={draft.config[field.name] ?? ''}
|
||||
placeholder={field.secret && draft.secrets_set.includes(field.name) ? t('ai.connections.secretConfigured', 'Configured (leave blank to keep)') : field.default || ''}
|
||||
@@ -152,7 +159,7 @@ export default function AIConnectionsSettings({ connections, providers, defaultI
|
||||
</div>
|
||||
<div {...register('ai-model')}>
|
||||
<FormField htmlFor="ai-model" label={t('ai.connections.defaultModel', 'Default model ID')}
|
||||
hint={t('ai.connections.discoveryHint', 'Discover models from this connection, then browse or enter an exact model ID.')}>
|
||||
info={t('ai.connections.discoveryHint', 'Discover models from this connection, then browse or enter an exact model ID.')}>
|
||||
<ModelPicker id="ai-model" value={draft.model} models={models} disabled={busy}
|
||||
onChange={(model) => { revision.current += 1; setDraft({ ...draft, model }); setMessage(null); }} />
|
||||
</FormField>
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Switch } from '../ui/switch';
|
||||
import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '../ui/select';
|
||||
import ModelBinding from '../ai/ModelBinding';
|
||||
import EmptyState from '../EmptyState';
|
||||
import InfoTip from '../InfoTip';
|
||||
|
||||
// Radix Select cannot hold an empty value; this stands in for "no override".
|
||||
const PROVIDER_DEFAULT = '__default';
|
||||
@@ -45,7 +46,7 @@ export default function AIManagementSettings({ connections, defaultId }) {
|
||||
['standard', t('ai.management.standard', 'Standard'), t('ai.management.standardHint', 'Everyday questions and tool-assisted troubleshooting.')],
|
||||
['advanced', t('ai.management.advanced', 'Advanced'), t('ai.management.advancedHint', 'Complex analysis and read-only diagnostic tasks.')],
|
||||
];
|
||||
const numberField = (key, label, min, max, hint, step = '1') => <FormField key={key} htmlFor={`ai-${key}`} label={label} hint={hint}>
|
||||
const numberField = (key, label, min, max, hint, step = '1') => <FormField key={key} htmlFor={`ai-${key}`} label={label} info={hint}>
|
||||
<Input id={`ai-${key}`} type="number" min={min} max={max} step={step} value={config[key]} disabled={busy} onChange={(e) => change(key, e.target.value)} />
|
||||
</FormField>;
|
||||
const toggle = (key, label) => <div className="settings-row"><label htmlFor={`ai-${key}`}>{label}</label>
|
||||
@@ -74,10 +75,9 @@ export default function AIManagementSettings({ connections, defaultId }) {
|
||||
</div>;
|
||||
return <div className="sk-ai-management">
|
||||
<section className="settings-card">
|
||||
<h3>{t('ai.management.taskModels', 'Task models')}</h3>
|
||||
<p>{t('ai.management.taskModelsHint', 'Choose models by task. New chats resolve these roles; existing chats keep their selected connection.')}</p>
|
||||
<h3>{t('ai.management.taskModels', 'Task models')} <InfoTip>{t('ai.management.taskModelsHint', 'Choose models by task. New chats resolve these roles; existing chats keep their selected connection.')}</InfoTip></h3>
|
||||
{profiles.map(([key, label, hint]) => <div className="sk-ai-profile" key={key}>
|
||||
<h4>{label}</h4><p className="settings-hint">{hint}</p>
|
||||
<h4>{label} <InfoTip>{hint}</InfoTip></h4>
|
||||
<ModelBinding id={`ai-profile-${key}`} value={config.profiles[key]} connections={connections} allowInherit discover disabled={busy}
|
||||
inheritLabel={key === 'standard' ? t('ai.management.panelDefault', 'Use panel default') : undefined}
|
||||
onChange={(value) => change('profiles', { ...config.profiles, [key]: value })} />
|
||||
@@ -87,8 +87,7 @@ export default function AIManagementSettings({ connections, defaultId }) {
|
||||
</div>)}
|
||||
</section>
|
||||
<section className="settings-card">
|
||||
<h3>{t('ai.management.routing', 'Routing and fallback')}</h3>
|
||||
<p>{t('ai.management.routingHint', 'Automatic routing uses only the approved pool below. An explicit model choice takes priority. Capability tiers guide selection; speed is not a measured guarantee.')}</p>
|
||||
<h3>{t('ai.management.routing', 'Routing and fallback')} <InfoTip>{t('ai.management.routingHint', 'Automatic routing uses only the approved pool below. An explicit model choice takes priority. Capability tiers guide selection; speed is not a measured guarantee.')}</InfoTip></h3>
|
||||
{toggle('routing_enabled', t('ai.management.enableRouting', 'Enable automatic routing'))}
|
||||
<FormField htmlFor="ai-routing-strategy" label={t('ai.management.strategy', 'Strategy')}>
|
||||
<Select value={config.strategy} disabled={busy} onValueChange={(value) => change('strategy', value)}>
|
||||
@@ -102,13 +101,13 @@ export default function AIManagementSettings({ connections, defaultId }) {
|
||||
</Select>
|
||||
</FormField>
|
||||
{candidates('pool')}
|
||||
<FormField htmlFor="ai-routing-sample" label={t('ai.management.previewTask', 'Preview a task')} hint={t('ai.management.previewHint', 'Uses the current draft. Preview does not send your task to a provider or spend tokens.')}>
|
||||
<FormField htmlFor="ai-routing-sample" label={t('ai.management.previewTask', 'Preview a task')} info={t('ai.management.previewHint', 'Uses the current draft. Preview does not send your task to a provider or spend tokens.')}>
|
||||
<Input id="ai-routing-sample" value={sample} onChange={(e) => setSample(e.target.value)} maxLength={16000} />
|
||||
</FormField>
|
||||
<Button type="button" variant="outline" onClick={previewRoute} disabled={busy || !sample.trim()}>{t('ai.management.preview', 'Preview routing')}</Button>
|
||||
{preview && <div className="sk-ai-routing-result" role="status"><strong>{connections.find((item) => item.id === preview.connection_id)?.name} · {preview.model}</strong><p>{preview.reason}</p></div>}
|
||||
{toggle('fallback_enabled', t('ai.management.enableFallback', 'Enable fallback before output starts'))}
|
||||
<p className="settings-hint">{t('ai.management.fallbackHint', 'Candidates are tried in order using their own saved credentials. Delivered output and tool actions are never replayed. Degradation chooses a lower-priced candidate before a turn at 80% of the conversation allowance; unknown prices cannot be compared.')}</p>
|
||||
<InfoTip>{t('ai.management.fallbackHint', 'Candidates are tried in order using their own saved credentials. Delivered output and tool actions are never replayed. Degradation chooses a lower-priced candidate before a turn at 80% of the conversation allowance; unknown prices cannot be compared.')}</InfoTip>
|
||||
{candidates('fallbacks')}
|
||||
</section>
|
||||
<section className="settings-card">
|
||||
@@ -132,10 +131,10 @@ export default function AIManagementSettings({ connections, defaultId }) {
|
||||
{numberField('max_tool_rounds', t('ai.management.toolRounds', 'Maximum tool rounds'), 1, 20)}
|
||||
{numberField('max_tool_result_length', t('ai.management.toolLength', 'Maximum tool result characters'), 256, 32000)}
|
||||
{numberField('max_history_messages', t('ai.management.history', 'Messages kept in model context'), 4, 200)}
|
||||
<FormField htmlFor="ai-temperature" label={t('ai.management.temperature', 'Temperature')} hint={t('ai.management.supportedOnly', 'Applied only when the model catalog confirms support. Blank uses the provider default.')}>
|
||||
<FormField htmlFor="ai-temperature" label={t('ai.management.temperature', 'Temperature')} info={t('ai.management.supportedOnly', 'Applied only when the model catalog confirms support. Blank uses the provider default.')}>
|
||||
<Input id="ai-temperature" type="number" min="0" max="2" step="0.1" disabled={busy} value={config.temperature ?? ''} onChange={(e) => change('temperature', e.target.value === '' ? null : e.target.value)} />
|
||||
</FormField>
|
||||
<FormField htmlFor="ai-reasoning" label={t('ai.management.reasoning', 'Reasoning effort')} hint={t('ai.management.reasoningHint', 'Applied to supported OpenAI reasoning models. Other models retain provider defaults.')}>
|
||||
<FormField htmlFor="ai-reasoning" label={t('ai.management.reasoning', 'Reasoning effort')} info={t('ai.management.reasoningHint', 'Applied to supported OpenAI reasoning models. Other models retain provider defaults.')}>
|
||||
<Select disabled={busy} value={config.reasoning_effort || PROVIDER_DEFAULT} onValueChange={(value) => change('reasoning_effort', value === PROVIDER_DEFAULT ? null : value)}>
|
||||
<SelectTrigger id="ai-reasoning"><SelectValue /></SelectTrigger>
|
||||
<SelectContent>
|
||||
|
||||
@@ -11,6 +11,7 @@ import AIConnectionsSettings from './AIConnectionsSettings';
|
||||
import AIManagementSettings from './AIManagementSettings';
|
||||
import AIUsageSettings from './AIUsageSettings';
|
||||
import { SegControl } from '../ds/SegControl';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const AI_CONFIG_CHANGED_EVENT = 'serverkit:ai-config-changed';
|
||||
@@ -122,9 +123,9 @@ const AISettingsTab = () => {
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor="ai-enabled">{t('app.aISettingsTab.enableAiAssistant', 'Enable AI assistant')}</Label>
|
||||
<span className="settings-hint">{settings.default_connection_id
|
||||
<InfoTip>{settings.default_connection_id
|
||||
? t('ai.settings.enabledHint', 'Changes apply immediately to new messages. Configure the default connection below.')
|
||||
: t('ai.settings.setupHint', 'Save a provider connection below before enabling the assistant.')}</span>
|
||||
: t('ai.settings.setupHint', 'Save a provider connection below before enabling the assistant.')}</InfoTip>
|
||||
</div>
|
||||
<Switch id="ai-enabled" checked={settings.enabled}
|
||||
disabled={loadError || toggling || saving || (!settings.enabled && !settings.default_connection_id)}
|
||||
@@ -136,21 +137,20 @@ const AISettingsTab = () => {
|
||||
defaultId={settings.default_connection_id} onSaved={refreshConnections} />
|
||||
</div>
|
||||
<div className="settings-card">
|
||||
<h3>{t('ai.settings.limits', 'Limits and protections')}</h3>
|
||||
<p>{t('ai.settings.limitsHint', 'These settings apply to assistant conversations. Save changes to apply them.')}</p>
|
||||
<h3>{t('ai.settings.limits', 'Limits and protections')} <InfoTip>{t('ai.settings.limitsHint', 'These settings apply to assistant conversations. Save changes to apply them.')}</InfoTip></h3>
|
||||
<div {...register('ai-cost-limit', 'form-group')}>
|
||||
<label htmlFor="ai-max-cost">{t('app.aISettingsTab.perConversationCostCeilingUsd', 'Per-conversation cost ceiling (USD)')}</label>
|
||||
<div className="label-with-tip">
|
||||
<label htmlFor="ai-max-cost">{t('app.aISettingsTab.perConversationCostCeilingUsd', 'Per-conversation cost ceiling (USD)')}</label><InfoTip>{t('ai.settings.costHint', 'Used by the budget behavior in Task models and behavior. A call can exceed the remaining amount; models with unknown pricing need a provider-side limit. Set 0 for no limit.')}</InfoTip>
|
||||
</div>
|
||||
<Input
|
||||
id="ai-max-cost"
|
||||
type="number"
|
||||
step="0.01"
|
||||
min="0"
|
||||
aria-describedby="ai-max-cost-hint"
|
||||
disabled={loadError || saving}
|
||||
value={settings.max_cost_usd}
|
||||
onChange={(e) => setSettings((s) => ({ ...s, max_cost_usd: e.target.value }))}
|
||||
/>
|
||||
<p id="ai-max-cost-hint" className="settings-hint">{t('ai.settings.costHint', 'Used by the budget behavior in Task models and behavior. A call can exceed the remaining amount; models with unknown pricing need a provider-side limit. Set 0 for no limit.')}</p>
|
||||
</div>
|
||||
|
||||
<div {...register('ai-pii-redaction', 'form-group')}>
|
||||
|
||||
@@ -13,6 +13,7 @@ import ThemeBrowseModal from './ThemeBrowseModal';
|
||||
import ThemeStudioModal from './ThemeStudioModal';
|
||||
import api from '../../services/api';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
|
||||
const ACCENT_PRESETS = [
|
||||
@@ -64,8 +65,7 @@ const AppearanceTab = () => {
|
||||
<LanguageSelector />
|
||||
|
||||
<div {...register('appearance-theme', 'settings-card')}>
|
||||
<h3>{t('app.appearanceTab.theme', 'Theme')}</h3>
|
||||
<p>{t('app.appearanceTab.selectYourPreferredColorScheme', 'Select your preferred color scheme')}</p>
|
||||
<h3>{t('app.appearanceTab.theme', 'Theme')} <InfoTip>{t('app.appearanceTab.selectYourPreferredColorScheme', 'Select your preferred color scheme')}</InfoTip></h3>
|
||||
<div className="theme-options">
|
||||
<Button variant="unstyled" type="button"
|
||||
className={`theme-option ${theme === 'dark' ? 'active' : ''}`}
|
||||
@@ -112,8 +112,7 @@ const AppearanceTab = () => {
|
||||
<div {...register('appearance-theme-gallery', 'settings-card')}>
|
||||
<div className="theme-gallery-header">
|
||||
<div>
|
||||
<h3>{t('app.appearanceTab.theme', 'Theme')}</h3>
|
||||
<p>{t('app.appearanceTab.pickAColorThemeAppliesInstantly', 'Pick a color theme. Applies instantly and stays your personal choice; the dark/light toggle above still works on top of it.')}</p>
|
||||
<h3>{t('app.appearanceTab.theme', 'Theme')} <InfoTip>{t('app.appearanceTab.pickAColorThemeAppliesInstantly', 'Pick a color theme. Applies instantly and stays your personal choice; the dark/light toggle above still works on top of it.')}</InfoTip></h3>
|
||||
</div>
|
||||
<div className="theme-gallery-actions">
|
||||
<Button variant="outline" size="sm" onClick={() => setStudioOpen(true)}>
|
||||
@@ -147,8 +146,7 @@ const AppearanceTab = () => {
|
||||
</div>
|
||||
|
||||
<div {...register('appearance-accent-color', 'settings-card')}>
|
||||
<h3>{t('app.appearanceTab.accentColor', 'Accent color')}</h3>
|
||||
<p>{t('app.appearanceTab.chooseThePrimaryAccentColorUsed', 'Choose the primary accent color used across the interface.')}</p>
|
||||
<h3>{t('app.appearanceTab.accentColor', 'Accent color')} <InfoTip>{t('app.appearanceTab.chooseThePrimaryAccentColorUsed', 'Choose the primary accent color used across the interface.')}</InfoTip></h3>
|
||||
<div className="accent-presets">
|
||||
{ACCENT_PRESETS.map(({ label, color }) => (
|
||||
<Button variant="unstyled" type="button"
|
||||
@@ -187,10 +185,7 @@ const AppearanceTab = () => {
|
||||
</div>
|
||||
|
||||
<div {...register('appearance-widgets', 'settings-card')}>
|
||||
<h3>{t('app.appearanceTab.dashboardWidgets', 'Dashboard widgets')}</h3>
|
||||
<p>
|
||||
{t('app.appearanceTab.widgetsAreArrangedOnTheDashboard', 'Widgets are arranged on the dashboard itself now. Add, move, resize and configure them in place, across as many boards as you need.')}
|
||||
</p>
|
||||
<h3>{t('app.appearanceTab.dashboardWidgets', 'Dashboard widgets')} <InfoTip>{t('app.appearanceTab.widgetsAreArrangedOnTheDashboard', 'Widgets are arranged on the dashboard itself now. Add, move, resize and configure them in place, across as many boards as you need.')}</InfoTip></h3>
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link to="/">
|
||||
<LayoutGrid size={14} />
|
||||
|
||||
@@ -10,6 +10,8 @@ import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import InfoTip from '../InfoTip';
|
||||
import LockShieldIllustration from '../illustrations/LockShieldIllustration';
|
||||
import CopyField from '../CopyField';
|
||||
import { downloadBlob } from '@/utils/downloadBlob';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -313,14 +315,9 @@ Keep these codes in a safe place.`;
|
||||
{/* Two-Factor Authentication Section */}
|
||||
<div {...register('security-2fa', 'settings-card two-fa-card')} data-walkthrough="two-factor-card">
|
||||
<div className="two-fa-header">
|
||||
<div className="two-fa-icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" fill="none" strokeWidth="2">
|
||||
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/>
|
||||
<path d="M7 11V7a5 5 0 0 1 10 0v4"/>
|
||||
</svg>
|
||||
</div>
|
||||
<LockShieldIllustration />
|
||||
<div>
|
||||
<h3>{t('app.securitySettingsTab.twoFactorAuthentication2fa', 'Two-factor authentication (2FA)')}</h3>
|
||||
<h3>{t('app.securitySettingsTab.twoFactorAuthentication2fa', 'Two-factor authentication (2FA)')} <InfoTip>{t('app.securitySettingsTab.twoFactorAuthenticationAddsAnAdditional', 'Two-factor authentication adds an additional layer of security to your account by requiring a code from your authenticator app in addition to your password.')}</InfoTip></h3>
|
||||
<p>{t('app.securitySettingsTab.addAnExtraLayerOfSecurity', 'Add an extra layer of security to your account.')}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -372,9 +369,6 @@ Keep these codes in a safe place.`;
|
||||
</div>
|
||||
) : (
|
||||
<div className="two-fa-disabled">
|
||||
<p className="two-fa-description">
|
||||
{t('app.securitySettingsTab.twoFactorAuthenticationAddsAnAdditional', 'Two-factor authentication adds an additional layer of security to your account by requiring a code from your authenticator app in addition to your password.')}
|
||||
</p>
|
||||
<Button
|
||||
variant="default"
|
||||
onClick={handleInitiate2FA}
|
||||
@@ -433,8 +427,7 @@ Keep these codes in a safe place.`;
|
||||
</form>
|
||||
|
||||
<div {...register('security-sessions', 'settings-card')}>
|
||||
<h3>{t('app.securitySettingsTab.sessions', 'Sessions')}</h3>
|
||||
<p>{t('app.securitySettingsTab.manageYourActiveSessions', 'Manage your active sessions')}</p>
|
||||
<h3>{t('app.securitySettingsTab.sessions', 'Sessions')} <InfoTip>{t('app.securitySettingsTab.manageYourActiveSessions', 'Manage your active sessions')}</InfoTip></h3>
|
||||
<div className="session-item current">
|
||||
<div className="session-info">
|
||||
<svg viewBox="0 0 24 24" width="20" height="20">
|
||||
|
||||
@@ -11,6 +11,7 @@ import { Pill } from '@/components/ds';
|
||||
import useSettingFocus from '../../hooks/useSettingFocus';
|
||||
import { useAuth } from '../../contexts/useAuth.js';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import InfoTip from '../InfoTip';
|
||||
|
||||
const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
const fieldId = useId();
|
||||
@@ -329,13 +330,12 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
)}
|
||||
|
||||
<div {...register('site-appearance', 'settings-card')}>
|
||||
<h3>{t('app.siteSettingsTab.panelAppearance', 'Panel appearance')}</h3>
|
||||
<p>{t('app.siteSettingsTab.namesShownInTheBrowserTab', 'Names shown in the browser tab and on the sign-in page, plus the sign-in page layout.')}</p>
|
||||
<h3>{t('app.siteSettingsTab.panelAppearance', 'Panel appearance')} <InfoTip>{t('app.siteSettingsTab.namesShownInTheBrowserTab', 'Names shown in the browser tab and on the sign-in page, plus the sign-in page layout.')}</InfoTip></h3>
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor="public-title">{t('app.siteSettingsTab.publicSignInTitle', 'Public sign-in title')}</Label>
|
||||
<Label htmlFor="public-title">{t('app.siteSettingsTab.publicSignInTitle', 'Public sign-in title')}</Label><InfoTip>{t('app.siteSettingsTab.shownOnThePublicSignIn', "Shown on the public sign-in / register pages and the browser tab before sign-in. Kept brand-neutral by default so the panel isn't trivially identifiable.")}</InfoTip>
|
||||
</div>
|
||||
<div className="settings-control">
|
||||
<Input
|
||||
@@ -347,13 +347,12 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">{t('app.siteSettingsTab.shownOnThePublicSignIn', "Shown on the public sign-in / register pages and the browser tab before sign-in. Kept brand-neutral by default so the panel isn't trivially identifiable.")}</span>
|
||||
</div>
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor="panel-title">{t('app.siteSettingsTab.panelTitleSignedIn', 'Panel title (signed in)')}</Label>
|
||||
<Label htmlFor="panel-title">{t('app.siteSettingsTab.panelTitleSignedIn', 'Panel title (signed in)')}</Label><InfoTip>{t('app.siteSettingsTab.shownInTheBrowserTabOnce', 'Shown in the browser tab once signed in (inside the panel).')}</InfoTip>
|
||||
</div>
|
||||
<div className="settings-control">
|
||||
<Input
|
||||
@@ -365,13 +364,12 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">{t('app.siteSettingsTab.shownInTheBrowserTabOnce', 'Shown in the browser tab once signed in (inside the panel).')}</span>
|
||||
</div>
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor="login-layout">{t('app.siteSettingsTab.loginLayout', 'Sign-in layout')}</Label>
|
||||
<Label htmlFor="login-layout">{t('app.siteSettingsTab.loginLayout', 'Sign-in layout')}</Label><InfoTip>{t('app.siteSettingsTab.rearrangesTheSignInPageApplies', 'Rearranges the sign-in page. Applies on the next load of the sign-in page.')}</InfoTip>
|
||||
</div>
|
||||
<div className="settings-control">
|
||||
<Select value={loginLayout} onValueChange={setLoginLayout}>
|
||||
@@ -389,18 +387,16 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">{t('app.siteSettingsTab.rearrangesTheSignInPageApplies', 'Rearranges the sign-in page. Applies on the next load of the sign-in page.')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div {...register('site-registration', 'settings-card')}>
|
||||
<h3>{t('app.siteSettingsTab.userRegistration', 'User registration')}</h3>
|
||||
<p>{t('app.siteSettingsTab.allowNewUsersToCreateAccounts', 'Allow new users to create accounts on the sign-in page.')}</p>
|
||||
<h3>{t('app.siteSettingsTab.userRegistration', 'User registration')} <InfoTip>{t('app.siteSettingsTab.allowNewUsersToCreateAccounts', 'Allow new users to create accounts on the sign-in page.')}</InfoTip></h3>
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor={`${fieldId}-registration`}>{t('app.siteSettingsTab.enablePublicRegistration', 'Enable public registration')}</Label>
|
||||
<Label htmlFor={`${fieldId}-registration`}>{t('app.siteSettingsTab.enablePublicRegistration', 'Enable public registration')}</Label><InfoTip>{t('app.siteSettingsTab.whenDisabledOnlyAdministratorsCanCreate', 'When disabled, only administrators can create new user accounts.')}</InfoTip>
|
||||
</div>
|
||||
<Switch
|
||||
id={`${fieldId}-registration`}
|
||||
@@ -409,20 +405,16 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</div>
|
||||
<span className="form-help">
|
||||
{t('app.siteSettingsTab.whenDisabledOnlyAdministratorsCanCreate', 'When disabled, only administrators can create new user accounts.')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div {...register('site-app-ports', 'settings-card')}>
|
||||
<h3>{t('app.siteSettingsTab.managedAppPorts', 'Managed service ports')}</h3>
|
||||
<p>{t('app.siteSettingsTab.controlTheHostPortAssignedTo', 'Control the host port assigned to new WordPress sites and other managed services.')}</p>
|
||||
<h3>{t('app.siteSettingsTab.managedAppPorts', 'Managed service ports')} <InfoTip>{t('app.siteSettingsTab.controlTheHostPortAssignedTo', 'Control the host port assigned to new WordPress sites and other managed services.')}</InfoTip></h3>
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor="managed-app-base-port">{t('app.siteSettingsTab.basePort', 'Base port')}</Label>
|
||||
<Label htmlFor="managed-app-base-port">{t('app.siteSettingsTab.basePort', 'Base port')}</Label><InfoTip>{t('app.siteSettingsTab.newAppsGetTheFirstFree', 'New services get the first free port at or above this number. Set to')} <strong>0</strong> {t('app.siteSettingsTab.toUseEachTemplateSOwn', 'to use each template\'s own default (WordPress starts at 8300). Ports already in use are always skipped, so collisions can\'t happen.')}</InfoTip>
|
||||
</div>
|
||||
<div className="settings-control">
|
||||
<Input
|
||||
@@ -439,15 +431,11 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">
|
||||
{t('app.siteSettingsTab.newAppsGetTheFirstFree', 'New services get the first free port at or above this number. Set to')} <strong>0</strong> {t('app.siteSettingsTab.toUseEachTemplateSOwn', 'to use each template\'s own default (WordPress starts at 8300). Ports already in use are always skipped, so collisions can\'t happen.')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div {...register('site-base-domains', 'settings-card')}>
|
||||
<h3>{t('app.siteSettingsTab.managedSitesBaseDomains', 'Managed services: base domains')}</h3>
|
||||
<p>{t('app.siteSettingsTab.publishManagedSitesAt', 'Publish managed services at')} <code><name>.<base-domain></code>. {t('app.siteSettingsTab.registerBaseDomains', 'Register one or more base domains; a new service can be created under any of them, defaulting to the one marked')} <strong>{t('common.labels.default', 'Default')}</strong>. {t('app.siteSettingsTab.pointAWildcardRecord', 'Point a wildcard record')} <code>*.<base></code> {t('app.siteSettingsTab.orPerSiteARecordsAt', '(or per-service A records) at this server.')}</p>
|
||||
<h3>{t('app.siteSettingsTab.managedSitesBaseDomains', 'Managed services: base domains')} <InfoTip>{t('app.siteSettingsTab.publishManagedSitesAt', 'Publish managed services at')} <code><name>.<base-domain></code>. {t('app.siteSettingsTab.registerBaseDomains', 'Register one or more base domains; a new service can be created under any of them, defaulting to the one marked')} <strong>{t('common.labels.default', 'Default')}</strong>. {t('app.siteSettingsTab.pointAWildcardRecord', 'Point a wildcard record')} <code>*.<base></code> {t('app.siteSettingsTab.orPerSiteARecordsAt', '(or per-service A records) at this server.')}</InfoTip></h3>
|
||||
|
||||
{httpsError ? (
|
||||
<ErrorState
|
||||
@@ -460,7 +448,7 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor="sites-server-ip">{t('app.siteSettingsTab.serverPublicIp', 'Server public IP')}</Label>
|
||||
<Label htmlFor="sites-server-ip">{t('app.siteSettingsTab.serverPublicIp', 'Server public IP')}</Label><InfoTip>{t('app.siteSettingsTab.sharedByEveryBaseDomainUsed', 'Shared by every base domain. Used to auto-create their DNS A records.')}</InfoTip>
|
||||
</div>
|
||||
<div className="settings-control">
|
||||
<Input
|
||||
@@ -475,13 +463,12 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">{t('app.siteSettingsTab.sharedByEveryBaseDomainUsed', 'Shared by every base domain. Used to auto-create their DNS A records.')}</span>
|
||||
</div>
|
||||
|
||||
{https.providers?.length > 0 ? (
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label"><Label htmlFor="sites-https-provider">{t('app.siteSettingsTab.dnsProviderForHttps', 'DNS provider for HTTPS')}</Label></div>
|
||||
<div className="settings-label"><Label htmlFor="sites-https-provider">{t('app.siteSettingsTab.dnsProviderForHttps', 'DNS provider for HTTPS')}</Label><InfoTip>{t('app.siteSettingsTab.usedToIssueEachBaseS', 'Used to issue each base\'s wildcard certificate (DNS-01). Each base can use a different connected provider.')}</InfoTip></div>
|
||||
<div className="settings-control">
|
||||
<Select value={providerId ? String(providerId) : undefined} onValueChange={setProviderId}>
|
||||
<SelectTrigger id="sites-https-provider" className="settings-select">
|
||||
@@ -495,7 +482,6 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">{t('app.siteSettingsTab.usedToIssueEachBaseS', 'Used to issue each base\'s wildcard certificate (DNS-01). Each base can use a different connected provider.')}</span>
|
||||
</div>
|
||||
) : (
|
||||
<span className="form-help">{t('app.siteSettingsTab.connectADnsProviderUnderEmail', 'Connect a DNS provider under Email → DNS providers to enable per-domain wildcard HTTPS.')}</span>
|
||||
@@ -524,6 +510,10 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
</Pill>
|
||||
</span>
|
||||
)}
|
||||
<InfoTip>{t('app.siteSettingsTab.sitesPublishAt', 'Services publish at')} <code><name>.{b.domain || 'base-domain'}</code>.{' '}
|
||||
{(b.dns_mode || 'wildcard') === 'wildcard'
|
||||
? <>{t('app.siteSettingsTab.point', 'Point')} <code>*.{b.domain || 'base-domain'}</code> {t('app.siteSettingsTab.atThisServer', 'at this server.')}</>
|
||||
: <>{t('app.siteSettingsTab.eachNewSiteGetsItsOwn', 'Each new service gets its own A record, auto-created via the provider.')}</>}</InfoTip>
|
||||
</div>
|
||||
<div className="settings-control">
|
||||
<Select value={b.dns_mode || 'wildcard'}
|
||||
@@ -553,18 +543,12 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">
|
||||
{t('app.siteSettingsTab.sitesPublishAt', 'Services publish at')} <code><name>.{b.domain || 'base-domain'}</code>.{' '}
|
||||
{(b.dns_mode || 'wildcard') === 'wildcard'
|
||||
? <>{t('app.siteSettingsTab.point', 'Point')} <code>*.{b.domain || 'base-domain'}</code> {t('app.siteSettingsTab.atThisServer', 'at this server.')}</>
|
||||
: <>{t('app.siteSettingsTab.eachNewSiteGetsItsOwn', 'Each new service gets its own A record, auto-created via the provider.')}</>}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label"><Label htmlFor="new-base-domain">{t('app.siteSettingsTab.addBaseDomain', 'Add base domain')}</Label></div>
|
||||
<div className="settings-label"><Label htmlFor="new-base-domain">{t('app.siteSettingsTab.addBaseDomain', 'Add base domain')}</Label><InfoTip>{t('app.siteSettingsTab.registerAnotherDomainSitesCanBe', 'Register another domain services can be published under. Set up its wildcard HTTPS from its row above.')}</InfoTip></div>
|
||||
<div className="settings-control">
|
||||
<DomainField
|
||||
key={newDomainKey}
|
||||
@@ -587,20 +571,18 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<span className="form-help">{t('app.siteSettingsTab.registerAnotherDomainSitesCanBe', 'Register another domain services can be published under. Set up its wildcard HTTPS from its row above.')}</span>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div {...register('site-dev-mode', 'settings-card')}>
|
||||
<h3>{t('app.siteSettingsTab.developerMode', 'Developer mode')}</h3>
|
||||
<p>{t('app.siteSettingsTab.enableDeveloperToolsAndDiagnostics', 'Enable developer tools and diagnostics.')}</p>
|
||||
<h3>{t('app.siteSettingsTab.developerMode', 'Developer mode')} <InfoTip>{t('app.siteSettingsTab.enableDeveloperToolsAndDiagnostics', 'Enable developer tools and diagnostics.')}</InfoTip></h3>
|
||||
|
||||
<div className="form-group">
|
||||
<div className="settings-row">
|
||||
<div className="settings-label">
|
||||
<Label htmlFor={`${fieldId}-dev-mode`}>{t('app.siteSettingsTab.enableDeveloperMode', 'Enable developer mode')}</Label>
|
||||
<Label htmlFor={`${fieldId}-dev-mode`}>{t('app.siteSettingsTab.enableDeveloperMode', 'Enable developer mode')}</Label><InfoTip>{t('app.siteSettingsTab.enablesTheDeveloperTabWithIcon', 'Enables the Developer tab with icon reference and diagnostic tools.')}</InfoTip>
|
||||
</div>
|
||||
<Switch
|
||||
id={`${fieldId}-dev-mode`}
|
||||
@@ -609,9 +591,6 @@ const SiteSettingsTab = ({ onDevModeChange }) => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</div>
|
||||
<span className="form-help">
|
||||
{t('app.siteSettingsTab.enablesTheDeveloperTabWithIcon', 'Enables the Developer tab with icon reference and diagnostic tools.')}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import { DEFAULT_THEME_SLUG } from '../../data/bundledThemes';
|
||||
import api from '../../services/api';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button as SharedButton } from '@/components/ui/button';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
|
||||
// Theme Gallery — cards for every selectable skin (bundled seeds + installed).
|
||||
@@ -87,10 +88,13 @@ const ThemeGallery = () => {
|
||||
<div className="theme-card__meta">
|
||||
<span className="theme-card__name">{themeEntry.name || themeEntry.slug}</span>
|
||||
{themeEntry.base && <span className="theme-card__base">{themeEntry.base}</span>}
|
||||
{themeEntry.description && (
|
||||
// keydown must not reach the card's select-on-Enter handler
|
||||
<span onKeyDown={(e) => e.stopPropagation()}>
|
||||
<InfoTip>{themeEntry.description}</InfoTip>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{themeEntry.description && (
|
||||
<p className="theme-card__desc">{themeEntry.description}</p>
|
||||
)}
|
||||
<div className="theme-card__footer">
|
||||
{active && (
|
||||
<span className="theme-card__applied">
|
||||
|
||||
@@ -18,11 +18,11 @@ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (
|
||||
));
|
||||
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
||||
|
||||
const SheetContent = React.forwardRef(({ side = 'right', className, children, ...props }, ref) => {
|
||||
const SheetContent = React.forwardRef(({ side = 'right', className, overlayClassName, children, ...props }, ref) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<SheetPortal>
|
||||
<SheetOverlay />
|
||||
<SheetOverlay className={overlayClassName} />
|
||||
<SheetPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn('ui-sheet-content', `ui-sheet-content--${side}`, className)}
|
||||
|
||||
@@ -758,6 +758,7 @@
|
||||
"runABackupOrEnableA": "Run a backup or enable a schedule to start building an archive.",
|
||||
"runsLast30Days_one": "1 run · last 30 days",
|
||||
"runsLast30Days_other": "{{count}} runs · last 30 days",
|
||||
"singleDisk": "Single disk",
|
||||
"snapshot": "Backup",
|
||||
"storageDestinations": "Storage destinations",
|
||||
"storageUsed": "Storage used",
|
||||
@@ -2336,6 +2337,7 @@
|
||||
"registerTheAgent": "Register the agent",
|
||||
"releaseNotes": "Release notes",
|
||||
"released": "Released",
|
||||
"replaceTokenHint": "Replace",
|
||||
"runPowershellAsAdministrator": "Run PowerShell as administrator",
|
||||
"runTheRegistrationCommandWithYour": "Run the registration command with your token:",
|
||||
"serverkitAgentStart": "serverkit-agent start",
|
||||
@@ -3249,6 +3251,7 @@
|
||||
"importFailedToStart": "Couldn't start the import. {{message}}",
|
||||
"importRun": "Import run",
|
||||
"importRunFailed": "Couldn't finish the import.",
|
||||
"liveSite": "Live site",
|
||||
"mailAccounts": "Mail accounts",
|
||||
"mailAccountsSkipped_one": "1 mail account in the backup won't be imported. The mail extension handles mail.",
|
||||
"mailAccountsSkipped_other": "{{count}} mail accounts in the backup won't be imported. The mail extension handles mail.",
|
||||
@@ -3329,11 +3332,13 @@
|
||||
"change": "Change",
|
||||
"checkNow": "Check now",
|
||||
"couldntLoadIntegrity": "Couldn't load file integrity status.",
|
||||
"headerLine": "Detect changed config files",
|
||||
"hideChanges": "Hide changes",
|
||||
"lastCheck": "Last check {{age}}",
|
||||
"nginxConfiguration": "Nginx configuration",
|
||||
"noApplicationsFound": "No services found.",
|
||||
"noBaseline": "no baseline",
|
||||
"noBaselineChip": "No baseline",
|
||||
"noBaselineYet": "No baseline yet. Create one to start tracking changes.",
|
||||
"noDocroot": "no docroot",
|
||||
"notPresent": "not present",
|
||||
@@ -3341,6 +3346,12 @@
|
||||
"path": "Path",
|
||||
"serverkitUnitsInEtcSystemdSystem": "serverkit-* units in /etc/systemd/system",
|
||||
"sitesEnabledConfD": "sites-enabled + conf.d",
|
||||
"stepBaseline": "Baseline",
|
||||
"stepBaselineInfo": "Snapshot the current files of a scope.",
|
||||
"stepDiff": "Diff",
|
||||
"stepDiffInfo": "Added, removed or modified files are flagged and admins are notified. Accepting re-baselines.",
|
||||
"stepWatch": "Watch",
|
||||
"stepWatchInfo": "Check manually or let the scheduled sweep run.",
|
||||
"systemdUnits": "Systemd units",
|
||||
"unknownAge": "unknown age",
|
||||
"viewChanges": "View changes",
|
||||
@@ -3452,6 +3463,9 @@
|
||||
"panelUnlinked": "Panel unlinked",
|
||||
"registrationToken": "Registration token *",
|
||||
"remoteServer": "Remote server",
|
||||
"stepLinked": "Linked",
|
||||
"stepMasterToken": "Master token",
|
||||
"stepPasteHere": "Paste here",
|
||||
"thisServerWillStopBeingManageable": "This server will stop being manageable by {{value}}. The link credentials are removed from this panel.",
|
||||
"tokenGeneratedOnTheMaster": "Token generated on the master",
|
||||
"unlink": "Unlink",
|
||||
@@ -4296,12 +4310,13 @@
|
||||
"loadingMetrics": "Loading metrics…",
|
||||
"malware": "Malware",
|
||||
"marketplaceLink": "Extensions",
|
||||
"moreSecurityTools": "More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the",
|
||||
"moreSecurityTools": "More security tools (malware scanning, brute-force protection, vulnerability scans, auto-updates) are available as extensions in the Extensions marketplace.",
|
||||
"networkIO": "Network I/O",
|
||||
"noDeploymentsYetDeployYourService": "No deployments yet. Deploy your service to see history here.",
|
||||
"noIntegrityChanges24h": "No integrity changes (24h)",
|
||||
"noMetricsForType": "No metrics available for this service type.",
|
||||
"noRelatedResourcesYet": "No related resources yet.",
|
||||
"notificationsLink": "Notifications",
|
||||
"open": "Open {{portUrl}}",
|
||||
"processes": "Processes",
|
||||
"reCheck": "Re-check",
|
||||
@@ -4611,6 +4626,10 @@
|
||||
"sourceCode": "Source code",
|
||||
"storageBackups": "Storage and backups"
|
||||
},
|
||||
"proxyLogoTiles": {
|
||||
"dockerStack": "Docker stack",
|
||||
"hostDefault": "Host default"
|
||||
},
|
||||
"proxyStackPanel": {
|
||||
"allServicesAligned_one": "The 1 service is aligned with this server's ingress plane.",
|
||||
"allServicesAligned_other": "All {{count}} services are aligned with this server's ingress plane.",
|
||||
@@ -5554,6 +5573,7 @@
|
||||
},
|
||||
"serverSettingsTab": {
|
||||
"activeExpires": "Active, expires",
|
||||
"allowedIps": "Allowed IPs only.",
|
||||
"apiKeyRotation": "API key rotation",
|
||||
"basicInformation": "Basic information",
|
||||
"connectedSince": "Connected since",
|
||||
@@ -5591,10 +5611,12 @@
|
||||
"noGroup": "No group",
|
||||
"noIpRestrictionsAllIpsAllowed": "No IP restrictions (all IPs allowed)",
|
||||
"onlineRegenerateNote": "This server is online now; a new string only affects re-pairing.",
|
||||
"pairOrRepair": "Pair or re-pair this server.",
|
||||
"previousTokenExpired": "The previous token has expired.",
|
||||
"removeServer": "Remove server",
|
||||
"removingThisServerWillDisconnectThe": "Removing this server will disconnect the agent and delete all associated data.",
|
||||
"restrictWhichIpsCanConnectSupports": "Restrict which IPs can connect. Supports single IPs, CIDR notation, and wildcards.",
|
||||
"rotateAgentCredentials": "Rotate agent credentials.",
|
||||
"rotateApiCredentialsTheAgentMust": "Rotate API credentials? The agent must be online to receive new credentials.",
|
||||
"rotateApiKey": "Rotate API key",
|
||||
"rotateCredentials": "Rotate credentials",
|
||||
@@ -5749,6 +5771,12 @@
|
||||
"setGroupForSelectedServers": "Set group for selected servers",
|
||||
"shownOnTheAgentSPairing": "Shown on the agent's pairing screen",
|
||||
"singleUseBurnedTheMomentAn": "Single-use. Burned the moment an agent registers with it.",
|
||||
"stepEnterBoth": "Enter both",
|
||||
"stepGenerate": "Generate string",
|
||||
"stepPasteInAgent": "Paste in agent",
|
||||
"stepReadCode": "Read code",
|
||||
"stepServerOnline": "Server online",
|
||||
"stepStartAgent": "Start agent",
|
||||
"sync": "Sync",
|
||||
"theAgentRegistersAutomaticallyAndReports": "The agent registers automatically and reports its hostname back as the server name.",
|
||||
"theCodeIsShownInThe": "The code is shown in the terminal output or system tray.",
|
||||
@@ -8385,6 +8413,7 @@
|
||||
},
|
||||
"loading": "Loading…",
|
||||
"more": "More",
|
||||
"moreInfo": "More info",
|
||||
"moreSections": "More sections",
|
||||
"page": "Page",
|
||||
"retry": "Retry",
|
||||
|
||||
@@ -3,6 +3,7 @@ import api from '../services/api';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import CopyField from '../components/CopyField';
|
||||
import InfoTip from '../components/InfoTip';
|
||||
import { scrollBehavior } from '@/utils/reducedMotion';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { formatDate } from '@/utils/intl';
|
||||
@@ -181,10 +182,8 @@ function Downloads() {
|
||||
</div>
|
||||
|
||||
<section className="downloads-section">
|
||||
<h2>{t('app.downloads.directDownloads', 'Direct downloads')}</h2>
|
||||
<p className="section-description">
|
||||
{t('app.downloads.downloadTheAgentBinaryForYour', 'Download the agent binary for your platform. After downloading, follow the installation instructions below.')}
|
||||
</p>
|
||||
<h2>{t('app.downloads.directDownloads', 'Direct downloads')}
|
||||
<InfoTip>{t('app.downloads.downloadTheAgentBinaryForYour', 'Download the agent binary for your platform. After downloading, follow the installation instructions below.')}</InfoTip></h2>
|
||||
|
||||
<div className="download-cards">
|
||||
{platforms.map((platform) => {
|
||||
@@ -219,10 +218,9 @@ function Downloads() {
|
||||
</section>
|
||||
|
||||
<section className="downloads-section">
|
||||
<h2>{t('app.downloads.quickInstallCommands', 'Quick install commands')}</h2>
|
||||
<p className="section-description">
|
||||
{t('app.downloads.useTheseOneLinerCommandsTo', 'Use these one-liner commands to download and install the agent. Replace')} <code>YOUR_TOKEN</code> {t('app.downloads.withTheServerRegistrationToken', 'with the server registration token.')}
|
||||
</p>
|
||||
<h2>{t('app.downloads.quickInstallCommands', 'Quick install commands')}
|
||||
<InfoTip>{t('app.downloads.useTheseOneLinerCommandsTo', 'Use these one-liner commands to download and install the agent. Replace')} <code>YOUR_TOKEN</code> {t('app.downloads.withTheServerRegistrationToken', 'with the server registration token.')}</InfoTip></h2>
|
||||
<p className="section-description">{t('app.downloads.replaceTokenHint', 'Replace')} <code>YOUR_TOKEN</code></p>
|
||||
|
||||
<div className="install-commands">
|
||||
<div className="command-block">
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import EmptyState from '../components/EmptyState';
|
||||
import InfoTip from '../components/InfoTip';
|
||||
import ProxyLogoTiles from '../components/proxy/ProxyLogoTiles';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { t } from '../i18n/t';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
@@ -412,7 +414,8 @@ const FleetProxy = () => {
|
||||
<EmptyState
|
||||
icon={Network}
|
||||
title={t('app.fleetProxy.noServersInTheFleet', 'No servers in the fleet')}
|
||||
description={t('app.fleetProxy.thisIsWhereEachServerS', 'This is where each server\'s reverse-proxy posture lands: which proxy it runs, whether it\'s healthy, and when its config was last regenerated. Host Nginx is the default; a server can opt into a managed Traefik or Caddy stack from its Proxy tab. Add a server to start.')}
|
||||
description={<InfoTip>{t('app.fleetProxy.thisIsWhereEachServerS', 'This is where each server\'s reverse-proxy posture lands: which proxy it runs, whether it\'s healthy, and when its config was last regenerated. Host Nginx is the default; a server can opt into a managed Traefik or Caddy stack from its Proxy tab. Add a server to start.')}</InfoTip>}
|
||||
action={<ProxyLogoTiles />}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -3,9 +3,11 @@ import { useState, useEffect, useCallback, useRef } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import {
|
||||
ArrowDownToLine, ArrowLeft, ArrowRight, CheckCircle2, ChevronRight, Clock,
|
||||
Database, Globe, Link2, Package, RotateCcw, Server, Trash2, AlertTriangle,
|
||||
Database, Globe, Link2, Package, RotateCcw, Trash2, AlertTriangle,
|
||||
Upload, Users,
|
||||
} from 'lucide-react';
|
||||
import { SiCpanel, SiWordpress } from 'react-icons/si';
|
||||
import InfoTip from '../components/InfoTip';
|
||||
import api from '../services/api';
|
||||
import HtaccessConverter from '../components/apps/HtaccessConverter';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -26,17 +28,17 @@ const POLL_MS = 2000;
|
||||
|
||||
const SOURCE_TYPES = [
|
||||
{
|
||||
id: 'cpanel',
|
||||
id: 'cpanel', Logo: SiCpanel, format: 'cpmove .tar.gz',
|
||||
name: 'cPanel full backup',
|
||||
descriptionKey: 'app.importWizard.aCpmoveBackupTarGzArchive', description: 'A cpmove / backup-*.tar.gz archive from cPanel\'s Full Account Backup.',
|
||||
},
|
||||
{
|
||||
id: 'directadmin',
|
||||
id: 'directadmin', format: 'backup .tar.gz',
|
||||
name: 'DirectAdmin',
|
||||
descriptionKey: 'app.importWizard.aUserBackupArchiveCreatedBy', description: 'A user backup archive created by DirectAdmin\'s Create/Restore Backups.',
|
||||
},
|
||||
{
|
||||
id: 'hestia',
|
||||
id: 'hestia', format: 'v-backup .tar',
|
||||
name: 'Hestia',
|
||||
descriptionKey: 'app.importWizard.aVBackupUserArchiveFrom', description: 'A v-backup-user archive from HestiaCP (also fits VestaCP layouts).',
|
||||
},
|
||||
@@ -431,24 +433,29 @@ function ImportWizard() {
|
||||
<h2>{t('app.importWizard.whereIsTheSiteComingFrom', 'Where is the site coming from?')}</h2>
|
||||
<div className="import-wizard__sources">
|
||||
{SOURCE_TYPES.map((s) => (
|
||||
<Button variant="unstyled"
|
||||
key={s.id}
|
||||
type="button"
|
||||
className="import-wizard__source-card"
|
||||
onClick={() => pickSource(s.id)}
|
||||
>
|
||||
<span className="import-wizard__source-ico"><Package size={18} aria-hidden="true" /></span>
|
||||
<strong>{s.name}</strong>
|
||||
<p>{s.description}</p>
|
||||
<ChevronRight size={16} className="import-wizard__source-chev" aria-hidden="true" />
|
||||
</Button>
|
||||
<div key={s.id} className="import-wizard__source">
|
||||
<Button variant="unstyled"
|
||||
type="button"
|
||||
className="import-wizard__source-card"
|
||||
onClick={() => pickSource(s.id)}
|
||||
>
|
||||
<span className="import-wizard__source-ico">{s.Logo ? <s.Logo size={18} aria-hidden="true" /> : <Package size={18} aria-hidden="true" />}</span>
|
||||
<strong>{s.name}</strong>
|
||||
<span className="tip-chip">{s.format}</span>
|
||||
<ChevronRight size={16} className="import-wizard__source-chev" aria-hidden="true" />
|
||||
</Button>
|
||||
<InfoTip className="import-wizard__source-tip" title={s.name}>{s.description}</InfoTip>
|
||||
</div>
|
||||
))}
|
||||
<Link to="/wordpress/ssh-import" className="import-wizard__source-card import-wizard__source-card--link">
|
||||
<span className="import-wizard__source-ico"><Server size={18} aria-hidden="true" /></span>
|
||||
<strong>{t('app.importWizard.wordpressOverSsh', 'WordPress over SSH')}</strong>
|
||||
<p>{t('app.importWizard.pullALiveWordpressSiteStraight', 'Pull a live WordPress site straight from its current server. Opens the WordPress import surface.')}</p>
|
||||
<ChevronRight size={16} className="import-wizard__source-chev" aria-hidden="true" />
|
||||
</Link>
|
||||
<div className="import-wizard__source">
|
||||
<Link to="/wordpress/ssh-import" className="import-wizard__source-card import-wizard__source-card--link">
|
||||
<span className="import-wizard__source-ico"><SiWordpress size={18} aria-hidden="true" /></span>
|
||||
<strong>{t('app.importWizard.wordpressOverSsh', 'WordPress over SSH')}</strong>
|
||||
<span className="tip-chip">{t('app.importWizard.liveSite', 'Live site')}</span>
|
||||
<ChevronRight size={16} className="import-wizard__source-chev" aria-hidden="true" />
|
||||
</Link>
|
||||
<InfoTip className="import-wizard__source-tip" title={t('app.importWizard.wordpressOverSsh', 'WordPress over SSH')}>{t('app.importWizard.pullALiveWordpressSiteStraight', 'Pull a live WordPress site straight from its current server. Opens the WordPress import surface.')}</InfoTip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { useState, useEffect, useCallback, useMemo, useId } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Ban, ChevronRight, Container, Cpu, Database, Flame, Folder, HardDrive, Info, Lock, MemoryStick, Plus, RefreshCw, Server as ServerLucideIcon, Terminal, X } from 'lucide-react';
|
||||
import { Ban, ChevronRight, ClipboardPaste, Container, Cpu, Database, Flame, Folder, Hash, HardDrive, Info, KeyRound, Lock, MemoryStick, Plus, RefreshCw, Server as ServerLucideIcon, Terminal, X } from 'lucide-react';
|
||||
import InfoTip from '../components/InfoTip';
|
||||
import IconStepStrip from '../components/IconStepStrip';
|
||||
import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip';
|
||||
import LevelIllustration from '../components/servers/LevelIllustrations';
|
||||
import api from '../services/api';
|
||||
@@ -684,11 +686,11 @@ const PairAgentForm = ({ groups, onClose, onClaimed }) => {
|
||||
return (
|
||||
<form className="server-setup-form" onSubmit={handleClaim}>
|
||||
<div className="server-setup-form__body">
|
||||
<div className="pair-instructions">
|
||||
<p>
|
||||
{t('app.servers.onTheTargetMachineStartThe', 'On the target server, start the agent. It will display a 6-character pair code and a passphrase. Enter both below.')}
|
||||
</p>
|
||||
</div>
|
||||
<IconStepStrip steps={[
|
||||
{ icon: <Terminal />, label: t('app.servers.stepStartAgent', 'Start agent'), info: t('app.servers.onTheTargetMachineStartThe', 'On the target server, start the agent. It will display a 6-character pair code and a passphrase. Enter both below.') },
|
||||
{ icon: <Hash />, label: t('app.servers.stepReadCode', 'Read code'), info: t('app.servers.theCodeIsShownInThe', 'The code is shown in the terminal output or system tray.') },
|
||||
{ icon: <KeyRound />, label: t('app.servers.stepEnterBoth', 'Enter both') },
|
||||
]} />
|
||||
|
||||
<div className="form-group">
|
||||
<label htmlFor={`${fieldId}-code`}>{t('app.servers.pairCode', 'Pair code')}</label>
|
||||
@@ -708,7 +710,6 @@ const PairAgentForm = ({ groups, onClose, onClaimed }) => {
|
||||
className="server-pair-code"
|
||||
required
|
||||
/>
|
||||
<span className="form-hint">{t('app.servers.theCodeIsShownInThe', 'The code is shown in the terminal output or system tray.')}</span>
|
||||
{lookupError && <div className="error-message server-pair-error">{lookupError}</div>}
|
||||
</div>
|
||||
|
||||
@@ -1031,9 +1032,11 @@ const AddServerModal = ({ groups, onClose, onCreated }) => {
|
||||
<div className="server-setup-form__body">
|
||||
{error && <div className="error-message">{error}</div>}
|
||||
|
||||
<p className="section-description">
|
||||
{t('app.servers.generateASingleConnectionStringPaste', "Generate a single connection string. Paste it into the agent's pairing wizard, or use it with the one-liner installer. The agent's hostname becomes the server name on first connect; you can rename it later from the server's Settings tab.")}
|
||||
</p>
|
||||
<IconStepStrip steps={[
|
||||
{ icon: <KeyRound />, label: t('app.servers.stepGenerate', 'Generate string'), info: t('app.servers.generateASingleConnectionStringPaste', "Generate a single connection string. Paste it into the agent's pairing wizard, or use it with the one-liner installer. The agent's hostname becomes the server name on first connect; you can rename it later from the server's Settings tab.") },
|
||||
{ icon: <ClipboardPaste />, label: t('app.servers.stepPasteInAgent', 'Paste in agent') },
|
||||
{ icon: <ServerLucideIcon />, label: t('app.servers.stepServerOnline', 'Server online') },
|
||||
]} />
|
||||
|
||||
<LevelPicker value={level} onChange={setLevel} />
|
||||
|
||||
@@ -1121,15 +1124,12 @@ const AddServerModal = ({ groups, onClose, onCreated }) => {
|
||||
</details>
|
||||
|
||||
<div className="install-info">
|
||||
<h4>{t('app.servers.whatHappensNext', 'What happens next?')}</h4>
|
||||
<h4>{t('app.servers.whatHappensNext', 'What happens next?')} <InfoTip>{t('app.servers.theTokenIsSingleUseIf', 'The token is single-use. If you reinstall the agent later, generate a new connection string from the server\'s Settings tab.')}</InfoTip></h4>
|
||||
<ol>
|
||||
<li>{t('app.servers.openTheAgentOnYourTarget', 'Open the agent on your target server and paste the connection string.')}</li>
|
||||
<li>{t('app.servers.theAgentRegistersAutomaticallyAndReports', 'The agent registers automatically and reports its hostname back as the server name.')}</li>
|
||||
<li>{t('app.servers.theRowInThisListWill', 'The row in this list will switch from')} <strong>{t('app.servers.pending', 'Pending')}</strong> to <strong>{t('app.servers.online', 'Online')}</strong>.</li>
|
||||
</ol>
|
||||
<p className="text-muted">
|
||||
{t('app.servers.theTokenIsSingleUseIf', 'The token is single-use. If you reinstall the agent later, generate a new connection string from the server\'s Settings tab.')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -598,7 +598,7 @@ const Templates = () => {
|
||||
tag={isRepo ? t('app.templates.gitRepo', 'Git repo') : t('app.templates.oneClick', 'One-click')}
|
||||
featured={isFeatured(template)}
|
||||
description={template.description}
|
||||
facts={(template.categories || []).slice(0, 2).join(' · ')}
|
||||
chips={(template.categories || []).slice(0, 3)}
|
||||
onClick={deployManaged ? undefined : () => handleDeploy(template)}
|
||||
action={!deployManaged && (
|
||||
<Button variant="outline" size="sm" onClick={() => handleDeploy(template)}>
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
.card-header {
|
||||
@include flex-between();
|
||||
margin-bottom: $space-4;
|
||||
|
||||
// Narrow: the title shrinks first so a trailing chip stays on its row;
|
||||
// only a wide chip/action cluster wraps below.
|
||||
@include respond-to($breakpoint-sm) {
|
||||
flex-wrap: wrap;
|
||||
gap: $space-2;
|
||||
|
||||
> h3 { flex: 1 1 10rem; min-width: 0; }
|
||||
}
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
|
||||
@@ -67,6 +67,16 @@ display: grid;
|
||||
color: $danger;
|
||||
}
|
||||
|
||||
// Label + (i) tip share one row; the label's own bottom margin moves to the row.
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-1;
|
||||
margin-bottom: $space-2;
|
||||
|
||||
.form-field__label { margin-bottom: 0; }
|
||||
}
|
||||
|
||||
&__control {
|
||||
// Native controls and component controls share the same field contract.
|
||||
// Exclude checkboxes/radios and buttons: their intrinsic size matters.
|
||||
|
||||
@@ -0,0 +1,334 @@
|
||||
// "Less text" building blocks: <InfoTip>, <IconStepStrip>, <SectionIntro>,
|
||||
// plus the small chip / tile / illustration helpers the pages share.
|
||||
|
||||
.info-tip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: none;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: $text-muted;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
|
||||
&:hover,
|
||||
&[data-state='open'] { color: $accent-primary; }
|
||||
|
||||
&--sm { width: 18px; height: 18px; svg { width: 14px; height: 14px; } } // geometry: inline icon button
|
||||
&--md { width: 24px; height: 24px; svg { width: 16px; height: 16px; } } // geometry: inline icon button
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid $accent-primary;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
// Above Sheet (1150) and Modal; same layer as .ui-tooltip.
|
||||
.ui-popover-panel.info-tip__panel {
|
||||
z-index: $z-tooltip + 10;
|
||||
width: auto;
|
||||
max-width: min(320px, calc(100vw - 24px));
|
||||
max-height: var(--radix-popover-content-available-height, 60vh);
|
||||
overflow-y: auto;
|
||||
padding: $space-2 $space-3;
|
||||
font-size: $text-sm;
|
||||
font-weight: $font-weight-normal;
|
||||
line-height: 1.5;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
|
||||
p { margin: 0; }
|
||||
p + p { margin-top: $space-2; }
|
||||
code { font-family: $font-mono; font-size: $text-xs; }
|
||||
}
|
||||
|
||||
// Narrow screens: the tip is a bottom sheet with a grab handle, above any
|
||||
// open Modal/Sheet, clear of the home indicator.
|
||||
.ui-sheet-overlay.info-tip__overlay {
|
||||
z-index: $z-tooltip + 9;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
backdrop-filter: none;
|
||||
}
|
||||
|
||||
.ui-sheet-content.info-tip__sheet {
|
||||
z-index: $z-tooltip + 10;
|
||||
gap: $space-2;
|
||||
max-height: 70vh;
|
||||
padding: $space-6 $space-5 calc(#{$space-5} + env(safe-area-inset-bottom));
|
||||
border-radius: $radius-overlay $radius-overlay 0 0;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset-block-start: $space-2;
|
||||
inset-inline-start: 50%;
|
||||
width: 36px; // geometry: grab handle
|
||||
height: 4px; // geometry: grab handle
|
||||
border-radius: $radius-full;
|
||||
background: $border-default;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.info-tip__sheet-title {
|
||||
margin: 0;
|
||||
padding-inline-end: $space-8;
|
||||
color: $text-primary;
|
||||
font-size: $text-base;
|
||||
font-weight: $font-weight-semibold;
|
||||
}
|
||||
|
||||
.info-tip__sheet-body {
|
||||
color: $text-secondary;
|
||||
font-size: $text-base;
|
||||
line-height: 1.55;
|
||||
|
||||
p { margin: 0; }
|
||||
p + p { margin-top: $space-2; }
|
||||
code { font-family: $font-mono; font-size: $text-sm; }
|
||||
}
|
||||
|
||||
.section-intro {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-1;
|
||||
margin: 0;
|
||||
color: $text-secondary;
|
||||
font-size: $text-sm;
|
||||
|
||||
// Compact card: icon tile + title + (i), steps inline on the right.
|
||||
&--banner {
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: $space-3 $space-6;
|
||||
padding: $space-3 $space-4;
|
||||
background: $bg-card;
|
||||
border: 1px solid $border-subtle;
|
||||
border-radius: $radius-card;
|
||||
}
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-2;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: none;
|
||||
width: $control-md;
|
||||
height: $control-md;
|
||||
border-radius: $radius-control;
|
||||
@include status-variant($accent-primary, $accent-bg);
|
||||
|
||||
svg { width: 18px; height: 18px; } // geometry: icon in tile
|
||||
}
|
||||
|
||||
&__title {
|
||||
min-width: 0;
|
||||
color: $text-primary;
|
||||
font-size: $text-base;
|
||||
font-weight: $font-weight-semibold;
|
||||
}
|
||||
|
||||
@include respond-to($breakpoint-sm) {
|
||||
&--banner {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
padding: $space-4;
|
||||
}
|
||||
|
||||
&__title { flex: 1; }
|
||||
}
|
||||
}
|
||||
|
||||
// Equal-width step pills joined by thin chevrons that sit in the gaps.
|
||||
.icon-step-strip {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
grid-auto-columns: 1fr; // equal pills, but never narrower than a label
|
||||
gap: $space-5;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
|
||||
&__step {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__arrow {
|
||||
position: absolute;
|
||||
inset-block-start: 50%;
|
||||
inset-inline-start: -16px; // geometry: centres 12px chevron in the 20px gap
|
||||
width: 12px; // geometry: connector icon
|
||||
height: 12px; // geometry: connector icon
|
||||
color: $text-muted;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
&__pill {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: $space-2;
|
||||
min-width: 0;
|
||||
min-height: $control-md;
|
||||
margin: 0;
|
||||
padding: $space-1 $space-2;
|
||||
border: 1px solid $border-default;
|
||||
border-radius: $radius-control;
|
||||
background: $bg-secondary;
|
||||
color: $text-primary;
|
||||
font: inherit;
|
||||
text-align: center;
|
||||
|
||||
&--info {
|
||||
cursor: pointer;
|
||||
@include transition(border-color);
|
||||
|
||||
&:hover,
|
||||
&[data-state='open'] { border-color: $accent-primary; }
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid $accent-primary;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__icon {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
color: $accent-primary;
|
||||
|
||||
svg { width: 16px; height: 16px; } // geometry: icon in pill
|
||||
}
|
||||
|
||||
&__label {
|
||||
min-width: 0;
|
||||
font-size: $text-sm;
|
||||
font-weight: $font-weight-medium;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
// Touch hint only; on desktop hover + the accent border say "more here".
|
||||
&__more {
|
||||
display: none;
|
||||
width: 12px; // geometry: info hint glyph
|
||||
height: 12px; // geometry: info hint glyph
|
||||
color: $text-muted;
|
||||
}
|
||||
|
||||
// Narrow: icon over a wrapping label, the (i) hint tucked in the corner.
|
||||
@include respond-to($breakpoint-sm) {
|
||||
gap: $space-4;
|
||||
|
||||
&__arrow { inset-inline-start: -14px; } // geometry: centres chevron in the 16px gap
|
||||
|
||||
&__pill {
|
||||
flex-direction: column;
|
||||
gap: $space-1;
|
||||
padding: $space-2 $space-1;
|
||||
}
|
||||
|
||||
&__label { font-size: $text-xs; }
|
||||
|
||||
&__more {
|
||||
display: block;
|
||||
position: absolute;
|
||||
inset-block-start: $space-1;
|
||||
inset-inline-end: $space-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Status / tag chip with a leading icon.
|
||||
.tip-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: $space-1;
|
||||
padding: 2px $space-2; // geometry: chip
|
||||
border-radius: $radius-badge;
|
||||
background: $bg-secondary;
|
||||
color: $text-secondary;
|
||||
font-size: $text-xs;
|
||||
font-weight: $font-weight-medium;
|
||||
white-space: nowrap;
|
||||
|
||||
svg { width: 14px; height: 14px; } // geometry: chip icon
|
||||
|
||||
&--warning { color: $warning; }
|
||||
&--success { color: $success; }
|
||||
&--danger { color: $danger; }
|
||||
&--accent { color: $accent-primary; }
|
||||
}
|
||||
|
||||
.tip-chip-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: $space-1;
|
||||
}
|
||||
|
||||
// Row of logo/icon tiles with a caption under each.
|
||||
.logo-tile-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: $space-3;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
|
||||
&__item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: $space-1;
|
||||
color: $text-secondary;
|
||||
font-size: $text-xs;
|
||||
}
|
||||
|
||||
&__tile {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: $control-lg;
|
||||
height: $control-lg;
|
||||
border-radius: $radius-control;
|
||||
background: $bg-secondary;
|
||||
border: 1px solid $border-default;
|
||||
color: $text-primary;
|
||||
|
||||
svg { width: 20px; height: 20px; } // geometry: logo in tile
|
||||
}
|
||||
}
|
||||
|
||||
.tip-illustration {
|
||||
flex: none;
|
||||
width: 48px; // geometry: illustration
|
||||
height: 48px; // geometry: illustration
|
||||
color: $accent-primary;
|
||||
}
|
||||
|
||||
// Label + (i) tip on one row, for plain <label> markup outside FormField.
|
||||
.label-with-tip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-1;
|
||||
margin-bottom: $space-1;
|
||||
|
||||
> label { margin-bottom: 0; }
|
||||
}
|
||||
@@ -58,6 +58,7 @@
|
||||
@import 'components/_deploy';
|
||||
@import 'components/_git-connect';
|
||||
@import 'components/_docs-link';
|
||||
@import 'components/_info-tip';
|
||||
@import 'components/_build';
|
||||
@import 'components/_users';
|
||||
@import 'components/_linked-apps';
|
||||
|
||||
@@ -124,6 +124,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Wrapper so the (i) sits beside the card, never inside its button/link.
|
||||
&__source {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> .import-wizard__source-card { flex: 1; }
|
||||
}
|
||||
|
||||
&__source-tip {
|
||||
position: absolute;
|
||||
bottom: $space-3;
|
||||
right: $space-3;
|
||||
}
|
||||
|
||||
&__source-card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
@@ -156,7 +171,7 @@
|
||||
background: $bg-hover;
|
||||
}
|
||||
|
||||
&--link p::after {
|
||||
&--link strong::after {
|
||||
content: ' ↗';
|
||||
color: $text-tertiary;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
.security-page {
|
||||
// ── card chrome (all tabs) ──────────────────────────────
|
||||
.tab-content {
|
||||
.card {
|
||||
.card,
|
||||
.section-intro--banner {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
@@ -27,6 +28,17 @@
|
||||
font-weight: $font-weight-semibold;
|
||||
color: var(--text-faint);
|
||||
|
||||
// One line: the subtitle suffix gives way first (ellipsis).
|
||||
white-space: nowrap;
|
||||
|
||||
// Subtitle suffix gives way first: one line, ellipsis.
|
||||
.sec-count {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&.sec-listtitle--green { color: var(--green); }
|
||||
&.sec-listtitle--red { color: var(--red); }
|
||||
}
|
||||
|
||||
@@ -179,32 +179,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Brief instruction callout shown above the pair-code input
|
||||
.pair-instructions {
|
||||
display: flex;
|
||||
gap: $space-3;
|
||||
padding: $space-3 $space-4;
|
||||
background: rgba($accent-primary-raw, 0.07);
|
||||
border: 1px solid rgba($accent-primary-raw, 0.22);
|
||||
border-radius: $radius-control;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: $text-xs;
|
||||
color: $text-secondary;
|
||||
line-height: 1.5;
|
||||
|
||||
code {
|
||||
font-family: $font-mono;
|
||||
font-size: $text-xs;
|
||||
color: $accent-primary;
|
||||
background: rgba($accent-primary-raw, 0.12);
|
||||
padding: 1px $space-tight;
|
||||
border-radius: $radius-badge;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.server-setup-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1159,6 +1159,10 @@
|
||||
|
||||
.settings-label {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
column-gap: $space-1;
|
||||
|
||||
> span:first-child {
|
||||
display: block;
|
||||
@@ -1169,6 +1173,7 @@
|
||||
|
||||
.settings-hint {
|
||||
display: block;
|
||||
flex-basis: 100%;
|
||||
font-size: $text-xs;
|
||||
color: $text-tertiary;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user