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