mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
Fill table link cells with a block link instead of an overlay
Replace the absolutely-positioned a::after overlay with display:block on the link. The overlay covered sibling cell content (the restart-required icon), swallowing its hover so the tooltip never triggered. A block link fills the cell width without overlapping siblings. Also skip rendering the assigned-host link when an instance has no assigned host, avoiding a dead /hosts/undefined/view link. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
448eb9223d
commit
2bd9bc6138
2 files changed
+8
-11
No files matched your search
@@ -59,12 +59,12 @@ export default function InstanceList(props: InstanceListProps) {
|
|||||||
key: "assignedHost",
|
key: "assignedHost",
|
||||||
className: "table-link-cell",
|
className: "table-link-cell",
|
||||||
render: (_, instance) => <Space>
|
render: (_, instance) => <Space>
|
||||||
<Link
|
{instance.assignedHost !== undefined && <Link
|
||||||
to={`/hosts/${instance.assignedHost}/view`}
|
to={`/hosts/${instance.assignedHost}/view`}
|
||||||
onClick={e => e.stopPropagation()}
|
onClick={e => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
{hostName(instance.assignedHost)}
|
{hostName(instance.assignedHost)}
|
||||||
</Link>
|
</Link>}
|
||||||
<RestartRequired system={instance.assignedHost ? systems.get(instance.assignedHost) : undefined}/>
|
<RestartRequired system={instance.assignedHost ? systems.get(instance.assignedHost) : undefined}/>
|
||||||
</Space>,
|
</Space>,
|
||||||
sorter: (a, b) => strcmp(hostName(a.assignedHost), hostName(b.assignedHost)),
|
sorter: (a, b) => strcmp(hostName(a.assignedHost), hostName(b.assignedHost)),
|
||||||
|
|||||||
@@ -10,15 +10,12 @@ body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make a table name-cell link fill the whole cell, so the entire cell is
|
/* Make a table link-cell's link fill the cell width, so the whole column
|
||||||
clickable and right-click "open in new tab"-able, not just the text. */
|
width is clickable and right-click "open in new tab"-able, not just the
|
||||||
.table-link-cell {
|
text. Uses display:block rather than an overlay so sibling content (e.g.
|
||||||
position: relative;
|
the restart-required icon) stays interactive. */
|
||||||
}
|
.table-link-cell a {
|
||||||
.table-link-cell a::after {
|
display: block;
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
|
|||||||
Reference in new issue
Block a user