aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src
Commit message (Collapse)AuthorAgeFilesLines
* fix(share): Send empty expireDate when not expireDate setfenn-cs2024-04-081-4/+2
| | | | | | | | | | | | When creating a new share, if the user unchecks "Set expiry date" no `expireDate` is sent to the server. However, the server then assumes the default configured, hence better to send an empty value. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* fix(files_sharing): Create passwords when enforced for mail sharesFerdinand Thiessen2024-04-032-10/+7
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: No password set for new mail sharesfenn-cs2024-03-141-1/+1
| | | | | | | | | | | | Before the password is set on a new share, the computed property `hasUnsavedPassword` is used to check that `this.share.newPassword` is not undefined. Direct assignment without using Vue's `this.$set` makes it impossible for vue to detect that changes have happened on the share object. Hence the inreactivity. This worked initially most likely because `this.share.newPassword = await GeneratePassword()` was executed before the computed properties where evaluated. Resolves : https://github.com/nextcloud/server/issues/43919 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Fix undefined share object during expirationDate updatefenn-cs2024-02-211-1/+1
| | | | | | | | | | | | In 04e87337211351127cd02a0404936de8cb1b0837 a regression was introduced. `this` means nothing inside arrow functions, hence this.share was referring to an undefined object and so all attempted updates for expiration dates would fail. Resolves : https://github.com/nextcloud/server/issues/43256 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Allow user to finish typing date before formattingfenn-cs2024-02-131-3/+2
| | | | | | | Debounce `onExpirationChange` to avoid calling `formatDateToString` on invalid on uncompletely inputed date strings. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Tooltip outside click, should abort share creationfenn-cs2024-02-131-1/+1
| | | | | | | It's unexpected that click outside a tooltip would proceed with the action that could be carried out inside the tooltip. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* fix(sharing): Move video verification option to password and hide without TalkJoas Schilling2024-02-131-7/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use `@nextcloud/capabilities` to obtain share api defaultsfenn-cs2024-02-041-12/+9
| | | | | | | | - Remove redundant initial state added - Call `getCapabilities()` in share config file. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Consider admin defaults when creating sharesfenn-cs2024-02-042-12/+33
| | | | | | | | | | The current share logic always uses the default `BUNDLED_PERMISSIONS.ALL` which includes everything. This commit updates share creation logic to use `defaultPermissions` if set by admin for the creation of new shares. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Remove `newPassword` from share model, if disabledfenn-cs2024-01-151-3/+7
| | | | | | | | | | It's important to delete the `newPassword` prop from the share model, if the user unchecks the isPasswordProtected checkbox. This clearer and allows for the unchecking to actually work as `this.$set()` fails with the falsy value `''`. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Create element reference inside $nextTick()fenn-cs2024-01-151-7/+6
| | | | | | | | Accessing `this.$refs.shareList` outside $nextTick() could lead to the holder (`listComponent`) being undefined as the ref is yet to exist. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Improve share logic for enforced password & expiry datefenn-cs2023-11-303-33/+37
| | | | | | | | | | | | | | | * It's possible for the admin to enforce and expiry date after, some shares have been created. This commit makes possible to update the share with the new admin constraints. * This commit would users to modify enforced expiry to anything within range and less than the enforced limit in the pre-create dialog for public shares. * This commit fixes, unable to update share without updating password. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* fix(a11y): Focus on sharing quick permission radioChristopher Ng2023-11-301-1/+6
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* fix: Change scroll container for sharing detailsJulius Härtl2023-11-302-162/+177
| | | | | | | | | | | | In order to meet accessibility requirements we cannot use a sticky footer that overlaps important interactable content. Therefore this moves to a scroll container for the details which does not include the action buttons at the bottom. Larger indentation change in SharingDetailsTab was required to have a wrapping container for the scroll area. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Replace "Update" with "Edit"Jérôme Herbinet2023-11-291-2/+2
| | | | | Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Fix icons for bundled perms in sharing detailsfenn-cs2023-11-251-10/+5
| | | | | | | | It appears `NcCheckboxRadioSwitch` does not take icons via `<template #icon>` (at least not anymore) but two options in the bundled perms still used that and that has been fixed in this commit. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* fix(files_sharing): permissions translationGrigorii K. Shartsev2023-11-251-21/+20
| | | | Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
* Fix dupblicate sharing optionfenn-cs2023-10-281-3/+0
| | | | | | | Allow download was duplicated via a rebase/merge action during fe78157b77675b2fdc9eb5abfe0d530727fdddd8 this fixes that. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Do not treat `isDefaultExpireDateEnforced` as fallbackfenn-cs2023-10-281-2/+2
| | | | | | | | | | | | | | | | `isDefaultExpireDateEnforced` and its corresponding `defaultExpirationDate` is currently treated as the enforcement fallback when share type enforcements are not set. However, `isDefaultExpireDateEnforced` and `defaultExpirationDate` are actually more like `isDefaultPublicExpireDateEnforced` and `defaultPublicExpirationDate` and therefore only applies to public shares. It might be ideal to rename this variables all the way from the backend config to the way we use them in the frontend code. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Fix has expiration date logicfenn-cs2023-10-281-15/+12
| | | | | | | | | | | Current expiration date errorneously assumes that `defaultExpirationDate` applies to all kinds of shares. But it only really applies to public shares despite its name. This commit, fixes that by paring expiration dates with the correct share types during new share initialization and simplifying the `hasExpirationDate` (check) property. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Check expiry enforcement for all share typesfenn-cs2023-10-281-7/+7
| | | | | | | | We should check that a maximum expiry date has been enforced for all shares and NOT JUST FOR internal shares before enforcing a UI max date, like in commit 9757e680e2f643fe19432255c4142e96fbc88df5 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Allow share expiry dates lower than enforced limitsfenn-cs2023-10-281-8/+12
| | | | | | | | | | | | | | | Previously, users could change the share expiry date up to the enforced maximum. The new share flow imposed the enforced share expiry date maximum literally and did not allow even dates lower than the maximum enforced. That does not make much sense, if the enforced expiry date is 30 days from creation date, then it's logical to allow users set the date to anything less than 30 days from the creation date. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Fixed mixed translations in sharing detailsfenn-cs2023-10-101-16/+19
| | | | | | | | | | | Due to a typo in the app passed to the translation method, some strings translations don't work. This commit corrects the spelling `file_sharing` to `files_sharing` and hence resolves : https://github.com/nextcloud/server/issues/40801 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* enh(a11y): Add label to share note textboxChristopher Ng2023-10-091-1/+4
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Correct check for enabled expiration datefenn-cs2023-10-091-3/+9
| | | | | | | | | | | | | | The default expiration date cannot be enforced if it is not enabled in the first place. Hence, the check for whether a share has an expiration date should not consider enforcements but only where the share expiry type is enabled. For example : Using `this.config.isDefaultExpireDateEnabled` instead of `this.config.isDefaultExpireDateEnforced` which can be verified by checking `isExpiryDateEnforced`. Resolves : https://github.com/nextcloud/server/issues/40612 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Updates to sharing flowfenn-cs2023-10-092-30/+27
| | | | | | | | | | | | | | - Show enforced expiry date for new shares. - Improve quick share dropdown visibility in dark mode. - Prevent expiry date from showing expire for incoming shares. by updating the check for `share.passwordExpirationTime` to equally check for `undefined`. - Move "Download permission/attribute" from custom setting (as it is just another advanced setting and not an actual permission). - Show correct text for upload/editing when "allow public uploads" is enabled or disabled by admin. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Auto set password for new email sharesfenn-cs2023-09-211-3/+9
| | | | | | | | Suggest auto generated password for new public share (mail share). Resolves : https://github.com/nextcloud/server/issues/40493 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Consider share type for enforced share expiry datesfenn-cs2023-09-203-28/+18
| | | | | | | | | | | | | | | | | | | | | We have three kind of share expiry date enforcements. - `isDefaultExpireDateEnforced` - `isDefaultInternalExpireDateEnforced` - `isDefaultRemoteExpireDateEnforced` Before these commit, `isExpiryDateEnforced` that is used to disable/enable the set expiry date checkbox does not take those into consideration which is problematic as those have different applications. In addition, this commit now uses `isExpiryDateEnforced` to disable/enable the input for expiry date that shows up before the creation of link shares. Here, `hasExpirationDate` is also removed from 'SharingEntryLink` component as it is not used. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Properly align all sharing-entry typesfenn-cs2023-09-204-48/+56
| | | | | | | | SharingEntryLink and regular ShareEntry were not properly visually aligned before this commit. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Consider link shares in removeShare method in SharingTabfenn-cs2023-09-181-3/+10
| | | | | | | | | | | | | Currently, the `removeShare` method in the `SharingTab` view, does not take into account `linkShares`. Since link shares now shares thesame detail view with other share types, it should therefore be considered hence this commit. Resolves : https://github.com/nextcloud/server/issues/40396 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Correctly switch/revert from custom to bundled permsfenn-cs2023-09-151-3/+5
| | | | | | | | | | | | | | | | | | We have a set custom permissions checkbox, that when selected should set the quick permissions settings to custom as well as show the custom permission settings. When the checkbox is unchecked the quick permissions have to be reset to the default, `bundledPermissions.ALL` but also users can switch from custom permissions to `bundled` by just changing the radio select, hence we need a mechanism to set the permissions back to the correct fallback depending on where the user has toggled the the custom permission from. The mechanism is `revertSharingPermission` and this commit, makes sure revert values are correctly set upon toggle. Resolves : https://github.com/nextcloud/server/issues/40431 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Fix invite guest for new sharing flowfenn-cs2023-09-142-13/+22
| | | | | | | | | Call external handlers such as the one in the guess app https://github.com/nextcloud/guests/blob/master/src/main.js#L30 if present. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Hide additional content when share details is openLouis Chemineau2023-09-141-55/+57
| | | | | Signed-off-by: Louis Chemineau <louis@chmn.me> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Ellipsize user status in sharing entryfenn-cs2023-09-141-27/+25
| | | | | Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Display user status by the side in sharing flowfenn-cs2023-09-141-6/+10
| | | | | | | | | | | The quick share drop down now takes the place where the user status would show in the past, so we have the option of removing it (as it's available in the profile dropdown) or putting it at the side as such. It's put on the side without the icon, as the status icon appears on the avatar when set. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Consistent delete button in share detailsfenn-cs2023-09-131-1/+0
| | | | | | | Delete button text should have same size as other buttons. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Enfore allowPublicShares admin settingfenn-cs2023-09-133-4/+9
| | | | | | | Use the the modern intial-state library to pass data about `allowPublicUploads` to the sharing frontend. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Refactor migrated addShare methodfenn-cs2023-09-131-18/+15
| | | | Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Add icons for bundled permissionsfenn-cs2023-09-111-22/+29
| | | | | Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Adjust share details view UIfenn-cs2023-09-111-1/+3
| | | | | | | | | - List custom permissions activated in sublime - Align checkboxes in advanced settings Resolves : https://github.com/nextcloud/server/issues/40289 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Add accesibility features to quick share dropdownfenn-cs2023-09-071-16/+98
| | | | | | | | | - Adds appropriate aria attributes - Uses button element for dropdown items as it's more semantically correct - Uses trap-focus lib to trap focus when the drowpdown is active - Adds custom handling for arrow up and down Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Close quickshare dropdown on outside clickfenn-cs2023-09-071-1/+13
| | | | | | | If a user clicks anywhere outside of the quickshare dropdown, it should be closed. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* Do not toggle custom permissionsfenn-cs2023-09-071-9/+7
| | | | | | | | | | | | | Currently, swithcing between permissions in the sharing permissions details view would toggle the custom permissions view. We think, it's better for the custom permission option to simple expand the custom permissions view and never close it gain even if the user is switching between bundled permissions. The user can always collapse the view by using the "Advanced settings" toggle. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* enable download configuration on circles sharesMaxence Lange2023-09-061-6/+0
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Improve sharing flowfenn-cs2023-08-3115-554/+1468
| | | | | | | | | | | | | This commit introduces the following changes: - Does not create new share once user is selected for internal shares - Adds a `SharingDetails` view for share configurations - Adds a quick share select to enable fast changes in share permisions. Resolves: https://github.com/nextcloud/server/issues/26691 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: Louis Chemineau <louis@chmn.me>
* Revert "Improve sharing flow"Arthur Schiwon2023-08-3115-1468/+554
| | | | This reverts commit 8b42fb033fdcd3775b4850de6faf6091c8dcc716.
* Improve sharing flowfenn-cs2023-08-3015-554/+1468
| | | | | | | | | | | | | This commit introduces the following changes: - Does not create new share once user is selected for internal shares - Adds a `SharingDetails` view for share configurations - Adds a quick share select to enable fast changes in share permisions. Resolves: https://github.com/nextcloud/server/issues/26691 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix(files_sharing): String translationsChristopher Ng2023-08-012-3/+3
| | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com> (cherry picked from commit 8a51d64b09c92cec800adeea68296ed2fafe7214)
* Show pending popover menu when password is enabled by defaultDaniel Calviño Sánchez2023-07-131-8/+8
| | | | | | | | | | | | | | | | When "Enforce password protection" is enabled in the sharing settings a popover menu is shown to set a password before the share is created. On the other hand, when "Always ask for a password" was enabled in the sharing settings and a new link share was created the share was immediately created with a default password; the user was not able to specify a password (nor create the share without password). The component template already provided the needed elements to also ask for the password without enforcing it, but the popover menu was not shown due to "enableLinkPasswordByDefault" being missing in "if" conditions. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Rename "pendingPassword" to "pendingEnforcedPassword"Daniel Calviño Sánchez2023-07-131-4/+4
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>