3737 :link-shares =" linkShares"
3838 :reshare =" reshare"
3939 :shares =" shares"
40+ :placeholder =" t('files_sharing', 'Add users and teams')"
4041 @open-sharing-details =" toggleShareDetailsView" />
4142
4243 <!-- other shares list -->
5859 <h6 >{{ t('files_sharing', 'External shares') }}</h6 >
5960 <InfoIcon v-tooltip =" t('files_sharing', 'Displays shares made to outside users.')" :size =" 16" />
6061 </div >
62+ <SharingInput v-if =" !loading"
63+ :can-reshare =" canReshare"
64+ :file-info =" fileInfo"
65+ :link-shares =" linkShares"
66+ :is-external =" true"
67+ :placeholder =" t('files_sharing', 'Email, federated cloud id')"
68+ :reshare =" reshare"
69+ :shares =" shares"
70+ @open-sharing-details =" toggleShareDetailsView" />
6171 <!-- link shares list -->
6272 <SharingLinkList v-if =" !loading"
6373 ref =" linkShareList"
@@ -105,12 +115,15 @@ import { generateOcsUrl } from '@nextcloud/router'
105115import { CollectionList } from ' nextcloud-vue-collections'
106116import { ShareType } from ' @nextcloud/sharing'
107117
118+ import CloudIcon from ' vue-material-design-icons/Cloud.vue'
119+ import EmailIcon from ' vue-material-design-icons/Email.vue'
108120import InfoIcon from ' vue-material-design-icons/Information.vue'
109121
110122import axios from ' @nextcloud/axios'
111123import moment from ' @nextcloud/moment'
112124import Tooltip from ' @nextcloud/vue/dist/Directives/Tooltip.js'
113125import NcAvatar from ' @nextcloud/vue/dist/Components/NcAvatar.js'
126+ import NcInputField from ' @nextcloud/vue/dist/Components/NcInputField.js'
114127
115128import { shareWithTitle } from ' ../utils/SharedWithMe.js'
116129
@@ -125,6 +138,8 @@ import SharingLinkList from './SharingLinkList.vue'
125138import SharingList from ' ./SharingList.vue'
126139import SharingDetailsTab from ' ./SharingDetailsTab.vue'
127140
141+ import ShareDetails from ' ../mixins/ShareDetails.js'
142+
128143export default {
129144 name: ' SharingTab' ,
130145
@@ -134,8 +149,11 @@ export default {
134149
135150 components: {
136151 CollectionList,
152+ CloudIcon,
153+ EmailIcon,
137154 InfoIcon,
138155 NcAvatar,
156+ NcInputField,
139157 SharingEntryInternal,
140158 SharingEntrySimple,
141159 SharingInherited,
@@ -144,6 +162,7 @@ export default {
144162 SharingList,
145163 SharingDetailsTab,
146164 },
165+ mixins: [ShareDetails],
147166
148167 data () {
149168 return {
@@ -166,6 +185,9 @@ export default {
166185 showSharingDetailsView: false ,
167186 shareDetailsData: {},
168187 returnFocusElement: null ,
188+
189+ // external shars
190+ externalShareQuery: ' ' ,
169191 }
170192 },
171193
@@ -183,6 +205,13 @@ export default {
183205 return !! (this .fileInfo .permissions & OC .PERMISSION_SHARE )
184206 || !! (this .reshare && this .reshare .hasSharePermission && this .config .isResharingAllowed )
185207 },
208+
209+ ExternalShareIcon () {
210+ if (this .externalShareQuery .includes (' @' )) {
211+ return EmailIcon
212+ }
213+ return CloudIcon
214+ },
186215 },
187216
188217 methods: {
0 commit comments