mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 14:05:44 +01:00
fixed submenu navlinks
This commit is contained in:
@@ -42,8 +42,14 @@ class SubNavigation extends React.Component<Props> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { to, activeOnlyWhenExact } = this.props;
|
const { to, activeOnlyWhenExact } = this.props;
|
||||||
|
|
||||||
|
// removes last part of url
|
||||||
|
let parents = to.split("/");
|
||||||
|
parents.splice(-1,1);
|
||||||
|
let parent = parents.join("/");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Route path={to} exact={activeOnlyWhenExact} children={this.renderLink} />
|
<Route path={parent} exact={activeOnlyWhenExact} children={this.renderLink} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class Profile extends React.Component<Props, State> {
|
|||||||
label={t("profile.informationNavLink")}
|
label={t("profile.informationNavLink")}
|
||||||
/>
|
/>
|
||||||
<SubNavigation
|
<SubNavigation
|
||||||
to={`${url}/settings`}
|
to={`${url}/settings/password`}
|
||||||
label={t("profile.settingsNavLink")}
|
label={t("profile.settingsNavLink")}
|
||||||
>
|
>
|
||||||
<NavLink
|
<NavLink
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class SingleUser extends React.Component<Props> {
|
|||||||
label={t("single-user.informationNavLink")}
|
label={t("single-user.informationNavLink")}
|
||||||
/>
|
/>
|
||||||
<SubNavigation
|
<SubNavigation
|
||||||
to={`${url}/settings`}
|
to={`${url}/settings/edit`}
|
||||||
label={t("single-user.settingsNavLink")}
|
label={t("single-user.settingsNavLink")}
|
||||||
>
|
>
|
||||||
<EditUserNavLink user={user} editUrl={`${url}/settings/edit`} />
|
<EditUserNavLink user={user} editUrl={`${url}/settings/edit`} />
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ $fa-font-path: "webfonts";
|
|||||||
}
|
}
|
||||||
.menu-list {
|
.menu-list {
|
||||||
a {
|
a {
|
||||||
border-radius: 0;
|
|
||||||
color: #333;
|
color: #333;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
||||||
@@ -287,6 +286,7 @@ $fa-font-path: "webfonts";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
border-radius: 0;
|
||||||
border-top: 1px solid #eee;
|
border-top: 1px solid #eee;
|
||||||
border-left: 1px solid #eee;
|
border-left: 1px solid #eee;
|
||||||
border-right: 1px solid #eee;
|
border-right: 1px solid #eee;
|
||||||
|
|||||||
Reference in New Issue
Block a user