fix: responsiveness

This commit is contained in:
liyasthomas
2021-08-05 21:29:05 +05:30
parent 4b416586b7
commit 3bd78869a0
7 changed files with 41 additions and 8 deletions

View File

@@ -2,11 +2,14 @@
<div class="flex h-screen w-screen">
<Splitpanes :dbl-click-splitter="false" horizontal>
<Pane class="flex flex-1 !overflow-auto">
<Splitpanes :dbl-click-splitter="false" vertical>
<Splitpanes
:dbl-click-splitter="false"
:horizontal="!(windowInnerWidth >= 768)"
>
<Pane
v-if="LEFT_SIDEBAR"
style="width: auto"
class="hide-scrollbar overflow-auto"
style="width: auto; height: auto"
class="hide-scrollbar !overflow-auto"
>
<AppSidenav />
</Pane>
@@ -52,6 +55,7 @@ export default defineComponent({
return {
LEFT_SIDEBAR: null,
ZEN_MODE: null,
windowInnerWidth: 0,
}
},
subscriptions() {
@@ -83,6 +87,8 @@ export default defineComponent({
})
},
async mounted() {
window.addEventListener("resize", this.handleResize)
this.handleResize()
performMigrations()
console.log(
"%cWe ❤︎ open source!",
@@ -120,5 +126,13 @@ export default defineComponent({
logPageView(this.$router.currentRoute.fullPath)
},
destroyed() {
window.removeEventListener("resize", this.handleResize)
},
methods: {
handleResize() {
this.windowInnerWidth = window.innerWidth
},
},
})
</script>