diff --git a/packages/web_ui/src/components/HostsPage.tsx b/packages/web_ui/src/components/HostsPage.tsx
index 5a9d9986..9ead51fe 100644
--- a/packages/web_ui/src/components/HostsPage.tsx
+++ b/packages/web_ui/src/components/HostsPage.tsx
@@ -220,6 +220,7 @@ export default function HostsPage() {
dataIndex: "name",
defaultSortOrder: "ascend",
sorter: (a, b) => strcmp(a.name, b.name),
+ className: "table-link-cell",
render: (_, host) =>
{host.name}
,
diff --git a/packages/web_ui/src/components/InstanceList.tsx b/packages/web_ui/src/components/InstanceList.tsx
index 3d9041e9..45919f64 100644
--- a/packages/web_ui/src/components/InstanceList.tsx
+++ b/packages/web_ui/src/components/InstanceList.tsx
@@ -49,6 +49,7 @@ export default function InstanceList(props: InstanceListProps) {
dataIndex: "name",
defaultSortOrder: "ascend",
sorter: (a, b) => strcmp(a["name"], b["name"]),
+ className: "table-link-cell",
render: (_, instance) =>
{instance.name}
,
@@ -56,6 +57,7 @@ export default function InstanceList(props: InstanceListProps) {
{
title: "Assigned Host",
key: "assignedHost",
+ className: "table-link-cell",
render: (_, instance) =>
strcmp(a.name, b.name),
+ className: "table-link-cell",
render: (_, modPack) => strcmp(a.name, b.name),
+ className: "table-link-cell",
render: (_, role) =>
{role.name}
,
diff --git a/packages/web_ui/src/components/SiteLayout.tsx b/packages/web_ui/src/components/SiteLayout.tsx
index 7d2a77c4..35bcc2c2 100644
--- a/packages/web_ui/src/components/SiteLayout.tsx
+++ b/packages/web_ui/src/components/SiteLayout.tsx
@@ -25,7 +25,9 @@ const { Header, Sider } = Layout;
// Render a sidebar menu label as a real link so right-click/middle-click can
// open it in a new tab; stopPropagation keeps the Menu onClick from also firing.
function navLink(path: string, label: string) {
- return e.stopPropagation()}>{label};
+ // color: inherit keeps the menu colour in every state (incl. the focus left
+ // behind by a middle-click, which would otherwise show the link blue).
+ return e.stopPropagation()}>{label};
}
function isActiveDropzone(element: HTMLElement | null): boolean {
@@ -82,7 +84,8 @@ export default function SiteLayout() {
},
items: [
{
- label: e.stopPropagation()}>
+ label: e.stopPropagation()}>
{account.name}
,
key: "user",
diff --git a/packages/web_ui/src/components/UserViewPage.tsx b/packages/web_ui/src/components/UserViewPage.tsx
index 4aed4b05..4eb0c206 100644
--- a/packages/web_ui/src/components/UserViewPage.tsx
+++ b/packages/web_ui/src/components/UserViewPage.tsx
@@ -301,6 +301,7 @@ export default function UserViewPage() {
{
title: "Instance",
key: "instance",
+ className: "table-link-cell",
render: (_, [id]) =>
{instanceName(id)}
,
diff --git a/packages/web_ui/src/components/UsersTable.tsx b/packages/web_ui/src/components/UsersTable.tsx
index 48f26c03..ba5f3c70 100644
--- a/packages/web_ui/src/components/UsersTable.tsx
+++ b/packages/web_ui/src/components/UsersTable.tsx
@@ -84,6 +84,7 @@ export default function UsersTable({ instanceId, onlyOnline = false, pagination,
{
title: "Name",
key: "name",
+ className: "table-link-cell",
render: (_: any, user: lib.UserDetails) => (
diff --git a/packages/web_ui/src/style.css b/packages/web_ui/src/style.css
index b1f53739..f574c1b1 100644
--- a/packages/web_ui/src/style.css
+++ b/packages/web_ui/src/style.css
@@ -10,6 +10,17 @@ body {
cursor: pointer;
}
+/* Make a table name-cell link fill the whole cell, so the entire cell is
+ clickable and right-click "open in new tab"-able, not just the text. */
+.table-link-cell {
+ position: relative;
+}
+.table-link-cell a::after {
+ content: "";
+ position: absolute;
+ inset: 0;
+}
+
.login-container {
min-height: 100vh;
display: flex;