diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-02-05 11:22:50 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-06 14:49:30 +0200 |
commit | 2ff1c00f556633c9c36a9328d4eb77eba2dd25e7 (patch) | |
tree | 06759b005be00891a5709f43de3ec97a0b7e83eb /apps/files/src/components/BreadCrumbs.vue | |
parent | 638b3dffa3de2c948b966e0575b9af85a3ed54d0 (diff) | |
download | nextcloud-server-2ff1c00f556633c9c36a9328d4eb77eba2dd25e7.tar.gz nextcloud-server-2ff1c00f556633c9c36a9328d4eb77eba2dd25e7.zip |
fix(files_trashbin): previews crop support
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/components/BreadCrumbs.vue')
-rw-r--r-- | apps/files/src/components/BreadCrumbs.vue | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/apps/files/src/components/BreadCrumbs.vue b/apps/files/src/components/BreadCrumbs.vue index 7d7ebc7f1b3..8da486392f5 100644 --- a/apps/files/src/components/BreadCrumbs.vue +++ b/apps/files/src/components/BreadCrumbs.vue @@ -4,7 +4,8 @@ <NcBreadcrumb v-for="section in sections" :key="section.dir" :aria-label="t('files', `Go to the '{dir}' directory`, section)" - v-bind="section" /> + v-bind="section" + @click="onClick(section.to)" /> </NcBreadcrumbs> </template> @@ -32,7 +33,9 @@ export default Vue.extend({ computed: { dirs() { const cumulativePath = (acc) => (value) => (acc += `${value}/`) - return ['/', ...this.path.split('/').filter(Boolean).map(cumulativePath('/'))] + const paths = this.path.split('/').filter(Boolean).map(cumulativePath('/')) + // Strip away trailing slash + return ['/', ...paths.map(path => path.replace(/^(.+)\/$/, '$1'))] }, sections() { @@ -46,6 +49,15 @@ export default Vue.extend({ }) }, }, + + methods: { + onClick(to) { + debugger + if (to?.query?.dir === this.$route.query.dir) { + alert('You are already here!') + } + }, + }, }) </script> @@ -54,6 +66,10 @@ export default Vue.extend({ // Take as much space as possible flex: 1 1 100% !important; width: 100%; + + ::v-deep a { + cursor: pointer !important; + } } </style> |