131131 :open.sync =" open"
132132 @close =" onMenuClose" >
133133 <template v-if =" share " >
134- <template v-if =" share .canEdit && canReshare " >
135- <!-- Custom Label -->
136- <ActionInput
137- ref =" label"
138- v-tooltip.auto =" {
139- content: errors.label,
140- show: errors.label,
141- trigger: 'manual',
142- defaultContainer: '.app-sidebar'
143- }"
144- :class =" { error: errors.label }"
145- :disabled =" saving"
146- :aria-label =" t('files_sharing', 'Share label')"
147- :value =" share.newLabel !== undefined ? share.newLabel : share.label"
148- icon =" icon-edit"
149- maxlength =" 255"
150- @update:value =" onLabelChange"
151- @submit =" onLabelSubmit" >
152- {{ t('files_sharing', 'Share label') }}
153- </ActionInput >
154- <!-- folder -->
155- <template v-if =" isFolder && fileHasCreatePermission && config .isPublicUploadEnabled " >
156- <ActionRadio :checked =" sharePermissions === publicUploadRValue"
157- :value =" publicUploadRValue"
158- :name =" randomId"
159- :disabled =" saving"
160- @change =" togglePermissions" >
161- {{ t('files_sharing', 'Read only') }}
162- </ActionRadio >
163- <ActionRadio :checked =" sharePermissions === publicUploadRWValue"
164- :value =" publicUploadRWValue"
165- :disabled =" saving"
166- :name =" randomId"
167- @change =" togglePermissions" >
168- {{ t('files_sharing', 'Allow upload and editing') }}
169- </ActionRadio >
170- <ActionRadio :checked =" sharePermissions === publicUploadWValue"
171- :value =" publicUploadWValue"
172- :disabled =" saving"
173- :name =" randomId"
174- class =" sharing-entry__action--public-upload"
175- @change =" togglePermissions" >
176- {{ t('files_sharing', 'File drop (upload only)') }}
177- </ActionRadio >
178- </template >
179-
180- <!-- file -->
181- <ActionCheckbox v-else
182- :checked.sync =" canUpdate"
183- :disabled =" saving"
184- @change =" queueUpdate('permissions')" >
185- {{ t('files_sharing', 'Allow editing') }}
186- </ActionCheckbox >
187-
188- <ActionCheckbox
189- :checked.sync =" share.hideDownload"
190- :disabled =" saving"
191- @change =" queueUpdate('hideDownload')" >
192- {{ t('files_sharing', 'Hide download') }}
193- </ActionCheckbox >
194-
195- <!-- password -->
196- <ActionCheckbox :checked.sync =" isPasswordProtected"
197- :disabled =" config.enforcePasswordForPublicLink || saving"
198- class =" share-link-password-checkbox"
199- @uncheck =" onPasswordDisable" >
200- {{ config.enforcePasswordForPublicLink
201- ? t('files_sharing', 'Password protection (enforced)')
202- : t('files_sharing', 'Password protect') }}
203- </ActionCheckbox >
204- <ActionInput v-if =" isPasswordProtected"
205- ref =" password"
206- v-tooltip.auto =" {
207- content: errors.password,
208- show: errors.password,
209- trigger: 'manual',
210- defaultContainer: '#app-sidebar'
211- }"
212- class =" share-link-password"
213- :class =" { error: errors.password}"
214- :disabled =" saving"
215- :required =" config.enforcePasswordForPublicLink"
216- :value =" hasUnsavedPassword ? share.newPassword : '***************'"
217- icon =" icon-password"
218- autocomplete =" new-password"
219- :type =" hasUnsavedPassword ? 'text': 'password'"
220- @update:value =" onPasswordChange"
221- @submit =" onPasswordSubmit" >
222- {{ t('files_sharing', 'Enter a password') }}
223- </ActionInput >
224-
225- <!-- password protected by Talk -->
226- <ActionCheckbox v-if =" isPasswordProtectedByTalkAvailable"
227- :checked.sync =" isPasswordProtectedByTalk"
228- :disabled =" !canTogglePasswordProtectedByTalkAvailable || saving"
229- class =" share-link-password-talk-checkbox"
230- @change =" onPasswordProtectedByTalkChange" >
231- {{ t('files_sharing', 'Video verification') }}
232- </ActionCheckbox >
233-
234- <!-- expiration date -->
235- <ActionCheckbox :checked.sync =" hasExpirationDate"
236- :disabled =" config.isDefaultExpireDateEnforced || saving"
237- class =" share-link-expire-date-checkbox"
238- @uncheck =" onExpirationDisable" >
239- {{ config.isDefaultExpireDateEnforced
240- ? t('files_sharing', 'Expiration date (enforced)')
241- : t('files_sharing', 'Set expiration date') }}
242- </ActionCheckbox >
243- <ActionInput v-if =" hasExpirationDate"
244- ref =" expireDate"
245- v-tooltip.auto =" {
246- content: errors.expireDate,
247- show: errors.expireDate,
248- trigger: 'manual',
249- defaultContainer: '#app-sidebar'
250- }"
251- class =" share-link-expire-date"
252- :class =" { error: errors.expireDate}"
253- :disabled =" saving"
254- :first-day-of-week =" firstDay"
255- :lang =" lang"
256- :value =" share.expireDate"
257- value-type =" format"
258- icon =" icon-calendar-dark"
259- type =" date"
260- :disabled-date =" disabledDate"
261- @update:value =" onExpirationChange" >
262- {{ t('files_sharing', 'Enter a date') }}
263- </ActionInput >
264-
265- <!-- note -->
266- <ActionCheckbox :checked.sync =" hasNote"
267- :disabled =" saving"
268- @uncheck =" queueUpdate('note')" >
269- {{ t('files_sharing', 'Note to recipient') }}
270- </ActionCheckbox >
271- <ActionTextEditable v-if =" hasNote"
272- ref =" note"
273- v-tooltip.auto =" {
274- content: errors.note,
275- show: errors.note,
276- trigger: 'manual',
277- defaultContainer: '#app-sidebar'
278- }"
279- :class =" { error: errors.note}"
280- :disabled =" saving"
281- :placeholder =" t('files_sharing', 'Enter a note for the share recipient')"
282- :value =" share.newNote || share.note"
283- icon =" icon-edit"
284- @update:value =" onNoteChange"
285- @submit =" onNoteSubmit" />
286- </template >
287-
288134 <!-- external sharing via url (social...) -->
289135 <ActionLink v-for =" ({icon, url, name}, index) in externalActions"
290136 :key =" index"
293139 target =" _blank" >
294140 {{ name }}
295141 </ActionLink >
142+ <ActionButton v-if =" share.canEdit"
143+ icon =" icon-settings"
144+ :disabled =" saving"
145+ @click.prevent =" editPermissions" >
146+ {{ t('files_sharing', 'Advanced permission') }}
147+ </ActionButton >
148+ <ActionButton v-if =" share.canEdit"
149+ icon =" icon-mail"
150+ :disabled =" saving"
151+ @click.prevent =" editNotes" >
152+ {{ t('files_sharing', 'Send new mail') }}
153+ </ActionButton >
296154
297155 <ActionButton v-if =" share.canDelete"
298156 icon =" icon-close"
@@ -328,10 +186,8 @@ import Vue from 'vue'
328186
329187import ActionButton from ' @nextcloud/vue/dist/Components/ActionButton'
330188import ActionCheckbox from ' @nextcloud/vue/dist/Components/ActionCheckbox'
331- import ActionRadio from ' @nextcloud/vue/dist/Components/ActionRadio'
332189import ActionInput from ' @nextcloud/vue/dist/Components/ActionInput'
333190import ActionText from ' @nextcloud/vue/dist/Components/ActionText'
334- import ActionTextEditable from ' @nextcloud/vue/dist/Components/ActionTextEditable'
335191import ActionLink from ' @nextcloud/vue/dist/Components/ActionLink'
336192import Actions from ' @nextcloud/vue/dist/Components/Actions'
337193import Avatar from ' @nextcloud/vue/dist/Components/Avatar'
@@ -348,11 +204,9 @@ export default {
348204 Actions,
349205 ActionButton,
350206 ActionCheckbox,
351- ActionRadio,
352207 ActionInput,
353208 ActionLink,
354209 ActionText,
355- ActionTextEditable,
356210 Avatar,
357211 },
358212
@@ -397,8 +251,6 @@ export default {
397251 },
398252 /**
399253 * Generate a unique random id for this SharingEntryLink only
400- * This allows ActionRadios to have the same name prop
401- * but not to impact others SharingEntryLink
402254 * @returns {string}
403255 */
404256 randomId () {
@@ -898,8 +750,19 @@ export default {
898750 // YET. We can safely delete the share :)
899751 this .$emit (' remove:share' , this .share )
900752 },
901- },
902753
754+ editPermissions () {
755+ this .$store .commit (' addFromInput' , false )
756+ this .$store .commit (' addShare' , this .share )
757+ this .$store .commit (' addCurrentTab' , ' permissions' )
758+ },
759+
760+ editNotes () {
761+ this .$store .commit (' addFromInput' , false )
762+ this .$store .commit (' addShare' , this .share )
763+ this .$store .commit (' addCurrentTab' , ' notes' )
764+ },
765+ },
903766}
904767 </script >
905768
0 commit comments