- Add registration_enabled to /api/v1/serverinfo
- Add config table caching on save
- Fix redis TTL not being parsed correctly
- Move registration enabled to backend toggle
- Fixed navbar when loading /u/profile URL
- Token now shows on user page + can reset
- Added basic popup validation to disconnect/reset buttons
This commit is contained in:
Daniel Mason 2021-04-03 13:54:07 +13:00
parent f8bd321fbc
commit 9cbb94fc56
Signed by: idanoo
GPG key ID: 387387CDBC02F132
21 changed files with 246 additions and 59 deletions

View file

@ -24,7 +24,7 @@ const Navigation = () => {
const location = useLocation();
// Lovely hack to highlight the current page (:
let active = "Home"
let active = "home"
if (location && location.pathname && location.pathname.length > 1) {
active = location.pathname.replace(/\//, "");
}
@ -49,8 +49,8 @@ const Navigation = () => {
<Link
key={menuItem}
className="navLinkMobile"
style={active === menuItem ? activeStyle : {}}
to={menuItem}
style={active === menuItem.toLowerCase() ? activeStyle : {}}
to={menuItem.toLowerCase()}
onClick={toggleCollapsed}
>{menuItem}</Link>
</NavItem>
@ -76,8 +76,8 @@ const Navigation = () => {
<Link
key={menuItem}
className="navLinkMobile"
style={active === menuItem ? activeStyle : {}}
to={menuItem === "Home" ? "/" : menuItem}
style={active === "home" && menuItem.toLowerCase() === "home" ? activeStyle : (active === menuItem.toLowerCase() ? activeStyle : {})}
to={menuItem.toLowerCase() === "home" ? "/" : "/" + menuItem.toLowerCase()}
onClick={toggleCollapsed}
>{menuItem}
</Link>
@ -85,17 +85,17 @@ const Navigation = () => {
)}
<NavItem>
<Link
to="/Login"
style={active === "Login" ? activeStyle : {}}
to="/login"
style={active === "login" ? activeStyle : {}}
className="navLinkMobile"
onClick={toggleCollapsed}
>Login</Link>
</NavItem>
<NavItem>
<Link
to="/Register"
to="/register"
className="navLinkMobile"
style={active === "Register" ? activeStyle : {}}
style={active === "register" ? activeStyle : {}}
onClick={toggleCollapsed}
>Register</Link>
</NavItem>
@ -114,8 +114,8 @@ const Navigation = () => {
<Link
key={menuItem}
className="navLink"
style={active === menuItem ? activeStyle : {}}
to={menuItem}
style={active === menuItem.toLowerCase() ? activeStyle : {}}
to={"/" + menuItem.toLowerCase()}
>
{menuItem}
</Link>
@ -126,8 +126,8 @@ const Navigation = () => {
<Link
key={menuItem}
className="navLink"
style={active === menuItem ? activeStyle : {}}
to={menuItem === "Home" ? "/" : menuItem}
style={active === "home" && menuItem.toLowerCase() === "home" ? activeStyle : (active === menuItem.toLowerCase() ? activeStyle : {})}
to={menuItem.toLowerCase() === "home" ? "/" : "/" + menuItem.toLowerCase()}
>
{menuItem}
</Link>

View file

@ -17,8 +17,9 @@ const ScrobbleTable = (props) => {
{
props.data &&
props.data.map(function (element) {
let localTime = new Date(element.time);
return <tr key={element.uuid}>
<td>{element.time}</td>
<td>{localTime.toLocaleString()}</td>
<td>{element.track}</td>
<td>{element.artist}</td>
<td>{element.album}</td>