diff options
author | Cyrille Bollu <cyrpub@bollu.be> | 2022-04-14 21:08:53 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2022-06-08 11:29:19 +0000 |
commit | 50badb3fb6b6a7fa51520ce380ece09b0a181179 (patch) | |
tree | 019251a34dc4732f382f54d5122891a2ad95e54f /apps/files_sharing/src/components/SharingEntryLink.vue | |
parent | b7bce42078369fc48df8234fb8e2f110f7b6484d (diff) | |
download | nextcloud-server-50badb3fb6b6a7fa51520ce380ece09b0a181179.tar.gz nextcloud-server-50badb3fb6b6a7fa51520ce380ece09b0a181179.zip |
Various improvements related to the recent implementation of temporary passwords
for mail shares:
1- Changes style of "forgot password?" and "Back" button
2- Adds information about share password's expiration time in the emails sent.
3- Shows password expiration time in the Share menu
4- Fixes an issue when the message "Password expires..." would be shown for non email share types (which don't have temporary passswords)
5- At share's creation, password should only be sent when it's a permanent one
See also https://github.com/nextcloud/server/issues/31952
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index ee7e8d4b930..638cdf485b0 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -192,6 +192,12 @@ @submit="onPasswordSubmit"> {{ t('files_sharing', 'Enter a password') }} </ActionInput> + <ActionText v-if="isEmailShareType && passwordExpirationTime" icon="icon-info"> + {{ t('files_sharing', 'Password expires {passwordExpirationTime}', {passwordExpirationTime}) }} + </ActionText> + <ActionText v-else-if="isEmailShareType && passwordExpirationTime !== null" icon="icon-error"> + {{ t('files_sharing', 'Password expired') }} + </ActionText> <!-- password protected by Talk --> <ActionCheckbox v-if="isPasswordProtectedByTalkAvailable" @@ -461,6 +467,20 @@ export default { }, }, + passwordExpirationTime() { + if (this.share.passwordExpirationTime === null) { + return null + } + + const expirationTime = moment(this.share.passwordExpirationTime) + + if (expirationTime.diff(moment()) < 0) { + return false + } + + return expirationTime.fromNow() + }, + /** * Is Talk enabled? * |