mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 10:05:46 +01:00
Fix bug
This commit is contained in:
parent
1a2229f886
commit
30f2da4215
5 changed files with 13 additions and 13 deletions
|
@ -27,7 +27,7 @@
|
||||||
</component>
|
</component>
|
||||||
|
|
||||||
<footer v-if="more">
|
<footer v-if="more">
|
||||||
<button @click="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
|
<button @click="fetchMore()" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
|
||||||
<template v-if="!moreFetching">{{ $t('@.load-more') }}</template>
|
<template v-if="!moreFetching">{{ $t('@.load-more') }}</template>
|
||||||
<template v-if="moreFetching"><fa icon="spinner" pulse fixed-width/></template>
|
<template v-if="moreFetching"><fa icon="spinner" pulse fixed-width/></template>
|
||||||
</button>
|
</button>
|
||||||
|
@ -129,7 +129,7 @@ export default Vue.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
more() {
|
fetchMore() {
|
||||||
if (!this.more || this.moreFetching) return;
|
if (!this.more || this.moreFetching) return;
|
||||||
this.moreFetching = true;
|
this.moreFetching = true;
|
||||||
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
|
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
|
||||||
|
@ -180,7 +180,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onBottom() {
|
onBottom() {
|
||||||
this.more();
|
this.fetchMore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</component>
|
</component>
|
||||||
|
|
||||||
<footer v-if="more">
|
<footer v-if="more">
|
||||||
<button @click="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
|
<button @click="fetchMore()" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
|
||||||
<template v-if="!moreFetching">{{ $t('@.load-more') }}</template>
|
<template v-if="!moreFetching">{{ $t('@.load-more') }}</template>
|
||||||
<template v-if="moreFetching"><fa icon="spinner" pulse fixed-width/></template>
|
<template v-if="moreFetching"><fa icon="spinner" pulse fixed-width/></template>
|
||||||
</button>
|
</button>
|
||||||
|
@ -122,7 +122,7 @@ export default Vue.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
more() {
|
fetchMore() {
|
||||||
if (!this.more || this.moreFetching) return;
|
if (!this.more || this.moreFetching) return;
|
||||||
this.moreFetching = true;
|
this.moreFetching = true;
|
||||||
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
|
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
|
||||||
|
@ -182,7 +182,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
if (this.$store.state.settings.fetchOnScroll !== false) {
|
if (this.$store.state.settings.fetchOnScroll !== false) {
|
||||||
const current = window.scrollY + window.innerHeight;
|
const current = window.scrollY + window.innerHeight;
|
||||||
if (current > document.body.offsetHeight - 8) this.more();
|
if (current > document.body.offsetHeight - 8) this.fetchMore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
</template>
|
</template>
|
||||||
</sequential-entrance>
|
</sequential-entrance>
|
||||||
<div class="more" v-if="existMore">
|
<div class="more" v-if="existMore">
|
||||||
<ui-button inline @click="more">{{ $t('@.load-more') }}</ui-button>
|
<ui-button inline @click="fetchMore()">{{ $t('@.load-more') }}</ui-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -48,7 +48,7 @@ export default Vue.extend({
|
||||||
Progress.done();
|
Progress.done();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
more() {
|
fetchMore() {
|
||||||
this.moreFetching = true;
|
this.moreFetching = true;
|
||||||
this.$root.api('i/favorites', {
|
this.$root.api('i/favorites', {
|
||||||
limit: 11,
|
limit: 11,
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</component>
|
</component>
|
||||||
|
|
||||||
<footer v-if="more">
|
<footer v-if="more">
|
||||||
<button @click="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
|
<button @click="fetchMore()" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
|
||||||
<template v-if="!moreFetching">{{ $t('@.load-more') }}</template>
|
<template v-if="!moreFetching">{{ $t('@.load-more') }}</template>
|
||||||
<template v-if="moreFetching"><fa icon="spinner" pulse fixed-width/></template>
|
<template v-if="moreFetching"><fa icon="spinner" pulse fixed-width/></template>
|
||||||
</button>
|
</button>
|
||||||
|
@ -123,7 +123,7 @@ export default Vue.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
more() {
|
fetchMore() {
|
||||||
if (!this.more || this.moreFetching) return;
|
if (!this.more || this.moreFetching) return;
|
||||||
this.moreFetching = true;
|
this.moreFetching = true;
|
||||||
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
|
this.makePromise(this.notes[this.notes.length - 1].id).then(x => {
|
||||||
|
@ -181,7 +181,7 @@ export default Vue.extend({
|
||||||
if (this.$el.offsetHeight == 0) return;
|
if (this.$el.offsetHeight == 0) return;
|
||||||
|
|
||||||
const current = window.scrollY + window.innerHeight;
|
const current = window.scrollY + window.innerHeight;
|
||||||
if (current > document.body.offsetHeight - 8) this.more();
|
if (current > document.body.offsetHeight - 8) this.fetchMore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<mk-note-detail class="post" :note="favorite.note" :key="favorite.note.id"/>
|
<mk-note-detail class="post" :note="favorite.note" :key="favorite.note.id"/>
|
||||||
</template>
|
</template>
|
||||||
</sequential-entrance>
|
</sequential-entrance>
|
||||||
<ui-button v-if="existMore" @click="more">{{ $t('@.load-more') }}</ui-button>
|
<ui-button v-if="existMore" @click="fetchMore()">{{ $t('@.load-more') }}</ui-button>
|
||||||
</main>
|
</main>
|
||||||
</mk-ui>
|
</mk-ui>
|
||||||
</template>
|
</template>
|
||||||
|
@ -53,7 +53,7 @@ export default Vue.extend({
|
||||||
Progress.done();
|
Progress.done();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
more() {
|
fetchMore() {
|
||||||
this.moreFetching = true;
|
this.moreFetching = true;
|
||||||
this.$root.api('i/favorites', {
|
this.$root.api('i/favorites', {
|
||||||
limit: 11,
|
limit: 11,
|
||||||
|
|
Loading…
Reference in a new issue