From 379f79fff06498326ddffe04caaf06bacf0bdfc6 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 28 Jun 2024 17:13:56 +0200 Subject: [PATCH] fix(files): Add missing `emptyView` handling The interface provides this option but it was never implemented. This feature of being able to render a custom empty view message is needed for public file drops to properly show the terms of service. Signed-off-by: Ferdinand Thiessen --- apps/files/src/views/FilesList.vue | 80 ++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 26 deletions(-) diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index ca868b5d526bb..d3b79c1d952b6 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -74,32 +74,37 @@ :name="t('files', 'Loading current folder')" /> - - - - + { + const el = this.$refs.customEmptyView as HTMLDivElement + // We can cast here because "showCustomEmptyView" assets that current view is set + this.currentView!.emptyView!(el) + }) + } + }, + currentView(newView, oldView) { if (newView?.id === oldView?.id) { return @@ -679,6 +702,11 @@ export default defineComponent({ } } + &__empty-view-wrapper { + display: flex; + height: 100%; + } + &__refresh-icon { flex: 0 0 44px; width: 44px;