diff options
author | Andrii Rublov <airublev@outlook.com> | 2024-02-04 00:27:31 +0000 |
---|---|---|
committer | Andrii Rublov <github.a@rublov.me> | 2024-02-25 13:40:13 +0100 |
commit | c8b68ce639f8326aa5f85fc61f44c0f5dc617d37 (patch) | |
tree | 07160550c543dc2ce0ea50044d231417430cbf68 /apps/files | |
parent | 34c9bfc767e1bafa7c708318e4050a5f4c9a772b (diff) | |
download | nextcloud-server-c8b68ce639f8326aa5f85fc61f44c0f5dc617d37.tar.gz nextcloud-server-c8b68ce639f8326aa5f85fc61f44c0f5dc617d37.zip |
feature: [F2V] Hide breadcrumbs when an upload is ongoing on narrow screen #40942
Signed-off-by: Andrii Rublov <airublev@outlook.com>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/components/BreadCrumbs.vue | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/files/src/components/BreadCrumbs.vue b/apps/files/src/components/BreadCrumbs.vue index 0975f1a6446..98d904d8f5b 100644 --- a/apps/files/src/components/BreadCrumbs.vue +++ b/apps/files/src/components/BreadCrumbs.vue @@ -26,6 +26,7 @@ :aria-label="t('files', 'Current directory path')"> <!-- Current path sections --> <NcBreadcrumb v-for="(section, index) in sections" + v-show="shouldShowBreadcrumbs" :key="section.dir" v-bind="section" dir="auto" @@ -60,6 +61,8 @@ import { defineComponent } from 'vue' import { useFilesStore } from '../store/files.ts' import { usePathsStore } from '../store/paths.ts' +import { useUploaderStore } from '../store/uploader.ts' +import filesListWidthMixin from '../mixins/filesListWidth.ts' export default defineComponent({ name: 'BreadCrumbs', @@ -78,12 +81,19 @@ export default defineComponent({ }, }, + mixins: [ + filesListWidthMixin, + ], + setup() { const filesStore = useFilesStore() const pathsStore = usePathsStore() + const uploaderStore = useUploaderStore() + return { filesStore, pathsStore, + uploaderStore, } }, @@ -113,6 +123,15 @@ export default defineComponent({ } }) }, + + uploadInProgress(): boolean { + return this.uploaderStore.queue.length !== 0 + }, + + shouldShowBreadcrumbs(): boolean { + return this.filesListWidth < 768 && !this.uploadInProgress + }, + }, methods: { |