mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Make table link cells fill the cell and fix focus colour
Stretch the navigation link over the whole table cell (a position:relative cell with an ::after overlay) so the entire name cell - and the Instances Assigned Host cell - is clickable and right-click "open in new tab"-able, not just the text. Also force color:inherit on the sidebar and account links so the focus left behind by a middle-click no longer shows them blue. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f04fc68513
commit
448eb9223d
9 files changed
+24
-2
No files matched your search
@@ -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 <Link to={path} onClick={e => e.stopPropagation()}>{label}</Link>;
|
||||
// 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 <Link to={path} style={{ color: "inherit" }} onClick={e => e.stopPropagation()}>{label}</Link>;
|
||||
}
|
||||
|
||||
function isActiveDropzone(element: HTMLElement | null): boolean {
|
||||
@@ -82,7 +84,8 @@ export default function SiteLayout() {
|
||||
},
|
||||
items: [
|
||||
{
|
||||
label: <Link to={`/users/${account.name}/view`} onClick={e => e.stopPropagation()}>
|
||||
label: <Link to={`/users/${account.name}/view`} style={{ color: "inherit" }}
|
||||
onClick={e => e.stopPropagation()}>
|
||||
{account.name}
|
||||
</Link>,
|
||||
key: "user",
|
||||
|
||||
Reference in new issue
Block a user