mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
feature: [F2V] Hide breadcrumbs when an upload is ongoing on narrow screen #40942
Signed-off-by: Andrii Rublov <airublev@outlook.com>
This commit is contained in:
parent
34c9bfc767
commit
c8b68ce639
1 changed files with 19 additions and 0 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue