Commit Graph

321 Commits (d949fce1d524ee7c050fbb7cdca800b0723350ec)

Author SHA1 Message Date
Ferdinand Thiessen e35f6d89a2
fix(files_sharing): Add one string for every share type to not assume any language
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-12-13 16:37:39 +07:00
fenn-cs 04e8733721 Allow user to finish typing date before formatting
Debounce `onExpirationChange` to avoid calling `formatDateToString`
on invalid on uncompletely inputed date strings.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-12-11 21:06:31 +07:00
fenn-cs c179408a0d Tooltip outside click, should abort share creation
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>
2023-12-11 21:03:28 +07:00
julia.kirschenheuter 696545b530 Replace input filed with password field and added password error message
Remove unneeded NcDateTimePicker

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
2023-12-08 10:22:42 +07:00
fenn-cs e73a54906e Remove `newPassword` from share model, if disabled
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>
2023-12-06 22:11:27 +07:00
fenn-cs 06314a37c1 Create element reference inside $nextTick()
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>
2023-12-06 22:11:27 +07:00
John Molakvoæ 09f49a2514
fix(files_sharing): fix sharing status indicator side after component update
Seems like the components now have max-height/width set too

Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2023-12-05 11:36:38 +07:00
fenn-cs 9d86a0444d Improve share logic for enforced password & expiry date
* 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>
2023-11-30 11:58:35 +07:00
Jérôme Herbinet 931120b85d
Replace "Update" with "Edit"
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
2023-11-23 11:05:25 +07:00
Julius Härtl 018cf71820 fix: Avoid invisible areas through keyboard navigation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-11-17 17:48:32 +07:00
julia.kirschenheuter ff2ef8d0d6 Replace ActionLink with ActionButton on sharing tab
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
So-authored-by: Grigorii K. Shartsev <me@shgk.me>
2023-11-17 16:55:05 +07:00
Christopher Ng 6329da9352 fix(a11y): Focus on sharing quick permission radio
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-11-16 16:05:00 +07:00
julia.kirschenheuter 9d9fffb9d3 Move delete share button into the scrolling container
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
2023-11-15 17:11:10 +07:00
julia.kirschenheuter 7c987f0577
Adapt "advanced settings" button for accordion button
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
2023-11-15 09:08:55 +07:00
Julius Härtl d7ae387713 fix: Change scroll container for sharing details
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>
2023-11-13 23:41:21 +07:00
Simon L 9d0cefd71d fix description of sharing toggle
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-11-07 12:17:42 +07:00
Grigorii K. Shartsev aee73c060b fix(files_sharing): permissions translation
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2023-11-06 18:40:21 +07:00
Christopher Ng 590daccca3 fix: Share select search globally icon
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-10-23 15:14:49 +07:00
fenn-cs 8dfcf2e02a Do not treat `isDefaultExpireDateEnforced` as fallback
`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>
2023-10-22 16:47:32 +07:00
fenn-cs 46308e96f3 Fix has expiration date logic
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>
2023-10-22 15:47:45 +07:00
fenn-cs 92417cd594 Check expiry enforcement for all share types
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 9757e680e2

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-10-22 15:47:43 +07:00
Varun Patil 9bd50a7296
refactor: remove remaining usage of OC::getCapabilities
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2023-10-20 16:19:43 +07:00
julia.kirschenheuter bfa7d33912 Reduce width of sharing entry
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-10-19 12:50:14 +07:00
fenn-cs 9757e680e2 Allow share expiry dates lower than enforced limits
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>
2023-10-16 07:03:53 +07:00
fenn-cs 10675f7aac Fixed mixed translations in sharing details
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>
2023-10-09 17:39:48 +07:00
Christopher Ng 675feb9cf3 chore: Adapt to breaking DateTime rename
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-10-06 14:40:33 +07:00
Julien Veyssier 03cb99aff3
show loading icon in 'save share' button when creating a share
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-10-03 13:55:02 +07:00
fenn-cs 0537bbd331 Correct check for enabled expiration date
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>
2023-10-02 11:29:04 +07:00
fenn-cs a092bae720 Updates to sharing flow
- 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>
2023-10-02 11:59:10 +07:00
Christopher Ng eacde86693 enh(a11y): Add label to share note textbox
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-09-27 17:39:38 +07:00
fenn-cs a3613350f6 Auto set password for new email shares
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>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-26 06:06:27 +07:00
John Molakvoæ (skjnldsv) 216804f83d
fix(files): title and inline actions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-21 15:20:17 +07:00
fenn-cs 56771b50c4 Consider share type for enforced share expiry dates
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>
2023-09-20 16:43:12 +07:00
John Molakvoæ (skjnldsv) fac5197486
feat(files): add files_sharing indicator
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2023-09-20 13:58:31 +07:00
fenn-cs ef5bb420f2 Consider link shares in removeShare method in SharingTab
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>
2023-09-15 16:30:59 +07:00
fenn-cs 386b08d139 Correctly switch/revert from custom to bundled perms
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>
2023-09-15 12:14:38 +07:00
fenn-cs 27559760d1 Properly align all sharing-entry types
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>
2023-09-14 16:10:29 +07:00
fenn-cs 1f74c88bc7 Fix invite guest for new sharing flow
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>
2023-09-14 12:00:32 +07:00
Louis Chemineau b3abfcb64c Hide additional content when share details is open
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-13 22:27:20 +07:00
fenn-cs 2c22e1f86a Ellipsize user status in sharing entry
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2023-09-13 20:19:12 +07:00
fenn-cs 2b2622ddd1 Non sticky delete button
Removes button from footer and removes button background.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-09-13 15:42:16 +07:00
fenn-cs f596f76af3 Display user status by the side in sharing flow
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>
2023-09-13 15:14:56 +07:00
fenn-cs 3d071abcf8 Consistent delete button in share details
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>
2023-09-12 21:11:28 +07:00
fenn-cs 766806c35d Enfore allowPublicShares admin setting
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>
2023-09-12 20:50:49 +07:00
fenn-cs ef99640095 Refactor migrated addShare method
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-09-12 20:50:49 +07:00
fenn-cs faa76b94b8 Add accesibility features to quick share dropdown
- 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>
2023-09-07 10:54:47 +07:00
fenn-cs f75684ec7e Close quickshare dropdown on outside click
If a user clicks anywhere outside of the quickshare dropdown,
it should be closed.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-09-07 10:54:47 +07:00
fenn-cs 2b1008f2ce Do not toggle custom permissions
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>
2023-09-07 10:54:47 +07:00
Grigorii K. Shartsev 1f6101d8a9 fix(files_sharing): select sharing in sidebar breaks Viewer focus trap
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
2023-09-05 22:15:29 +07:00
Maxence Lange 4e2d6b5e42 renable download configuration on circles shares
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-09-05 12:12:15 +07:00