diff --git a/.drone.star b/.drone.star index c020fc5dfca..2e5fb334a3c 100644 --- a/.drone.star +++ b/.drone.star @@ -73,6 +73,7 @@ config = { "oC10Sharing1": [ "webUIRestrictSharing", "webUISharingAutocompletion", + "webUISharingExpirationDate", ], "webUIResharingToRoot": "oC10ResharingToRoot", "oC10SharingFilePermission": [ @@ -103,10 +104,6 @@ config = { "webUISharingInternalUsersShareWithPage", ], "webUISharingInternalUsersBlacklisted": "oC10SharingInternalUsersBlacklisted", - "oC10SharingInternalUsersExpire": [ - "webUISharingInternalUsersExpire", - "webUISharingInternalUsersExpireToRoot", - ], "oC10SharingInternalUsersSharingIndicator": [ "webUISharingInternalUsersSharingIndicator", "webUISharingInternalUsersToRootSharingIndicator", @@ -242,8 +239,7 @@ config = { "webUISharingInternalUsersCollaborator", "webUISharingInternalUsersShareWithPage", "webUISharingInternalUsersBlacklisted", - "webUISharingInternalUsersExpire", - "webUISharingInternalUsersExpireToRoot", + "webUISharingExpirationDate", "webUISharingInternalUsersSharingIndicator", "webUISharingInternalUsersToRoot", "webUISharingInternalUsersToRootCollaborator", @@ -335,7 +331,7 @@ config = { "webUISharingInternalGroupsToRootEdgeCases", "webUISharingInternalGroupsToRootSharingIndicator", "webUISharingInternalUsers", - "webUISharingInternalUsersExpire", + "webUISharingExpirationDate", "webUISharingInternalUsersCollaborator", "webUISharingInternalUsersShareWithPage", "webUISharingInternalUsersSharingIndicator", @@ -343,7 +339,6 @@ config = { "webUISharingInternalUsersToRootPreviews", "webUISharingInternalUsersToRootShareWithPage", "webUISharingInternalUsersToRootSharingIndicator", - "webUISharingInternalUsersExpireToRoot", "webUISharingInternalUsersToRoot", "webUISharingInternalUsersToRootBlacklisted", "webUISharingPermissionsUsers", @@ -412,7 +407,7 @@ config = { "oCISSharingInternalUsers1": [ "webUISharingInternalUsers", "webUISharingAutocompletion", - "webUISharingInternalUsersExpire", + "webUISharingExpirationDate", ], "oCISSharingInternalUsers2": [ "webUISharingInternalUsersBlacklisted", @@ -538,7 +533,7 @@ config = { "webUISharingInternalGroupsToRootEdgeCases", "webUISharingInternalGroupsToRootSharingIndicator", "webUISharingInternalUsers", - "webUISharingInternalUsersExpire", + "webUISharingExpirationDate", "webUISharingInternalUsersCollaborator", "webUISharingInternalUsersShareWithPage", "webUISharingInternalUsersSharingIndicator", @@ -546,7 +541,6 @@ config = { "webUISharingInternalUsersToRootPreviews", "webUISharingInternalUsersToRootShareWithPage", "webUISharingInternalUsersToRootSharingIndicator", - "webUISharingInternalUsersExpireToRoot", "webUISharingInternalUsersToRoot", "webUISharingInternalUsersToRootBlacklisted", "webUISharingPermissionsUsers", @@ -591,7 +585,6 @@ rootSharingTestSuites = [ "webUISharingInternalGroupsToRoot", "webUISharingInternalGroupsToRootEdgeCases", "webUISharingInternalGroupsToRootSharingIndicator", - "webUISharingInternalUsersExpireToRoot", "webUISharingInternalUsersToRoot", "webUISharingInternalUsersToRootBlacklisted", "webUISharingInternalUsersToRootCollaborator", @@ -646,7 +639,7 @@ basicTestSuites = [ "webUISharingInternalUsers", "webUISharingInternalUsersBlacklisted", "webUISharingInternalUsersCollaborator", - "webUISharingInternalUsersExpire", + "webUISharingExpirationDate", "webUISharingInternalUsersShareWithPage", "webUISharingInternalUsersSharingIndicator", "webUISharingPermissionsUsers", diff --git a/__fixtures__/recipients.js b/__fixtures__/recipients.js new file mode 100644 index 00000000000..9513f86d28f --- /dev/null +++ b/__fixtures__/recipients.js @@ -0,0 +1,3 @@ +export default { + users: [{ label: 'bob', value: { shareType: 0, shareWith: 'bob', userType: 0 } }] +} diff --git a/__mocks__/sdk.js b/__mocks__/sdk.js index 04ca97bb4a1..7338e0b756f 100644 --- a/__mocks__/sdk.js +++ b/__mocks__/sdk.js @@ -6,6 +6,7 @@ import fixtureSharedViaLinksFiles from '../__fixtures__/sharedViaLinkFiles' import fixtureSharedWithMeFiles from '../__fixtures__/sharedWithMeFiles' import fixtureDeletedFiles from '../__fixtures__/deletedFiles' import fixturePublicFiles from '../__fixtures__/publicFiles' +import fixtureRecipients from '../__fixtures__/recipients' export default { files: { @@ -41,6 +42,64 @@ export default { list: path => fixturePublicFiles[path] }, shares: { - getShares: () => new Promise(resolve => resolve()) + getShares: () => Promise.resolve(), + getRecipients, + shareFileWithUser: (path, id, params) => + Promise.resolve({ + shareInfo: { + id: 1, + share_type: 0, + uid_owner: 'alice', // TODO: get user dynamically + displayname_owner: 'alice', // TODO: get user dynamically + permissions: params.permissions, + stime: new Date().getTime(), + expiration: params.expirationDate, + uid_file_owner: 'alice', // TODO: get user dynamically + displayname_file_owner: 'alice', // TODO: get user dynamically + path, + item_type: 'folder', // TODO: get item type dynamically + item_source: 10, + file_source: 10, + file_parent: 6, + file_target: path, + share_with: id, + share_with_displayname: id + } + }), + shareFileWithGroup: () => Promise.resolve(), + updateShare: (id, params) => { + const share = { + shareInfo: { + id, + share_type: 0, + uid_owner: 'alice', // TODO: get user dynamically + displayname_owner: 'alice', // TODO: get user dynamically + permissions: params.permissions, + stime: new Date().getTime(), + uid_file_owner: 'alice', // TODO: get user dynamically + displayname_file_owner: 'alice', // TODO: get user dynamically + path: '/Documents', // TODO: get path dynamically + item_type: 'folder', // TODO: get item type dynamically + item_source: 10, + file_source: 10, + file_parent: 6, + file_target: '/Documents', // TODO: get path dynamically + share_with: 'bob', // TODO: get user dynamically + share_with_displayname: 'bob' // TODO: get user dynamically + } + } + + if (params.expireDate) { + share.shareInfo.expiration = params.expireDate + } + + return Promise.resolve(share) + } } } + +function getRecipients(query) { + const users = fixtureRecipients.users.filter(user => user.label.includes(query)) + + return { exact: { users, groups: [], remotes: [] }, users: [], groups: [], remotes: [] } +} diff --git a/changelog/unreleased/enhancement-datepicker-dropdown b/changelog/unreleased/enhancement-datepicker-dropdown new file mode 100644 index 00000000000..1541b608005 --- /dev/null +++ b/changelog/unreleased/enhancement-datepicker-dropdown @@ -0,0 +1,6 @@ +Enhancement: Datepicker in Dropdown + +We have moved the datepicker for share expiration in the right sidebar into +a dropdown to align it with the other elements when creating/editing shares. + +https://github.com/owncloud/web/pull/5806 diff --git a/changelog/unreleased/enhancement-update-ods b/changelog/unreleased/enhancement-update-ods new file mode 100644 index 00000000000..8947faab7c0 --- /dev/null +++ b/changelog/unreleased/enhancement-update-ods @@ -0,0 +1,10 @@ +Enhancement: Update ODS to v11.0.0 + +We updated the ownCloud Design System to version 11.0.0. Please refer to the full changelog in the ODS release (linked) for more details. Summary: + +- Bugfix - Prevent hover style on footer of OcTableFiles: https://github.com/owncloud/owncloud-design-system/pull/1667 +- Change - Replace vue-datetime with v-calendar in our datepicker component: https://github.com/owncloud/owncloud-design-system/pull/1661 +- Enhancement - Allow hover option in OcTableFiles: https://github.com/owncloud/owncloud-design-system/pull/1632 + +https://github.com/owncloud/web/pull/5806 +https://github.com/owncloud/owncloud-design-system/releases/tag/v11.0.0 diff --git a/package.json b/package.json index a33cff22ae4..3817ee31b1e 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-typescript": "^8.2.5", "@testing-library/jest-dom": "^5.13.0", + "@testing-library/user-event": "^13.2.1", "@testing-library/vue": "^5.6.2", "@types/cucumber": "^7.0.0", "@types/jest": "^26.0.23", diff --git a/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue b/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue index fb75d7abffd..466262ab54d 100644 --- a/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue +++ b/packages/web-app-files/src/components/SideBar/Links/PublicLinks/LinkEdit.vue @@ -31,44 +31,66 @@ -
-
-
- +
+
+
+ +