Skip to content

Commit 027895f

Browse files
authored
Merge pull request #43325 from arublov/feature/hide-breadcrumbs-upload-and-overlap
2 parents 3f26978 + 66f55d5 commit 027895f

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

apps/files/src/components/BreadCrumbs.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
:aria-label="t('files', 'Current directory path')">
2727
<!-- Current path sections -->
2828
<NcBreadcrumb v-for="(section, index) in sections"
29+
v-show="shouldShowBreadcrumbs"
2930
:key="section.dir"
3031
v-bind="section"
3132
dir="auto"
@@ -60,6 +61,8 @@ import { defineComponent } from 'vue'
6061
6162
import { useFilesStore } from '../store/files.ts'
6263
import { usePathsStore } from '../store/paths.ts'
64+
import { useUploaderStore } from '../store/uploader.ts'
65+
import filesListWidthMixin from '../mixins/filesListWidth.ts'
6366
6467
export default defineComponent({
6568
name: 'BreadCrumbs',
@@ -78,12 +81,19 @@ export default defineComponent({
7881
},
7982
},
8083
84+
mixins: [
85+
filesListWidthMixin,
86+
],
87+
8188
setup() {
8289
const filesStore = useFilesStore()
8390
const pathsStore = usePathsStore()
91+
const uploaderStore = useUploaderStore()
92+
8493
return {
8594
filesStore,
8695
pathsStore,
96+
uploaderStore,
8797
}
8898
},
8999
@@ -113,6 +123,15 @@ export default defineComponent({
113123
}
114124
})
115125
},
126+
127+
isUploadInProgress(): boolean {
128+
return this.uploaderStore.queue.length !== 0
129+
},
130+
131+
// Hide breadcrumbs if an upload is ongoing on arrow screens
132+
shouldShowBreadcrumbs(): boolean {
133+
return this.filesListWidth < 768 && !this.isUploadInProgress
134+
},
116135
},
117136
118137
methods: {

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)