diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-01-13 12:14:25 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-01-14 17:15:02 +0100 |
commit | 897111404a3f8014b92af4e387a3561a0e8ff547 (patch) | |
tree | 17518bbbd0f0ea66442a89678b4553c15d91a7e5 /apps/files_sharing/src/components/SharingEntryLink.vue | |
parent | 092a1fb90f57639a15adc5a8e565b53debe26a8a (diff) | |
download | nextcloud-server-897111404a3f8014b92af4e387a3561a0e8ff547.tar.gz nextcloud-server-897111404a3f8014b92af4e387a3561a0e8ff547.zip |
Add "Password protected by Talk" option to shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index cc3c8c764e2..ea0f064a21d 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -195,6 +195,15 @@ {{ t('files_sharing', 'Enter a password') }} </ActionInput> + <!-- password protected by Talk --> + <ActionCheckbox v-if="isPasswordProtectedByTalkAvailable" + :checked.sync="isPasswordProtectedByTalk" + :disabled="saving" + class="share-link-password-talk-checkbox" + @change="queueUpdate('sendPasswordByTalk')"> + {{ t('files_sharing', 'Video verification') }} + </ActionCheckbox> + <!-- expiration date --> <ActionCheckbox :checked.sync="hasExpirationDate" :disabled="config.isDefaultExpireDateEnforced || saving" @@ -419,6 +428,35 @@ export default { }, /** + * Is Talk enabled? + * @returns {boolean} + */ + isTalkEnabled() { + return OC.appswebroots['spreed'] !== undefined + }, + + /** + * Is it possible to protect the password by Talk? + * @returns {boolean} + */ + isPasswordProtectedByTalkAvailable() { + return this.isPasswordProtected && this.isTalkEnabled + }, + + /** + * Is the current share password protected by Talk? + * @returns {boolean} + */ + isPasswordProtectedByTalk: { + get: function() { + return this.share.sendPasswordByTalk + }, + set: async function(enabled) { + this.share.sendPasswordByTalk = enabled + }, + }, + + /** * Is the current share an email share ? * @returns {boolean} */ |