Skip to content

Commit

Permalink
menu status
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Mar 29, 2022
1 parent ae157af commit 9d54311
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
8 changes: 4 additions & 4 deletions public/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/app.js": "/app.js?id=fd20d54d831287b8dc7a5af9319b0952",
"/app.js": "/app.js?id=7a173f0d91a79b58d2f5fdc82555459c",
"/app.css": "/app.css?id=f6af34b1ec88e2d33d0784fddc7340a1"
}
3 changes: 0 additions & 3 deletions resources/js/Components/Form/AsyncSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
{{ __('No items found for the given keyword.') }}
</li>
</ul>
<ul>

</ul>
</div>
</template>

Expand Down
20 changes: 19 additions & 1 deletion resources/js/Components/Layout/Nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class="btn btn--secondary btn--icon"
@click="toggleSidebar"
>
<Icon class="btn__icon btn__icon--start" name="menu"></Icon>
<Icon class="btn__icon btn__icon--start" :name="isOpen ? 'menu-open' : 'menu'"></Icon>
</button>
<UserMenu direction="bottom"></UserMenu>
</div>
Expand All @@ -28,6 +28,24 @@
UserMenu,
},
mounted() {
this.isOpen = this.$parent.$refs.sidebar.isOpen;
this.$parent.$refs.sidebar.$dispatcher.on('open', () => {
this.isOpen = this.$parent.$refs.sidebar.isOpen;
});
this.$parent.$refs.sidebar.$dispatcher.on('close', () => {
this.isOpen = this.$parent.$refs.sidebar.isOpen;
});
},
data() {
return {
isOpen: false,
};
},
methods: {
toggleSidebar() {
this.$parent.$refs.sidebar.toggle();
Expand Down

0 comments on commit 9d54311

Please sign in to comment.