feat: clickable username with context menu

This commit is contained in:
julius 2025-03-06 09:28:55 +01:00
parent 854bd03c40
commit 99e80c8077
Signed by: julius
GPG Key ID: C80A63E6A5FD7092
4 changed files with 36 additions and 31 deletions

View File

@ -29,7 +29,6 @@ footer {
left: 8px;
}
/*=========Network Controls=========*/
.infobutton {
@ -367,7 +366,11 @@ button,
position: relative;
text-align: center;
height: 140px;
margin-bottom: 20px;
span {
display: block;
margin: 2px;
}
img {
display: block;
@ -390,6 +393,14 @@ button,
}
}
.avatar {
background-color: lightsteelblue;
padding: 2px 8px;
width: fit-content;
margin: auto;
z-index: 3;
}
.networkroute {
z-index: 10;
position: absolute;

View File

@ -7,34 +7,25 @@ import { BrowserRouter, Routes, Route } from "react-router";
import { SessionProvider } from "./Session";
import { GraphComponent } from "./Network";
import MVPChart from "./MVPChart";
import Avatar from "./Avatar";
function App() {
return (
<BrowserRouter>
<Header />
<Routes>
<Route index element={<Rankings />} />
<SessionProvider>
<Header />
<Avatar />
<Routes>
<Route index element={<Rankings />} />
<Route path="/network" element={
<SessionProvider>
<GraphComponent />
</SessionProvider>
} />
<Route path="/network" element={<GraphComponent />} />
<Route path="/analysis" element={
<SessionProvider>
<Analysis />
</SessionProvider>
} />
<Route path="/analysis" element={<Analysis />} />
<Route path="/mvp" element={
<SessionProvider>
<MVPChart />
</SessionProvider>
} />
</Routes>
<Footer />
<Route path="/mvp" element={<MVPChart />} />
</Routes>
<Footer />
</SessionProvider>
</BrowserRouter>
);
}

View File

@ -1,9 +1,11 @@
export default function Header() {
return <div className="logo" id="logo">
<a href={"/"}>
<img alt="logo" height="66%" src="logo.svg" />
<h3 className="centered">cutt</h3>
</a>
<span className="grey">cool ultimate team tool</span>
</div>
return (
<div className="logo" id="logo">
<a href={"/"}>
<img alt="logo" height="66%" src="logo.svg" />
<h3 className="centered">cutt</h3>
</a>
<span className="grey">cool ultimate team tool</span>
</div>
);
}

View File

@ -49,7 +49,8 @@ export const GraphComponent = () => {
}
const footer = document.getElementsByTagName("footer");
if (footer) {
(footer.item(0) as HTMLElement).className = "fixed-footer";
footer.length &&
((footer.item(0) as HTMLElement).className = "fixed-footer");
}
async function loadData() {