diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 5f6f038ac9..d4da2cffe0 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 20 03:52:59 UTC 2026 - David Diaz + +- Update look&feel of some pages to make them match the new style + (gh#agama-project/agama#3050). + ------------------------------------------------------------------- Tue Jan 20 00:53:06 UTC 2026 - David Diaz diff --git a/web/src/components/core/InstallationExit.test.tsx b/web/src/components/core/InstallationExit.test.tsx index eb763cabfb..9b196f66a2 100644 --- a/web/src/components/core/InstallationExit.test.tsx +++ b/web/src/components/core/InstallationExit.test.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -28,16 +28,16 @@ import InstallationExit from "./InstallationExit"; describe("InstallationExit", () => { it("makes users aware system is rebooting", () => { plainRender(); - screen.getByRole("heading", { name: "Your system is rebooting", level: 1 }); + screen.getByRole("heading", { name: "The system is rebooting", level: 1 }); }); it("makes users aware installer is no longer useful", () => { plainRender(); - screen.getByText(/The installer interface is no longer available/); + screen.getByText("The installer interface is no longer available."); }); it("invites users to close the installer", () => { plainRender(); - screen.getByText(/you can safely close this window/); + screen.getByText("You can safely close this window."); }); }); diff --git a/web/src/components/core/InstallationExit.tsx b/web/src/components/core/InstallationExit.tsx index ebcf381ff5..9e46ba033d 100644 --- a/web/src/components/core/InstallationExit.tsx +++ b/web/src/components/core/InstallationExit.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2025] SUSE LLC + * Copyright (c) [2025-2026] SUSE LLC * * All Rights Reserved. * @@ -21,45 +21,63 @@ */ import React from "react"; -import { - Bullseye, - Card, - CardBody, - Content, - EmptyState, - EmptyStateBody, - Grid, - GridItem, -} from "@patternfly/react-core"; +import { Flex, Grid, GridItem, HelperText, HelperTextItem, Title } from "@patternfly/react-core"; +import Icon from "~/components/layout/Icon"; +import Page from "~/components/core/Page"; import { _ } from "~/i18n"; -import Page from "./Page"; + +import textStyles from "@patternfly/react-styles/css/utilities/Text/text"; +import alignmentStyles from "@patternfly/react-styles/css/utilities/Alignment/alignment"; export default function InstallationExit() { return ( - - - - - - - - - {_( - "The installer interface is no longer available, so you can safely close this window.", - )} - - - - - + + + + + + + {_("The system is rebooting")} + + + + {_("The installer interface is no longer available.")} + + + + + + + + + {_("You can safely close this window.")} + + + - + ); } diff --git a/web/src/components/core/InstallationFinished.test.tsx b/web/src/components/core/InstallationFinished.test.tsx index ec63bcbf3e..2d3ea82f5c 100644 --- a/web/src/components/core/InstallationFinished.test.tsx +++ b/web/src/components/core/InstallationFinished.test.tsx @@ -103,7 +103,7 @@ describe("InstallationFinished", () => { it("shows the finished installation screen", () => { installerRender(); - screen.getByText("Congratulations!"); + screen.getByRole("heading", { level: 1, name: "Installation complete" }); }); it("shows a 'Reboot' button", () => { diff --git a/web/src/components/core/InstallationFinished.tsx b/web/src/components/core/InstallationFinished.tsx index ed5285afed..8a2c478eea 100644 --- a/web/src/components/core/InstallationFinished.tsx +++ b/web/src/components/core/InstallationFinished.tsx @@ -20,45 +20,43 @@ * find current contact information at www.suse.com. */ -import React, { useState } from "react"; +import React from "react"; import { Alert, - Bullseye, Button, - Card, - CardBody, Content, - EmptyState, - EmptyStateActions, - EmptyStateBody, - EmptyStateFooter, - ExpandableSection, + Divider, + Flex, Grid, GridItem, + HelperText, + HelperTextItem, Stack, + Title, } from "@patternfly/react-core"; import { useNavigate } from "react-router"; -import { Icon } from "~/components/layout"; -import alignmentStyles from "@patternfly/react-styles/css/utilities/Alignment/alignment"; +import Icon from "~/components/layout/Icon"; +import Page from "~/components/core/Page"; import { useExtendedConfig } from "~/hooks/model/config"; import { finishInstallation } from "~/api"; import { ROOT as PATHS } from "~/routes/paths"; import { _ } from "~/i18n"; -import Page from "./Page"; -const TpmHint = () => { - const [isExpanded, setIsExpanded] = useState(false); +import textStyles from "@patternfly/react-styles/css/utilities/Text/text"; +import alignmentStyles from "@patternfly/react-styles/css/utilities/Alignment/alignment"; + +const TpmAlert = () => { const title = _("TPM sealing requires the new system to be booted directly."); return ( - {title}}> + - {_("If a local media was used to run this installer, remove it before the next boot.")} - setIsExpanded(!isExpanded)} - toggleText={isExpanded ? _("Hide details") : _("See more details")} - > + + + {_("If a local media was used to run this installer, remove it before the next boot.")} + + + { // TRANSLATORS: "Trusted Platform Module" is the name of the technology and "TPM" its abbreviation _( @@ -67,14 +65,12 @@ open encrypted devices will take place during the first boot of the new system. the machine needs to boot directly to the new boot loader.", ) } - + ); }; -const SuccessIcon = () => ; - // TODO: define some utility method to get the device used as root (drive, partition, logical volume). // TODO: use type checking for config. function usingTpm(config): boolean { @@ -97,8 +93,7 @@ function usingTpm(config): boolean { return root?.encryption?.tpmFde !== undefined; } -function InstallationFinished() { - const { storage: storageConfig } = useExtendedConfig(); +const RebootButton = () => { const navigate = useNavigate(); const onReboot = () => { @@ -106,41 +101,66 @@ function InstallationFinished() { navigate(PATHS.installationExit, { replace: true }); }; + return ( + + ); +}; + +function InstallationFinished() { + const { storage: storageConfig } = useExtendedConfig(); + const mountTpmAlert = usingTpm(storageConfig); + return ( - - - - - - + + + + + + {_("Installation complete")} + + + + - - - {_("The installation on your machine is complete.")} - - - {_("At this point you can reboot the machine to log in to the new system.")} - - {usingTpm(storageConfig) && } - - - - - - - - - + {_("You can reboot the machine to log in to the new system.")} + + + {mountTpmAlert && } + + + + + {mountTpmAlert ? : } + - + ); } diff --git a/web/src/components/core/ServerError.test.tsx b/web/src/components/core/ServerError.test.tsx index e94c08d324..aafe32b07b 100644 --- a/web/src/components/core/ServerError.test.tsx +++ b/web/src/components/core/ServerError.test.tsx @@ -30,7 +30,8 @@ import ServerError from "./ServerError"; describe("ServerError", () => { it("wraps a generic server problem message", () => { installerRender(); - screen.getByText(/Cannot connect to Agama server/i); + screen.getByText("Cannot connect"); + screen.getByText("Check whether Agama server is running."); }); it("calls location.reload when user clicks on 'Reload'", async () => { diff --git a/web/src/components/core/ServerError.tsx b/web/src/components/core/ServerError.tsx index 6e9075acf7..21077a5440 100644 --- a/web/src/components/core/ServerError.tsx +++ b/web/src/components/core/ServerError.tsx @@ -22,41 +22,73 @@ import React from "react"; import { - Bullseye, Button, - EmptyState, - EmptyStateBody, - EmptyStateFooter, + Flex, + Grid, + GridItem, + HelperText, + HelperTextItem, + Title, } from "@patternfly/react-core"; -import { Icon } from "~/components/layout"; -import { Page } from "~/components/core"; +import Icon from "~/components/layout/Icon"; +import Page from "~/components/core/Page"; import { locationReload } from "~/utils"; -import shadowUtils from "@patternfly/react-styles/css/utilities/BoxShadow/box-shadow"; import { _ } from "~/i18n"; -const ErrorIcon = () => ; +import textStyles from "@patternfly/react-styles/css/utilities/Text/text"; +import alignmentStyles from "@patternfly/react-styles/css/utilities/Alignment/alignment"; function ServerError() { return ( - - - - {_("Please, check whether it is running.")} - - - - - - + + + + ); } diff --git a/web/src/components/layout/Icon.tsx b/web/src/components/layout/Icon.tsx index bbafcbdb97..418da2f9da 100644 --- a/web/src/components/layout/Icon.tsx +++ b/web/src/components/layout/Icon.tsx @@ -1,5 +1,5 @@ /* - * Copyright (c) [2022-2025] SUSE LLC + * Copyright (c) [2022-2026] SUSE LLC * * All Rights Reserved. * @@ -35,6 +35,7 @@ import CheckCircle from "@icons/check_circle.svg?component"; import ChevronLeft from "@icons/chevron_left.svg?component"; import ChevronRight from "@icons/chevron_right.svg?component"; import Delete from "@icons/delete.svg?component"; +import DoneAll from "@icons/done_all.svg?component"; import DeployedCodeUpdate from "@icons/deployed_code_update.svg?component"; import EditSquare from "@icons/edit_square.svg?component"; import Emergency from "@icons/emergency.svg?component"; @@ -57,9 +58,10 @@ import MoreVert from "@bolderIcons/more_vert.svg?component"; import NetworkWifi from "@icons/network_wifi.svg?component"; import NetworkWifi1Bar from "@icons/network_wifi_1_bar.svg?component"; import NetworkWifi3Bar from "@icons/network_wifi_3_bar.svg?component"; -import Translate from "@icons/translate.svg?component"; +import RestartAlt from "@icons/restart_alt.svg?component"; import SearchOff from "@icons/search_off.svg?component"; import SettingsEthernet from "@icons/settings_ethernet.svg?component"; +import Translate from "@icons/translate.svg?component"; import UnfoldLess from "@icons/unfold_less.svg?component"; import UnfoldMore from "@icons/unfold_more.svg?component"; import Warning from "@icons/warning.svg?component"; @@ -79,6 +81,7 @@ const icons = { chevron_left: ChevronLeft, chevron_right: ChevronRight, delete: Delete, + done_all: DoneAll, deployed_code_update: DeployedCodeUpdate, edit_square: EditSquare, emergency: Emergency, @@ -101,6 +104,7 @@ const icons = { network_wifi: NetworkWifi, network_wifi_1_bar: NetworkWifi1Bar, network_wifi_3_bar: NetworkWifi3Bar, + restart_alt: RestartAlt, search_off: SearchOff, settings_ethernet: SettingsEthernet, translate: Translate,