diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 557b5e60d5..f61555c349 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 26 14:17:30 UTC 2024 - David Diaz + +- Use similar look&feel for sections at network page + (gh#openSUSE/agama#1389). + ------------------------------------------------------------------- Wed Jun 26 14:04:53 UTC 2024 - Imobach Gonzalez Sosa diff --git a/web/src/components/network/NetworkPage.jsx b/web/src/components/network/NetworkPage.jsx index c5c60d1e66..c0380bbfd5 100644 --- a/web/src/components/network/NetworkPage.jsx +++ b/web/src/components/network/NetworkPage.jsx @@ -22,7 +22,7 @@ // @ts-check import React, { useCallback, useEffect, useState } from "react"; -import { Button, CardBody, Grid, GridItem, Split, Skeleton, Stack } from "@patternfly/react-core"; +import { CardBody, Grid, GridItem, Skeleton, Split, Stack } from "@patternfly/react-core"; import { useLoaderData } from "react-router-dom"; import { ButtonLink, CardField, EmptyState, Page } from "~/components/core"; import { ConnectionsTable } from "~/components/network"; @@ -31,17 +31,6 @@ import { useInstallerClient } from "~/context/installer"; import { _ } from "~/i18n"; import { formatIp } from "~/client/network/utils"; import { sprintf } from "sprintf-js"; -import { DeviceState } from "~/client/network/model"; - -/** - * Internal component for displaying info when none wire connection is found - * @component - */ -const NoWiredConnections = () => { - return ( -
{_("No wired connections found.")}
- ); -}; /** * Page component holding Network settings @@ -93,7 +82,7 @@ export default function NetworkPage() { return ( - + {_("The system does not support Wi-Fi connections, probably because of missing or disabled hardware.")} @@ -131,12 +120,27 @@ export default function NetworkPage() { ); }; + const SectionSkeleton = () => ( + + + + + + ); + const WiredConnections = () => { const wiredConnections = connections.filter(c => !c.wireless); + const total = wiredConnections.length; - if (wiredConnections.length === 0) return ; - - return ; + return ( + 0 && _("Wired")}> + + {!ready && } + {ready && total === 0 && } + {ready && total !== 0 && } + + + ); }; return ( @@ -148,11 +152,7 @@ export default function NetworkPage() { - - - {ready ? : } - - +