- Fixed scroll trigger and error message

This commit is contained in:
Alexis
2020-06-28 23:13:47 +02:00
parent eadbaa53ac
commit f8a1a9e73f
2 changed files with 4 additions and 3 deletions

View File

@@ -39,7 +39,7 @@
<div
class="row spells-list"
v-masonry
transition-duration=".5s"
transition-duration="1s"
item-selector=".spell-card">
<spell-card
class="spell-card"
@@ -131,7 +131,7 @@ export default {
},
scroll() {
window.onscroll = () => {
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
if (((window.innerHeight + window.scrollY) - document.body.offsetHeight) >= -1) {
Spells.getPage(this.currentIndex)
.then(v => {
this.loading = true
@@ -160,6 +160,7 @@ export default {
cancelAdd() {
this.adding_spell = false
},
// Receives events to update the data
addSpell(e) {
Spells.getOne(e.id)
.then(v => {

View File

@@ -60,7 +60,7 @@ class SchoolRepository {
})
.catch(err => {
console.log(err)
reject(new HttpError(500, "Couldn't get school"))
reject(new HttpError(500, "Couldn't get spells from school"))
})
})
}