This commit is contained in:
parent
61e3b71bbf
commit
f2d761df85
|
@ -2,8 +2,13 @@
|
|||
ng-class="{shown: $ctrl.shown}"
|
||||
ng-click="$ctrl.hide()">
|
||||
</vn-background>
|
||||
|
||||
<div
|
||||
class="menu"
|
||||
ng-class="{shown: $ctrl.shown}"
|
||||
ng-transclude>
|
||||
<button
|
||||
icon="more_up"
|
||||
onclick="redirect()" >
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -57,6 +57,15 @@ export default class SideMenu extends Component {
|
|||
else this.show();
|
||||
}
|
||||
|
||||
async redirect() {
|
||||
let section = route.path.substring(1);
|
||||
if (!route.path.includes('/')) return (window.location.href = await getUrl(section));
|
||||
section = section.substring(0, section.indexOf('/'));
|
||||
if (route?.params?.id)
|
||||
window.location.href = await getUrl(`${section}/${route.params.id}/summary`);
|
||||
else
|
||||
window.location.href = await getUrl(section + 'index');
|
||||
}
|
||||
show() {
|
||||
if (this.shown) return;
|
||||
this.shown = true;
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
<header ng-transclude>
|
||||
</header>
|
||||
<button
|
||||
icon="more_up"
|
||||
onclick="redirect()" >
|
||||
</button>
|
||||
</header>
|
||||
|
|
Loading…
Reference in New Issue