88 <!-- Current folder breadcrumbs -->
99 <BreadCrumbs :path =" directory" @reload =" fetchContent" >
1010 <template #actions >
11- <!-- Sharing button -->
12- <NcButton
13- v-if =" canShare && !isNarrow"
14- :aria-label =" shareButtonLabel"
15- :class =" { 'files-list__header-share-button--shared': shareButtonType }"
16- :title =" shareButtonLabel"
17- class =" files-list__header-share-button"
18- variant =" tertiary"
19- @click =" openSharingSidebar" >
20- <template #icon >
21- <LinkIcon v-if =" shareButtonType === ShareType.Link" />
22- <AccountPlusIcon v-else :size =" 20" />
23- </template >
24- </NcButton >
25-
2611 <!-- Uploader -->
2712 <UploadPicker
2813 v-if =" canUpload && !isQuotaExceeded && currentFolder"
@@ -168,7 +153,6 @@ import type { Route } from 'vue-router'
168153import type { UserConfig } from ' ../types.ts'
169154
170155import { getCurrentUser } from ' @nextcloud/auth'
171- import { getCapabilities } from ' @nextcloud/capabilities'
172156import { showError , showSuccess , showWarning } from ' @nextcloud/dialogs'
173157import { emit , subscribe , unsubscribe } from ' @nextcloud/event-bus'
174158import { Folder , getFileListActions , Permission , sortNodes } from ' @nextcloud/files'
@@ -188,10 +172,8 @@ import NcButton from '@nextcloud/vue/components/NcButton'
188172import NcEmptyContent from ' @nextcloud/vue/components/NcEmptyContent'
189173import NcIconSvgWrapper from ' @nextcloud/vue/components/NcIconSvgWrapper'
190174import NcLoadingIcon from ' @nextcloud/vue/components/NcLoadingIcon'
191- import AccountPlusIcon from ' vue-material-design-icons/AccountPlusOutline.vue'
192175import IconAlertCircleOutline from ' vue-material-design-icons/AlertCircleOutline.vue'
193176import ListViewIcon from ' vue-material-design-icons/FormatListBulletedSquare.vue'
194- import LinkIcon from ' vue-material-design-icons/Link.vue'
195177import IconReload from ' vue-material-design-icons/Reload.vue'
196178import ViewGridIcon from ' vue-material-design-icons/ViewGridOutline.vue'
197179import BreadCrumbs from ' ../components/BreadCrumbs.vue'
@@ -215,8 +197,6 @@ import { humanizeWebDAVError } from '../utils/davUtils.ts'
215197import { defaultView } from ' ../utils/filesViews.ts'
216198import { getSummaryFor } from ' ../utils/fileUtils.ts'
217199
218- const isSharingEnabled = (getCapabilities () as { files_sharing? : boolean })?.files_sharing !== undefined
219-
220200export default defineComponent ({
221201 name: ' FilesList' ,
222202
@@ -225,7 +205,6 @@ export default defineComponent({
225205 DragAndDropNotice ,
226206 FileListFilters ,
227207 FilesListVirtual ,
228- LinkIcon ,
229208 ListViewIcon ,
230209 NcAppContent ,
231210 NcActions ,
@@ -234,7 +213,6 @@ export default defineComponent({
234213 NcEmptyContent ,
235214 NcIconSvgWrapper ,
236215 NcLoadingIcon ,
237- AccountPlusIcon ,
238216 UploadPicker ,
239217 ViewGridIcon ,
240218 IconAlertCircleOutline ,
@@ -436,37 +414,6 @@ export default defineComponent({
436414 return { ... this .$route , query: { dir } }
437415 },
438416
439- shareTypesAttributes(): number [] | undefined {
440- if (! this .currentFolder ?.attributes ?.[' share-types' ]) {
441- return undefined
442- }
443- return Object .values (this .currentFolder ?.attributes ?.[' share-types' ] || {}).flat () as number []
444- },
445-
446- shareButtonLabel() {
447- if (! this .shareTypesAttributes ) {
448- return t (' files' , ' Share' )
449- }
450-
451- if (this .shareButtonType === ShareType .Link ) {
452- return t (' files' , ' Shared by link' )
453- }
454- return t (' files' , ' Shared' )
455- },
456-
457- shareButtonType(): ShareType | null {
458- if (! this .shareTypesAttributes ) {
459- return null
460- }
461-
462- // If all types are links, show the link icon
463- if (this .shareTypesAttributes .some ((type ) => type === ShareType .Link )) {
464- return ShareType .Link
465- }
466-
467- return ShareType .User
468- },
469-
470417 gridViewButtonLabel() {
471418 return this .userConfig .grid_view
472419 ? t (' files' , ' Switch to list view' )
@@ -484,14 +431,6 @@ export default defineComponent({
484431 return this .currentFolder ?.attributes ?.[' quota-available-bytes' ] === 0
485432 },
486433
487- /**
488- * Check if current folder has share permissions
489- */
490- canShare() {
491- return isSharingEnabled && ! this .isPublic
492- && this .currentFolder && (this .currentFolder .permissions & Permission .SHARE ) !== 0
493- },
494-
495434 showCustomEmptyView() {
496435 return ! this .loading && this .isEmptyDir && this .currentView ?.emptyView !== undefined
497436 },
@@ -763,15 +702,6 @@ export default defineComponent({
763702 }
764703 },
765704
766- openSharingSidebar() {
767- if (! this .currentFolder ) {
768- logger .debug (' No current folder found for opening sharing sidebar' )
769- return
770- }
771-
772- this .sidebar .open (this .currentFolder , ' sharing' )
773- },
774-
775705 toggleGridView() {
776706 this .userConfigStore .update (' grid_view' , ! this .userConfig .grid_view )
777707 },
@@ -865,14 +795,6 @@ export default defineComponent({
865795 flex : 0 0 ;
866796 }
867797
868- & -share-button {
869- color : var (--color-text-maxcontrast ) !important ;
870-
871- & --shared {
872- color : var (--color-main-text ) !important ;
873- }
874- }
875-
876798 & -actions {
877799 min-width : fit-content !important ;
878800 margin-inline : calc (var (--default-grid-baseline ) * 2 );
0 commit comments