1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

Changes scroll progress to behave differently when fetching scroll back content. (#640)

This commit is contained in:
Amir Raminfar
2020-08-19 12:47:28 -07:00
committed by GitHub
parent 0c2e2430fd
commit b148367618
10 changed files with 158 additions and 56 deletions

View File

@@ -60,6 +60,7 @@ export default {
async loadOlderLogs() {
if (this.messages.length < 300) return;
this.$emit("loading-more", true);
const to = this.messages[0].date;
const last = this.messages[299].date;
const delta = to - last;
@@ -74,6 +75,7 @@ export default {
.map((line) => this.parseMessage(line));
this.messages.unshift(...newMessages);
}
this.$emit("loading-more", false);
},
parseMessage(data) {
let i = data.indexOf(" ");