From f384d1851d4665bf70519d8918d00d1f8763f15f Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 13:02:57 -0500 Subject: [PATCH] fix(frontend): recipes page gutter, intro banner, filter chip tokens and memory units --- frontend/src/pages/Recipes.jsx | 31 +++++++---- frontend/src/styles/pages/_recipes.scss | 71 ++++++++++++++----------- 2 files changed, 61 insertions(+), 41 deletions(-) diff --git a/frontend/src/pages/Recipes.jsx b/frontend/src/pages/Recipes.jsx index af5448b7..6a024433 100644 --- a/frontend/src/pages/Recipes.jsx +++ b/frontend/src/pages/Recipes.jsx @@ -9,6 +9,7 @@ import { import { Drawer } from '../components/ds'; import EmptyState from '../components/EmptyState'; +import SectionIntro from '../components/SectionIntro'; import FormField from '../components/FormField'; import { runRecipe, useRecipeCatalog } from '../hooks/useRecipeCatalog'; import { useToast } from '../contexts/useToast.js'; @@ -36,7 +37,8 @@ function RecipeIcon({ icon }) { return ; } -const GB = 1024 * 1024 * 1024; +const MB = 1024 * 1024; +const GB = 1024 * MB; function preflight(requirements, server) { if (!server || !requirements) return []; @@ -52,9 +54,9 @@ function preflight(requirements, server) { if (requirements.memoryMB) { rows.push({ key: 'mem', - need: formatBytes(requirements.memoryMB * GB, { decimals: 0 }), + need: formatBytes(requirements.memoryMB * MB, { decimals: 0 }), have: formatBytes(server.total_memory, { decimals: 0 }), - ok: !!server.total_memory && server.total_memory >= requirements.memoryMB * GB, + ok: !!server.total_memory && server.total_memory >= requirements.memoryMB * MB, }); } if (requirements.diskGB) { @@ -143,11 +145,21 @@ export default function Recipes() { }; return ( -
+
-

- {t('app.recipes.lede', 'Ready-to-go installers that run as real operations: probe, derive, apply, verify. Secrets are asked for mid-run and kept in the vault.')} -

+ } + info={t('app.recipes.lede', 'Ready-to-go installers that run as real operations: probe, derive, apply, verify. Secrets are asked for mid-run and kept in the vault.')} + steps={[ + { icon: , label: t('app.recipes.stepProbe', 'Probe'), info: t('app.recipes.stepProbeInfo', 'Check the target server meets the requirements.') }, + { icon: , label: t('app.recipes.stepApply', 'Apply'), info: t('app.recipes.stepApplyInfo', 'Derive settings and run the install as a real operation.') }, + { icon: , label: t('app.recipes.stepSecrets', 'Secrets'), info: t('app.recipes.stepSecretsInfo', 'Secrets are asked for mid-run and kept in the vault.') }, + { icon: , label: t('app.recipes.stepVerify', 'Verify'), info: t('app.recipes.stepVerifyInfo', 'Confirm the service came up healthy.') }, + ]} + > + {t('app.recipes.headerLine', 'One-click installers')} +