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> <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"> <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"> <article id="windows">
<Chat <Chat
v-if="activeChannel" v-if="activeChannel"

View File

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

View File

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