Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/src/routes/dashboard-admin-backup-restore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ export default function DashboardAdminBackupRestore() {

if (!user.isAdmin) {
return (
<section className="grid gap-[18px] max-w-[960px] min-w-0">
<section className="dashboard-page max-w-[960px]">
<DashboardPageHeader eyebrow={t('dashboard.groups.admin')} title={t('dashboard.backupRestore.heading')} />
<AdminOnlyNotice />
</section>
);
}

return (
<section className="grid gap-[18px] max-w-[960px] min-w-0">
<section className="dashboard-page max-w-[960px]">
<DashboardPageHeader eyebrow={t('dashboard.groups.admin')} title={t('dashboard.backupRestore.heading')} />

<Panel className="!p-[22px_24px] grid gap-[16px]">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-admin-users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function DashboardAdminUsers({ loaderData }: Route.ComponentProps
};

return (
<div className="grid gap-[18px] min-w-0">
<div className="dashboard-page">
<DashboardPageHeader
actions={<>
<Tooltip content={t('dashboard.users.actions.refresh')} relationship="label">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-monitor-performance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default function DashboardMonitorPerformance({ loaderData }: Route.Compon
.filter(key => key !== 'userId' || view === 'all-by-user')
.map(key => ({ key, rows: overview.axes[key] }));

return <section className="grid gap-[18px] min-w-0">
return <section className="dashboard-page">
<DashboardPageHeader
actions={<>
<Tooltip content={t('dashboard.performance.actions.refresh')} relationship="label"><Button appearance="subtle" disabled={loading} icon={<ArrowClockwiseRegular />} onClick={() => void refresh()} /></Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-monitor-usage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default function DashboardMonitorUsage({ loaderData }: Route.ComponentPro
: t('dashboard.usage.charts.byKey');

return (
<section className="grid gap-[18px] min-w-0">
<section className="dashboard-page">
<DashboardPageHeader
actions={<>
<Tooltip
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/routes/dashboard-providers-model-aliases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function DashboardProvidersModelAliases({ loaderData }: Route.Com
}, [catalog]);

const header = <DashboardPageHeader description={t('dashboard.modelAliases.description')} eyebrow={t('dashboard.groups.providers')} title={t('dashboard.modelAliases.heading')} />;
if (!user.isAdmin) return <section className="grid gap-[18px] max-w-[960px]">{header}<AdminOnlyNotice /></section>;
if (!user.isAdmin) return <section className="dashboard-page max-w-[960px]">{header}<AdminOnlyNotice /></section>;

const openCreate = () => { setEditing(null); setDialogOpen(true); };
const openEdit = (alias: ModelAlias) => { setEditing(alias); setDialogOpen(true); };
Expand All @@ -89,7 +89,7 @@ export default function DashboardProvidersModelAliases({ loaderData }: Route.Com
setMutating(false);
};

return <section className="grid gap-[18px] max-w-[1120px] min-w-0">
return <section className="dashboard-page max-w-[1120px]">
{header}
{error && <MessageBar intent="error"><MessageBarBody>{t('dashboard.modelAliases.errors.message', { message: error })}</MessageBarBody></MessageBar>}
{modelsError && <MessageBar intent="warning"><MessageBarBody>{t('dashboard.modelAliases.errors.models', { message: modelsError })}</MessageBarBody></MessageBar>}
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/routes/dashboard-providers-proxy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ export default function DashboardProvidersProxy({ loaderData }: Route.ComponentP

if (!user.isAdmin) {
return (
<section className="grid gap-[18px] min-w-0">
<section className="dashboard-page">
<DashboardPageHeader description={t('dashboard.proxy.description')} eyebrow={t('dashboard.groups.providers')} title={t('dashboard.proxy.heading')} />
<AdminOnlyNotice />
</section>
);
}

return (
<section className="grid gap-[18px] min-w-0">
<section className="dashboard-page">
<DashboardPageHeader description={t('dashboard.proxy.description')} eyebrow={t('dashboard.groups.providers')} title={t('dashboard.proxy.heading')} />

{loadError && (
Expand All @@ -296,7 +296,7 @@ export default function DashboardProvidersProxy({ loaderData }: Route.ComponentP
<Button className="w-fit" onClick={() => void refreshProxies()}>{t('dashboard.proxy.actions.refresh')}</Button>
</Panel>
: <ProxyList proxies={proxies} onAdd={() => clearForm()} onDelete={setDeleteTarget} onEdit={handleEdit} onRefresh={() => void refreshProxies()} />}
<div className="grid gap-[18px] min-w-0">
<div className="dashboard-page">
{editingId !== null && <ProxyBackoffPanel
backoffs={backoffs}
onReset={() => void refreshProxies()}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/routes/dashboard-providers-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function DashboardProvidersSearch({ loaderData }: Route.Component

if (!user.isAdmin) {
return (
<section className="grid gap-[18px] max-w-[960px] min-w-0">
<section className="dashboard-page max-w-[960px]">
<DashboardPageHeader
description={t('dashboard.searchConfig.description')}
eyebrow={t('dashboard.groups.providers')}
Expand All @@ -246,7 +246,7 @@ export default function DashboardProvidersSearch({ loaderData }: Route.Component
}

return (
<section className="grid gap-[18px] max-w-[960px] min-w-0">
<section className="dashboard-page max-w-[960px]">
<DashboardPageHeader
description={t('dashboard.searchConfig.description')}
eyebrow={t('dashboard.groups.providers')}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-providers-upstreams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default function DashboardProvidersUpstreams({ loaderData }: Route.Compon
}

return (
<div className="grid gap-[18px] min-w-0">
<div className="dashboard-page">
<Toaster toasterId={toasterId} position="top-end" />

<DashboardPageHeader
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-services-api-docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function meta() {
export default function DashboardServicesApiDocs() {
const { t } = useTranslation();
return (
<section className="grid gap-[18px] max-w-[1200px] min-w-0">
<section className="dashboard-page max-w-[1200px]">
<DashboardPageHeader description={t('dashboard.pages.apiDocs')} eyebrow={t('dashboard.groups.services')} title={t('dashboard.nav.apiDocs')} />
<ApiDocsContent />
</section>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-services-api-keys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function DashboardServicesApiKeys({ loaderData }: Route.Component
};

return (
<div className="grid gap-[18px] min-w-0">
<div className="dashboard-page">
<Toaster toasterId={toasterId} position="top-end" />

<DashboardPageHeader
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/routes/dashboard-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default function DashboardSettings() {
};

return (
<section className="grid gap-[18px] max-w-[960px] min-w-0">
<section className="dashboard-page max-w-[960px]">
<DashboardPageHeader description={t('dashboard.settings.description')} eyebrow={t('dashboard.settings.eyebrow')} title={t('dashboard.nav.settings')} />

<Panel className="grid w-full max-w-[480px] gap-[18px] !p-[22px_24px] max-[680px]:!p-[18px]">
Expand Down
5 changes: 5 additions & 0 deletions apps/web/uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export default defineConfig({
},
},
shortcuts: {
// A route's own content region. `min-w-0` alone lets the region shrink but
// leaves its single column at `auto`, which grows to the widest child's
// min-content — one long message bar then pushes the whole page past the
// viewport. The explicit track floors that column at zero.
'dashboard-page': 'grid gap-[18px] min-w-0 grid-cols-[minmax(0,1fr)]',
'text-fui-fg1': 'text-[var(--colorNeutralForeground1)]',
'text-fui-fg2': 'text-[var(--colorNeutralForeground2)]',
'text-fui-fg3': 'text-[var(--colorNeutralForeground3)]',
Expand Down