diff --git a/assets/App.vue b/assets/App.vue index 2f707471..938c6f06 100644 --- a/assets/App.vue +++ b/assets/App.vue @@ -7,19 +7,14 @@ - + - + @@ -39,6 +34,7 @@ import ScrollableView from "./components/ScrollableView"; import SideMenu from "./components/SideMenu"; import MobileMenu from "./components/MobileMenu"; import Search from "./components/Search"; +import ContainerTitle from "./components/ContainerTitle"; export default { name: "App", @@ -49,7 +45,8 @@ export default { ScrollableView, Splitpanes, Pane, - Search + Search, + ContainerTitle }, data() { return { @@ -86,13 +83,6 @@ export default { diff --git a/assets/__snapshots__/App.spec.js.snap b/assets/__snapshots__/App.spec.js.snap index ea6ad134..730dce3b 100644 --- a/assets/__snapshots__/App.spec.js.snap +++ b/assets/__snapshots__/App.spec.js.snap @@ -26,6 +26,7 @@ exports[` renders correctly 1`] = ` pushotherpanes="true" > diff --git a/assets/components/ContainerTitle.vue b/assets/components/ContainerTitle.vue new file mode 100644 index 00000000..a8045003 --- /dev/null +++ b/assets/components/ContainerTitle.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/assets/components/InfiniteLoader.vue b/assets/components/InfiniteLoader.vue index 1d6c222a..b8f65aa8 100644 --- a/assets/components/InfiniteLoader.vue +++ b/assets/components/InfiniteLoader.vue @@ -7,7 +7,6 @@ export default { name: "InfiniteLoader", data() { return { - scrollingParent: null, isLoading: false }; }, @@ -16,16 +15,16 @@ export default { enabled: Boolean }, mounted() { - this.scrollingParent = this.$el.closest("[data-scrolling]"); const intersectionObserver = new IntersectionObserver( async entries => { if (entries[0].intersectionRatio <= 0) return; if (this.onLoadMore && this.enabled) { - const previousHeight = this.scrollingParent.scrollHeight; + const scrollingParent = this.$el.closest("[data-scrolling]") || document.documentElement; + const previousHeight = scrollingParent.scrollHeight; this.isLoading = true; await this.onLoadMore(); this.isLoading = false; - this.$nextTick(() => (this.scrollingParent.scrollTop += this.scrollingParent.scrollHeight - previousHeight)); + this.$nextTick(() => (scrollingParent.scrollTop += scrollingParent.scrollHeight - previousHeight)); } }, { threshholds: 1 } diff --git a/assets/components/LogEventSource.vue b/assets/components/LogEventSource.vue index d3df6313..12631a34 100644 --- a/assets/components/LogEventSource.vue +++ b/assets/components/LogEventSource.vue @@ -1,7 +1,7 @@ diff --git a/assets/components/MobileMenu.vue b/assets/components/MobileMenu.vue index c6f0c8ee..2af490f7 100644 --- a/assets/components/MobileMenu.vue +++ b/assets/components/MobileMenu.vue @@ -40,12 +40,7 @@ export default { computed: { ...mapState(["containers"]), - activeContainersById() { - return this.activeContainers.reduce((map, obj) => { - map[obj.id] = obj; - return map; - }, {}); - } + ...mapGetters(["activeContainersById"]) }, methods: { ...mapActions({}) @@ -60,7 +55,7 @@ export default {