Elements-SY

modify

......@@ -4,11 +4,11 @@
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div class="headerRef" :class="{ 'fixed-header': fixedHeader }" ref="headerRef">
<div class="headerRef" :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main ref="appMainBlock" />
<app-main />
<right-panel v-if="false">
<settings />
</right-panel>
......
......@@ -6,7 +6,6 @@ const WIDTH = 992; // refer to Bootstrap's responsive design
export default {
watch: {
$route(route) {
this.getBlockCurrentHeight();
if (this.device === "mobile" && this.sidebar.opened) {
store.dispatch("app/closeSideBar", { withoutAnimation: false });
}
......@@ -24,9 +23,6 @@ export default {
store.dispatch("app/toggleDevice", "mobile");
store.dispatch("app/closeSideBar", { withoutAnimation: true });
}
this.$nextTick(()=>{
this.getBlockCurrentHeight();
})
},
methods: {
// use $_ for mixins properties
......@@ -45,11 +41,5 @@ export default {
}
}
},
getBlockCurrentHeight() {
let appHeaderHeight = this.$refs.headerRef.clientHeight;
let appMainHeight = this.$refs.appMainBlock.$el.clientHeight;
this.$store.dispatch("app/setAppHeaderBlockCH", appHeaderHeight);
this.$store.dispatch("app/setAppMainBlockCH", appMainHeight);
},
},
};
......
......@@ -2,8 +2,6 @@ const getters = {
sidebar: (state) => state.app.sidebar,
size: (state) => state.app.size,
device: (state) => state.app.device,
appHeaderBlockClientHeight: (state) => state.app.headerBlockClientHeight,
appMainBlockClientHeight: (state) => state.app.appMainBlockClientHeight,
visitedViews: (state) => state.tagsView.visitedViews,
cachedViews: (state) => state.tagsView.cachedViews,
token: (state) => state.user.token,
......
......@@ -10,8 +10,6 @@ const state = {
device: "desktop",
//size: Cookies.get('size') || 'medium'
size: localStorage.getItem("size") || "medium",
headerBlockClientHeight: null,
appMainBlockClientHeight: null,
};
const mutations = {
......@@ -40,12 +38,6 @@ const mutations = {
//Cookies.set('size', size)
localStorage.setItem("size", size);
},
SET_APPHEADERBLOCKCH: (state, height) => {
state.headerBlockClientHeight = height;
},
SET_APPMAINBLOCKCH: (state, height) => {
state.appMainBlockClientHeight = height;
},
};
const actions = {
......@@ -61,12 +53,6 @@ const actions = {
setSize({ commit }, size) {
commit("SET_SIZE", size);
},
setAppHeaderBlockCH({ commit }, height) {
commit("SET_APPHEADERBLOCKCH", height);
},
setAppMainBlockCH({ commit }, height) {
commit("SET_APPMAINBLOCKCH", height);
},
};
export default {
......