diff --git a/web/src/SimpleLayout.jsx b/web/src/SimpleLayout.jsx index cac41dc52b..342a4786dd 100644 --- a/web/src/SimpleLayout.jsx +++ b/web/src/SimpleLayout.jsx @@ -33,7 +33,7 @@ import { _ } from "~/i18n"; * Simple layout for displaying content that comes before product configuration * TODO: improve documentation */ -export default function SimpleLayout({ showOutlet = true, children }) { +export default function SimpleLayout({ showOutlet = true, showInstallerOptions = true, children }) { return ( @@ -42,7 +42,7 @@ export default function SimpleLayout({ showOutlet = true, children }) { - + {showInstallerOptions && } diff --git a/web/src/assets/styles/global.scss b/web/src/assets/styles/global.scss index 35b0e7c73c..6bf961bd7d 100644 --- a/web/src/assets/styles/global.scss +++ b/web/src/assets/styles/global.scss @@ -39,6 +39,11 @@ button.pf-m-link { } } +// Do not reserve space for empty nodes. +div:empty { + display: none; +} + fieldset { padding: var(--fs-base); border: 0; diff --git a/web/src/assets/styles/patternfly-overrides.scss b/web/src/assets/styles/patternfly-overrides.scss index e6226f382d..aacae6db96 100644 --- a/web/src/assets/styles/patternfly-overrides.scss +++ b/web/src/assets/styles/patternfly-overrides.scss @@ -309,3 +309,28 @@ table td > .pf-v5-c-empty-state { color: white; } } + +// Force sidebar to only use needed width plus an extra padding at the end. +.pf-v5-c-page__sidebar.pf-m-expanded { + --pf-v5-c-page__sidebar--Width: fit-content; + + .pf-v5-c-nav__link { + padding-inline-end: calc(var(--pf-v5-global--spacer--xl) * 1.2); + } +} + +// Makes the NotificationDrawerHeader "plain" +.pf-v5-c-notification-drawer { + --pf-v5-c-notification-drawer--BackgroundColor: white; +} + +.pf-v5-c-notification-drawer__list-item { + --pf-v5-c-notification-drawer__list-item--PaddingBottom: 0; + --pf-v5-c-notification-drawer__list-item--BoxShadow: none; +} + +.pf-v5-c-notification-drawer__list-item-description { + padding-inline-start: calc( + 1em + var(--pf-v5-c-notification-drawer__list-item-header-icon--MarginRight) + ); +} diff --git a/web/src/components/core/CardField.jsx b/web/src/components/core/CardField.jsx index e2aaebea56..28b7552c61 100644 --- a/web/src/components/core/CardField.jsx +++ b/web/src/components/core/CardField.jsx @@ -61,7 +61,7 @@ const CardField = ({ - {description &&
{description}
} + {description &&
{description}
} {children} {actions && {actions}} diff --git a/web/src/components/core/IssuesHint.jsx b/web/src/components/core/IssuesHint.jsx index 20c52c444d..81d557a017 100644 --- a/web/src/components/core/IssuesHint.jsx +++ b/web/src/components/core/IssuesHint.jsx @@ -31,7 +31,7 @@ export default function IssuesHint({ issues }) {

- {_("Please, pay attention to the following tasks:")} + {_("Before starting the installation, you need to address the following problems:")}

{issues.map((i, idx) => {i.description})} diff --git a/web/src/components/layout/Icon.jsx b/web/src/components/layout/Icon.jsx index 92dadf28ca..e9d6840b4f 100644 --- a/web/src/components/layout/Icon.jsx +++ b/web/src/components/layout/Icon.jsx @@ -84,9 +84,6 @@ import WifiFind from "@icons/wifi_find.svg?component"; import { SiLinux, SiWindows } from "@icons-pack/react-simple-icons"; -// Icons from SVG -import Loading from "./three-dots-loader-icon.svg?component"; - /** * @typedef {string|number} IconSize * @typedef {keyof icons} IconName @@ -120,7 +117,6 @@ const icons = { inventory_2: Inventory, keyboard: Keyboard, lan: Lan, - loading: Loading, list_alt: ListAlt, lock: Lock, manage_accounts: ManageAccounts, diff --git a/web/src/components/layout/Loading.jsx b/web/src/components/layout/Loading.jsx index ec81978241..63036d1282 100644 --- a/web/src/components/layout/Loading.jsx +++ b/web/src/components/layout/Loading.jsx @@ -20,24 +20,27 @@ */ import React from "react"; -import { EmptyState, EmptyStateIcon, EmptyStateHeader } from "@patternfly/react-core"; +import { EmptyState, EmptyStateIcon, EmptyStateHeader, Spinner } from "@patternfly/react-core"; +import SimpleLayout from "~/SimpleLayout"; import { Center, Icon } from "~/components/layout"; import { _ } from "~/i18n"; -const LoadingIcon = () => ; +const LoadingIcon = () => ; function Loading({ text = _("Loading installation environment, please wait.") }) { return ( -
- - } - /> - -
+ +
+ + } + /> + +
+
); } diff --git a/web/src/components/layout/three-dots-loader-icon.svg b/web/src/components/layout/three-dots-loader-icon.svg deleted file mode 100644 index 6db55f17fc..0000000000 --- a/web/src/components/layout/three-dots-loader-icon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/web/src/components/network/AddressesDataList.jsx b/web/src/components/network/AddressesDataList.jsx index f5eb71655c..4c4ff9c3ae 100644 --- a/web/src/components/network/AddressesDataList.jsx +++ b/web/src/components/network/AddressesDataList.jsx @@ -29,7 +29,8 @@ import React from "react"; import { Button, DataList, DataListItem, DataListItemRow, DataListItemCells, DataListCell, DataListAction, - Flex + Flex, + Stack } from "@patternfly/react-core"; import { FormLabel } from "~/components/core"; @@ -115,16 +116,18 @@ export default function AddressesDataList({ const newAddressButtonText = addresses.length ? _("Add another address") : _("Add an address"); return ( - <> + {_("Addresses")} - {addresses.map(address => renderAddress(address))} - + + + + ); } diff --git a/web/src/components/network/DnsDataList.jsx b/web/src/components/network/DnsDataList.jsx index 093957f6f3..474001cd30 100644 --- a/web/src/components/network/DnsDataList.jsx +++ b/web/src/components/network/DnsDataList.jsx @@ -29,7 +29,8 @@ import React from "react"; import { Button, DataList, DataListItem, DataListItemRow, DataListItemCells, DataListCell, DataListAction, - Flex + Flex, + Stack } from "@patternfly/react-core"; import { FormLabel } from "~/components/core"; @@ -92,16 +93,18 @@ export default function DnsDataList({ servers: originalServers, updateDnsServers const newDnsButtonText = servers.length ? _("Add another DNS") : _("Add DNS"); return ( - <> + {_("DNS")} + + + {servers.map(server => renderDns(server))} + + - - {servers.map(server => renderDns(server))} - - + ); } diff --git a/web/src/components/overview/OverviewPage.jsx b/web/src/components/overview/OverviewPage.jsx index 2a2e636cf1..68fcefb86e 100644 --- a/web/src/components/overview/OverviewPage.jsx +++ b/web/src/components/overview/OverviewPage.jsx @@ -22,27 +22,38 @@ import React, { useEffect, useState } from "react"; import { CardBody, - Grid, - GridItem, - Hint, - HintBody, - List, - ListItem, - Stack + Grid, GridItem, + Hint, HintBody, + NotificationDrawer, + NotificationDrawerBody, + NotificationDrawerList, + NotificationDrawerListItem, + NotificationDrawerListItemBody, + NotificationDrawerListItemHeader, + Stack, } from "@patternfly/react-core"; import { useProduct } from "~/context/product"; import { useInstallerClient } from "~/context/installer"; import { Link, Navigate } from "react-router-dom"; +import { Center } from "~/components/layout"; import { CardField, EmptyState, Page, InstallButton } from "~/components/core"; import L10nSection from "./L10nSection"; import StorageSection from "./StorageSection"; import SoftwareSection from "./SoftwareSection"; import { _ } from "~/i18n"; +const SCOPE_HEADERS = { + user: _("Users"), + storage: _("Storage"), + software: _("Software") +}; + const ReadyForInstallation = () => ( - - - +
+ + + +
); // FIXME: improve @@ -51,23 +62,28 @@ const IssuesList = ({ issues }) => { const list = []; Object.entries(scopes).forEach(([scope, issues]) => { issues.forEach((issue, idx) => { + const variant = issue.severity === "error" ? "warning" : "info"; + const link = ( - - {issue.description} - + + + + {issue.description} + + ); list.push(link); }); }); return ( - - {list} - + + + + {list} + + + ); }; @@ -84,6 +100,15 @@ export default function OverviewPage() { return ; } + const resultSectionProps = + issues.isEmpty + ? {} + : { + + label: _("Installation"), + description: _("Before installing, please check the following problems.") + }; + return ( <> @@ -114,11 +139,9 @@ export default function OverviewPage() { - + - - {issues.isEmpty ? : } - + {issues.isEmpty ? : }