reft #6082 side menu
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-08-09 10:10:15 +02:00
parent 61e3b71bbf
commit f2d761df85
3 changed files with 19 additions and 1 deletions

View File

@ -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>

View File

@ -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;

View File

@ -1,2 +1,6 @@
<header ng-transclude>
</header>
<button
icon="more_up"
onclick="redirect()" >
</button>
</header>