Elements-SY

Merge branch 'fix-issues' into uat

...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
4 <sidebar class="sidebar-container" 4 <sidebar class="sidebar-container"
5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" /> 5 :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
6 <div :class="{ hasTagsView: needTagsView }" class="main-container"> 6 <div :class="{ hasTagsView: needTagsView }" class="main-container">
7 - <div class="headerRef" :class="{ 'fixed-header': fixedHeader }" ref="headerRef"> 7 + <div class="headerRef" :class="{ 'fixed-header': fixedHeader }">
8 <navbar /> 8 <navbar />
9 <tags-view v-if="needTagsView" /> 9 <tags-view v-if="needTagsView" />
10 </div> 10 </div>
11 - <app-main ref="appMainBlock" /> 11 + <app-main />
12 <right-panel v-if="false"> 12 <right-panel v-if="false">
13 <settings /> 13 <settings />
14 </right-panel> 14 </right-panel>
......
...@@ -6,7 +6,6 @@ const WIDTH = 992; // refer to Bootstrap's responsive design ...@@ -6,7 +6,6 @@ const WIDTH = 992; // refer to Bootstrap's responsive design
6 export default { 6 export default {
7 watch: { 7 watch: {
8 $route(route) { 8 $route(route) {
9 - this.getBlockCurrentHeight();
10 if (this.device === "mobile" && this.sidebar.opened) { 9 if (this.device === "mobile" && this.sidebar.opened) {
11 store.dispatch("app/closeSideBar", { withoutAnimation: false }); 10 store.dispatch("app/closeSideBar", { withoutAnimation: false });
12 } 11 }
...@@ -23,10 +22,7 @@ export default { ...@@ -23,10 +22,7 @@ export default {
23 if (isMobile) { 22 if (isMobile) {
24 store.dispatch("app/toggleDevice", "mobile"); 23 store.dispatch("app/toggleDevice", "mobile");
25 store.dispatch("app/closeSideBar", { withoutAnimation: true }); 24 store.dispatch("app/closeSideBar", { withoutAnimation: true });
26 - }; 25 + }
27 - this.$nextTick(() => {
28 - this.getBlockCurrentHeight();
29 - });
30 }, 26 },
31 methods: { 27 methods: {
32 // use $_ for mixins properties 28 // use $_ for mixins properties
...@@ -45,11 +41,5 @@ export default { ...@@ -45,11 +41,5 @@ export default {
45 } 41 }
46 } 42 }
47 }, 43 },
48 - getBlockCurrentHeight() {
49 - let appHeaderHeight = this.$refs.headerRef.clientHeight;
50 - let appMainHeight = this.$refs.appMainBlock.$el.clientHeight;
51 - this.$store.dispatch("app/setAppHeaderBlockCH", appHeaderHeight);
52 - this.$store.dispatch("app/setAppMainBlockCH", appMainHeight);
53 - },
54 }, 44 },
55 }; 45 };
......
...@@ -10,8 +10,6 @@ const state = { ...@@ -10,8 +10,6 @@ const state = {
10 device: "desktop", 10 device: "desktop",
11 //size: Cookies.get('size') || 'medium' 11 //size: Cookies.get('size') || 'medium'
12 size: localStorage.getItem("size") || "medium", 12 size: localStorage.getItem("size") || "medium",
13 - headerBlockClientHeight: null,
14 - appMainBlockClientHeight: null,
15 }; 13 };
16 14
17 const mutations = { 15 const mutations = {
...@@ -40,13 +38,8 @@ const mutations = { ...@@ -40,13 +38,8 @@ const mutations = {
40 //Cookies.set('size', size) 38 //Cookies.set('size', size)
41 localStorage.setItem("size", size); 39 localStorage.setItem("size", size);
42 }, 40 },
43 - SET_APPHEADERBLOCKCH: (state, height) => { 41 +};
44 - state.headerBlockClientHeight = height; 42 +
45 - },
46 - SET_APPMAINBLOCKCH: (state, height) => {
47 - state.appMainBlockClientHeight = height;
48 - },
49 -}
50 const actions = { 43 const actions = {
51 toggleSideBar({ commit }) { 44 toggleSideBar({ commit }) {
52 commit("TOGGLE_SIDEBAR"); 45 commit("TOGGLE_SIDEBAR");
...@@ -60,12 +53,6 @@ const actions = { ...@@ -60,12 +53,6 @@ const actions = {
60 setSize({ commit }, size) { 53 setSize({ commit }, size) {
61 commit("SET_SIZE", size); 54 commit("SET_SIZE", size);
62 }, 55 },
63 - setAppHeaderBlockCH({ commit }, height) {
64 - commit("SET_APPHEADERBLOCKCH", height);
65 - },
66 - setAppMainBlockCH({ commit }, height) {
67 - commit("SET_APPMAINBLOCKCH", height);
68 - },
69 }; 56 };
70 57
71 export default { 58 export default {
......