Add animations, add album page, add left panel autoclosing

This commit is contained in:
2020-09-14 17:12:55 +03:00
parent d2d5ce2dd9
commit 57812be1fd
7 changed files with 118 additions and 38 deletions

View File

@@ -2,7 +2,7 @@
<div id="app">
<div class="left-panel"
:class="{'left-panel-closed': leftPanelClosed}">
<LeftPanel></LeftPanel>
<LeftPanel @closeLeftPanel="closeLeftPanel()"></LeftPanel>
</div>
<div class="content w-100"
:class="{'content-when-left-panel-open': !leftPanelClosed}">
@@ -99,6 +99,18 @@ export default class App extends Vue {
this.leftPanelClosed = !this.leftPanelClosed;
}
closeLeftPanel() {
if (this.leftPanelClosed) {
this.closeIcon.anim.setDirection(1);
this.closeIcon.anim.play();
} else {
this.closeIcon.anim.setDirection(-1);
this.closeIcon.anim.play();
}
this.leftPanelClosed = true;
}
}
</script>