Remove sidebar wrapper div.

This commit is contained in:
Richard Lewis 2019-08-05 17:35:53 +03:00 committed by Pavel Djundik
parent b95f89c4c2
commit 055ba5caff
3 changed files with 64 additions and 69 deletions

View file

@ -1,7 +1,7 @@
<template>
<!-- TODO: move all class toggling to vue, since vue clears existing classes when changing the notified class -->
<div id="viewport" :class="viewportClasses" role="tablist">
<Sidebar :networks="networks" :active-channel="activeChannel" />
<Sidebar :networks="networks" :active-channel="activeChannel" :overlay="$refs.overlay" />
<div id="sidebar-overlay" ref="overlay" @click="$root.setSidebar(false)" />
<article id="windows">
<Chat
v-if="activeChannel"

View file

@ -1,5 +1,4 @@
<template>
<div>
<aside id="sidebar" ref="sidebar">
<div class="scrollable-area">
<div class="logo-container">
@ -9,9 +8,7 @@
alt="The Lounge"
/>
<img
:src="
`img/logo-${isPublic() ? 'horizontal-' : ''}transparent-bg-inverted.svg`
"
:src="`img/logo-${isPublic() ? 'horizontal-' : ''}transparent-bg-inverted.svg`"
class="logo-inverted"
alt="The Lounge"
/>
@ -63,8 +60,6 @@
/></span>
</footer>
</aside>
<div id="sidebar-overlay" ref="overlay" @click="$root.setSidebar(false)" />
</div>
</template>
<script>
@ -78,6 +73,7 @@ export default {
props: {
activeChannel: Object,
networks: Array,
overlay: HTMLElement,
},
mounted() {
this.touchStartPos = null;
@ -146,7 +142,7 @@ export default {
}
this.$refs.sidebar.style.transform = "translate3d(" + distX + "px, 0, 0)";
this.$refs.overlay.style.opacity = distX / this.menuWidth;
this.overlay.style.opacity = distX / this.menuWidth;
};
this.onTouchEnd = () => {
@ -165,7 +161,7 @@ export default {
this.$store.commit("sidebarDragging", false);
this.$refs.sidebar.style.transform = null;
this.$refs.overlay.style.opacity = null;
this.overlay.style.opacity = null;
this.touchStartPos = null;
this.touchCurPos = null;

View file

@ -422,7 +422,6 @@
</template>
<script>
// const storage = require("../../js/localStorage"); // TODO: use this
import socket from "../../js/socket";
import RevealPassword from "../RevealPassword.vue";
import Session from "../Session.vue";