Can double click on a network to access its page
This commit is contained in:
parent
bc15846b67
commit
4c839eb2d1
@ -21,6 +21,7 @@ import { useConfirm } from "../hooks/providers/ConfirmDialogProvider";
|
|||||||
import { useSnackbar } from "../hooks/providers/SnackbarProvider";
|
import { useSnackbar } from "../hooks/providers/SnackbarProvider";
|
||||||
import { useAlert } from "../hooks/providers/AlertDialogProvider";
|
import { useAlert } from "../hooks/providers/AlertDialogProvider";
|
||||||
import { NetworkStatusWidget } from "../widgets/net/NetworkStatusWidget";
|
import { NetworkStatusWidget } from "../widgets/net/NetworkStatusWidget";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
export function NetworksListRoute(): React.ReactElement {
|
export function NetworksListRoute(): React.ReactElement {
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
@ -77,6 +78,8 @@ function NetworksListRouteInner(p: {
|
|||||||
list: NetworkInfo[];
|
list: NetworkInfo[];
|
||||||
onRequestDelete: (n: NetworkInfo) => void;
|
onRequestDelete: (n: NetworkInfo) => void;
|
||||||
}): React.ReactElement {
|
}): React.ReactElement {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<VirtWebRouteContainer
|
<VirtWebRouteContainer
|
||||||
label="Networks"
|
label="Networks"
|
||||||
@ -101,7 +104,11 @@ function NetworksListRouteInner(p: {
|
|||||||
<TableBody>
|
<TableBody>
|
||||||
{p.list.map((t) => {
|
{p.list.map((t) => {
|
||||||
return (
|
return (
|
||||||
<TableRow key={t.uuid} hover>
|
<TableRow
|
||||||
|
key={t.uuid}
|
||||||
|
hover
|
||||||
|
onDoubleClick={() => navigate(NetworkURL(t))}
|
||||||
|
>
|
||||||
<TableCell>{t.name}</TableCell>
|
<TableCell>{t.name}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
{t.description ?? (
|
{t.description ?? (
|
||||||
|
Loading…
Reference in New Issue
Block a user