Fix Scroll

This commit is contained in:
Kekskurse 2019-09-24 16:46:02 +02:00
parent 6ea03eeacb
commit 21fb038128
5 changed files with 18 additions and 8 deletions

View file

@ -1 +1 @@
VUE_APP_API_URL=http://localhost:8000/
VUE_APP_API_URL=http://localhost:8000

View file

@ -12,6 +12,9 @@
</div>
<div v-if="!$store.getters.getAllDataLoaded">
Loading ...
<div v-if="$store.getters.getError">
Es gab einen Fehler, bitte probiere es später nochmal
</div>
</div>
</v-app>
</template>

View file

@ -181,6 +181,7 @@
}
},
handleScroll: function (evt, el) {
console.log(el);
console.log("SCROLL: "+evt.pageY);
if(evt.pageY > 100) {
this.big = false;

View file

@ -122,8 +122,8 @@
},
methods: {
handleScroll: function (evt, el) {
console.log("SCROLL: "+evt.pageY);
if(evt.pageY > 0) {
let scrollPos = document.documentElement.scrollTop;
if(scrollPos> 0) {
this.big = false;
this.bgcolor = "#fff";
this.flat = false;

View file

@ -13,7 +13,8 @@ export default new Vuex.Store({
me: [],
redirectIfLoggedIn: null,
settings: [], // The TV inventory
sideMenu: false, //Toggle Side Menu on side Bar
sideMenu: false, //Toggle Side Menu on side Bar,
error: false
},
getters: {
@ -38,6 +39,9 @@ export default new Vuex.Store({
}
return loaded;
},
getError: (state) => {
return state.error
},
getMe: (state) => {
return state.me;
}
@ -48,6 +52,9 @@ export default new Vuex.Store({
state.settings = settings;
state.settingsLoaded = true;
},
setError: function(state) {
state.error = true;
},
setMe: function(state, me) {
if(me == false) {
state.loggedIn = false;
@ -67,6 +74,8 @@ export default new Vuex.Store({
ServerService.getPublicSettings().then((res) => {
context.commit('setSettings', res.data.data)
resolve()
}).catch((res) => {
context.commit('setError')
});
})
},
@ -74,12 +83,9 @@ export default new Vuex.Store({
UserService.getTokenFromStorage();
return new Promise((resolve, reject) => {
UserService.me().then((res) => {
console.log("GET USER DATA");
context.commit('setMe', res.data.data)
}, (res) => {
context.commit('setMe', false)
console.log("DONT GET USER DATA");
console.log(res.response.data)
})
})
}