Loading client/src/components/History/CurrentHistory/HistoryPanel.vue +9 −3 Original line number Diff line number Diff line Loading @@ -91,8 +91,13 @@ No data found for selected filter. </b-alert> </div> <Listing v-else :items="itemsLoaded" :query-key="queryKey" @scroll="onScroll"> <template v-slot:item="{ item }"> <Listing v-else :offset="listOffset" :items="itemsLoaded" :query-key="queryKey" @scroll="onScroll"> <template v-slot:item="{ item, currentOffset }"> <ContentItem v-if="!invisible[item.hid]" :id="item.hid" Loading @@ -109,7 +114,7 @@ @toggleHighlights="toggleHighlights" @update:expand-dataset="setExpanded(item, $event)" @update:selected="setSelected(item, $event)" @view-collection="$emit('view-collection', item)" @view-collection="$emit('view-collection', item, currentOffset)" @delete="onDelete(item)" @undelete="onUndelete(item)" @unhide="onUnhide(item)" /> Loading Loading @@ -165,6 +170,7 @@ export default { OperationErrorDialog, }, props: { listOffset: { type: Number, default: 0 }, history: { type: Object, required: true }, }, data() { Loading client/src/components/History/Index.vue +4 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ <div v-if="currentHistory" id="current-history-panel" class="history-index"> <CurrentHistory v-if="!breadcrumbs.length" :list-offset="listOffset" :history="currentHistory" v-on="handlers" @view-collection="onViewCollection"> Loading Loading @@ -51,10 +52,12 @@ export default { return { // list of collections we have drilled down into breadcrumbs: [], listOffset: 0, }; }, methods: { onViewCollection(collection) { onViewCollection(collection, currentOffset) { this.listOffset = currentOffset; this.breadcrumbs = [...this.breadcrumbs, collection]; }, }, Loading client/src/components/History/Layout/Listing.vue +6 −1 Original line number Diff line number Diff line Loading @@ -4,11 +4,12 @@ ref="listing" class="listing" data-key="id" :offset="offset" :data-sources="items" :data-component="{}" @scroll="onScroll"> <template v-slot:item="{ item }"> <slot name="item" :item="item" /> <slot name="item" :item="item" :current-offset="getOffset()" /> </template> <template v-slot:footer> <LoadingSpan v-if="loading" class="m-2" message="Loading" /> Loading @@ -27,6 +28,7 @@ export default { VirtualList, }, props: { offset: { type: Number, default: 0 }, loading: { type: Boolean, default: false }, items: { type: Array, default: null }, queryKey: { type: String, default: null }, Loading Loading @@ -74,6 +76,9 @@ export default { const rangeStart = this.$refs.listing.range.start; this.$emit("scroll", rangeStart); }, getOffset() { return this.$refs.listing?.getOffset() || 0; }, }, }; </script> Loading Loading
client/src/components/History/CurrentHistory/HistoryPanel.vue +9 −3 Original line number Diff line number Diff line Loading @@ -91,8 +91,13 @@ No data found for selected filter. </b-alert> </div> <Listing v-else :items="itemsLoaded" :query-key="queryKey" @scroll="onScroll"> <template v-slot:item="{ item }"> <Listing v-else :offset="listOffset" :items="itemsLoaded" :query-key="queryKey" @scroll="onScroll"> <template v-slot:item="{ item, currentOffset }"> <ContentItem v-if="!invisible[item.hid]" :id="item.hid" Loading @@ -109,7 +114,7 @@ @toggleHighlights="toggleHighlights" @update:expand-dataset="setExpanded(item, $event)" @update:selected="setSelected(item, $event)" @view-collection="$emit('view-collection', item)" @view-collection="$emit('view-collection', item, currentOffset)" @delete="onDelete(item)" @undelete="onUndelete(item)" @unhide="onUnhide(item)" /> Loading Loading @@ -165,6 +170,7 @@ export default { OperationErrorDialog, }, props: { listOffset: { type: Number, default: 0 }, history: { type: Object, required: true }, }, data() { Loading
client/src/components/History/Index.vue +4 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ <div v-if="currentHistory" id="current-history-panel" class="history-index"> <CurrentHistory v-if="!breadcrumbs.length" :list-offset="listOffset" :history="currentHistory" v-on="handlers" @view-collection="onViewCollection"> Loading Loading @@ -51,10 +52,12 @@ export default { return { // list of collections we have drilled down into breadcrumbs: [], listOffset: 0, }; }, methods: { onViewCollection(collection) { onViewCollection(collection, currentOffset) { this.listOffset = currentOffset; this.breadcrumbs = [...this.breadcrumbs, collection]; }, }, Loading
client/src/components/History/Layout/Listing.vue +6 −1 Original line number Diff line number Diff line Loading @@ -4,11 +4,12 @@ ref="listing" class="listing" data-key="id" :offset="offset" :data-sources="items" :data-component="{}" @scroll="onScroll"> <template v-slot:item="{ item }"> <slot name="item" :item="item" /> <slot name="item" :item="item" :current-offset="getOffset()" /> </template> <template v-slot:footer> <LoadingSpan v-if="loading" class="m-2" message="Loading" /> Loading @@ -27,6 +28,7 @@ export default { VirtualList, }, props: { offset: { type: Number, default: 0 }, loading: { type: Boolean, default: false }, items: { type: Array, default: null }, queryKey: { type: String, default: null }, Loading Loading @@ -74,6 +76,9 @@ export default { const rangeStart = this.$refs.listing.range.start; this.$emit("scroll", rangeStart); }, getOffset() { return this.$refs.listing?.getOffset() || 0; }, }, }; </script> Loading