66 <NcActions class =" entry-action entry-action__image-upload"
77 :data-text-action-entry =" actionEntry.key"
88 :name =" actionEntry.label"
9- :title =" actionEntry.label"
9+ :disabled =" isUploadDisabled"
10+ :title =" menuTitle"
1011 :aria-label =" actionEntry.label"
1112 :container =" menuIDSelector" >
1213 <template #icon >
4041<script >
4142import { NcActions , NcActionButton } from ' @nextcloud/vue'
4243import { Loading , Folder , Upload } from ' ../icons.js'
43- import { useIsPublicMixin , useEditorUpload } from ' ../Editor.provider.js'
44+ import {
45+ useIsPublicMixin ,
46+ useEditorUpload ,
47+ useSyncServiceMixin ,
48+ } from ' ../Editor.provider.js'
4449import { BaseActionEntry } from ' ./BaseActionEntry.js'
4550import { useMenuIDMixin } from ' ./MenuBar.provider.js'
4651import {
@@ -62,6 +67,7 @@ export default {
6267 mixins: [
6368 useIsPublicMixin,
6469 useEditorUpload,
70+ useSyncServiceMixin,
6571 useActionAttachmentPromptMixin,
6672 useUploadingStateMixin,
6773 useActionChooseLocalAttachmentMixin,
@@ -76,6 +82,17 @@ export default {
7682 isUploadingAttachments () {
7783 return this .$uploadingState .isUploadingAttachments
7884 },
85+ isUploadDisabled () {
86+ return ! this .$syncService .hasOwner
87+ },
88+ menuTitle () {
89+ return this .isUploadDisabled
90+ ? t (
91+ ' text' ,
92+ ' Attachments cannot be created or uploaded because this file is shared from another cloud.' ,
93+ )
94+ : this .actionEntry .label
95+ },
7996 },
8097}
8198 </script >
0 commit comments