From 62e146709f1b4ceee86b6c9d414d0538b2991833 Mon Sep 17 00:00:00 2001 From: frozeeen Date: Sun, 24 Oct 2021 11:18:37 +0800 Subject: [PATCH] feat: add navigation drawer for mobile devices (#31) Related: https://github.com/socketio/socket.io-admin-ui/issues/29 --- ui/src/components/AppBar.vue | 43 ++++++++++++++++++++++++-- ui/src/components/NavigationDrawer.vue | 7 ++++- ui/src/store/modules/config.js | 4 +++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/ui/src/components/AppBar.vue b/ui/src/components/AppBar.vue index 53b4d30..aea2bb2 100644 --- a/ui/src/components/AppBar.vue +++ b/ui/src/components/AppBar.vue @@ -1,5 +1,10 @@ @@ -58,12 +79,28 @@ export default { "https://github.com/socketio/socket.io-admin-ui/releases/tag/" + version ); }, + + extensionHeight() { + switch (this.$vuetify.breakpoint.name) { + case "xs": + case "sm": + case "md": + return 96; + case "lg": + case "xl": + default: + return 0; + } + }, }, methods: { onUpdate() { this.$emit("update"); }, + toggleNavigationDrawer() { + this.$store.commit("config/toggleNavigationDrawer"); + }, }, }; diff --git a/ui/src/components/NavigationDrawer.vue b/ui/src/components/NavigationDrawer.vue index e10bf03..560f0c6 100644 --- a/ui/src/components/NavigationDrawer.vue +++ b/ui/src/components/NavigationDrawer.vue @@ -1,5 +1,10 @@