cozy-sharing 27.1.4 → 28.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/preview.jsx +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/OpenSharingLinkButton.js +1 -1
- package/dist/OpenSharingLinkFabButton.js +1 -1
- package/dist/ShareButton.js +1 -1
- package/dist/ShareButton.spec.js +1 -1
- package/dist/components/ConfirmTrustedRecipientsDialog.js +1 -1
- package/dist/components/ContactSuggestion.js +1 -1
- package/dist/components/CozyPassFingerprintDialogContent.js +1 -1
- package/dist/components/Recipient/GroupRecipient.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetail.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithAccess.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +1 -1
- package/dist/components/Recipient/GroupRecipientPermissions.js +4 -1
- package/dist/components/Recipient/LinkRecipient.js +1 -1
- package/dist/components/Recipient/LinkRecipientLite.js +1 -1
- package/dist/components/Recipient/LinkRecipientPermissions.js +1 -1
- package/dist/components/Recipient/MemberRecipient.js +1 -1
- package/dist/components/Recipient/MemberRecipientLite.js +1 -1
- package/dist/components/Recipient/MemberRecipientPermissions.js +2 -1
- package/dist/components/Recipient/MemberRecipientStatus.js +1 -1
- package/dist/components/Recipient/RecipientConfirm.js +1 -1
- package/dist/components/ShareByEmail.js +1 -1
- package/dist/components/ShareByLink.js +1 -1
- package/dist/components/ShareDialogCozyToCozy.js +1 -1
- package/dist/components/ShareDialogOnlyByLink.js +1 -1
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +1 -1
- package/dist/components/ShareModal/SharingDetailsModal.js +1 -1
- package/dist/components/ShareRecipientsLimitModal.js +1 -1
- package/dist/components/ShareRestrictionModal/BoxDate.js +1 -1
- package/dist/components/ShareRestrictionModal/BoxEditingRights.js +4 -1
- package/dist/components/ShareRestrictionModal/BoxPassword.js +1 -1
- package/dist/components/ShareRestrictionModal/ShareRestrictionContentModal.js +1 -1
- package/dist/components/ShareRestrictionModal/ShareRestrictionModal.js +1 -1
- package/dist/components/SharedDrive/DumbSharedDriveModal.js +14 -3
- package/dist/components/SharedDrive/SharedDriveEditModal.js +61 -3
- package/dist/components/SharedDrive/SharedDriveModal.js +1 -1
- package/dist/components/SharedDrive/SharedDriveRecipient.js +1 -1
- package/dist/components/SharedDrive/SharedDriveRecipientPermissions.js +4 -1
- package/dist/components/SharedDrive/SharedDriveRecipientStatus.js +1 -1
- package/dist/components/SharedStatus.js +1 -1
- package/dist/components/SharingBanner/components/PublicBanner.js +1 -1
- package/dist/components/SharingBanner/components/PublicBanner.spec.js +2 -2
- package/dist/components/SharingBanner/hooks/useSharingInfos.js +1 -1
- package/dist/components/SharingBanner/test/AppLike.js +1 -1
- package/dist/components/WhoHasAccess.js +1 -1
- package/dist/hoc/withLocales.js +2 -2
- package/locales/en.json +5 -1
- package/locales/fr.json +4 -1
- package/locales/ru.json +4 -1
- package/locales/vi.json +4 -1
- package/package.json +12 -10
- package/src/OpenSharingLinkButton.jsx +1 -1
- package/src/OpenSharingLinkFabButton.jsx +1 -1
- package/src/ShareButton.jsx +1 -2
- package/src/ShareButton.spec.jsx +1 -1
- package/src/components/ConfirmTrustedRecipientsDialog.jsx +1 -1
- package/src/components/ContactSuggestion.jsx +1 -1
- package/src/components/CozyPassFingerprintDialogContent.jsx +1 -1
- package/src/components/Recipient/GroupRecipient.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetail.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithAccess.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +1 -1
- package/src/components/Recipient/GroupRecipientPermissions.jsx +4 -1
- package/src/components/Recipient/LinkRecipient.jsx +1 -1
- package/src/components/Recipient/LinkRecipientLite.jsx +1 -1
- package/src/components/Recipient/LinkRecipientPermissions.jsx +1 -1
- package/src/components/Recipient/MemberRecipient.jsx +1 -1
- package/src/components/Recipient/MemberRecipientLite.jsx +1 -1
- package/src/components/Recipient/MemberRecipientPermissions.jsx +2 -1
- package/src/components/Recipient/MemberRecipientStatus.jsx +1 -1
- package/src/components/Recipient/RecipientConfirm.jsx +1 -1
- package/src/components/ShareByEmail.jsx +1 -1
- package/src/components/ShareByLink.jsx +1 -1
- package/src/components/ShareDialogCozyToCozy.jsx +1 -1
- package/src/components/ShareDialogOnlyByLink.jsx +1 -1
- package/src/components/ShareDialogTwoStepsConfirmationContainer.jsx +1 -1
- package/src/components/ShareModal/SharingDetailsModal.jsx +1 -1
- package/src/components/ShareRecipientsLimitModal.jsx +1 -1
- package/src/components/ShareRestrictionModal/BoxDate.jsx +1 -1
- package/src/components/ShareRestrictionModal/BoxEditingRights.jsx +4 -1
- package/src/components/ShareRestrictionModal/BoxPassword.jsx +1 -1
- package/src/components/ShareRestrictionModal/ShareRestrictionContentModal.jsx +1 -1
- package/src/components/ShareRestrictionModal/ShareRestrictionModal.jsx +1 -1
- package/src/components/SharedDrive/DumbSharedDriveModal.jsx +17 -3
- package/src/components/SharedDrive/SharedDriveEditModal.jsx +30 -2
- package/src/components/SharedDrive/SharedDriveModal.jsx +1 -1
- package/src/components/SharedDrive/SharedDriveRecipient.jsx +1 -1
- package/src/components/SharedDrive/SharedDriveRecipientPermissions.jsx +4 -1
- package/src/components/SharedDrive/SharedDriveRecipientStatus.jsx +1 -1
- package/src/components/SharedStatus.jsx +1 -2
- package/src/components/SharingBanner/components/PublicBanner.jsx +1 -1
- package/src/components/SharingBanner/components/PublicBanner.spec.jsx +2 -2
- package/src/components/SharingBanner/hooks/useSharingInfos.jsx +1 -1
- package/src/components/SharingBanner/test/AppLike.jsx +1 -1
- package/src/components/WhoHasAccess.jsx +1 -1
- package/src/hoc/withLocales.jsx +2 -3
- package/test/AppLike.jsx +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
1
4
|
import PropTypes from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { useI18n } from 'twake-i18n';
|
|
3
7
|
import { useClient } from 'cozy-client';
|
|
4
|
-
import {
|
|
8
|
+
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
|
|
5
9
|
import { DumbSharedDriveModal } from './DumbSharedDriveModal';
|
|
6
10
|
import withLocales from '../../hoc/withLocales';
|
|
7
11
|
import { Contact } from '../../models';
|
|
@@ -17,10 +21,60 @@ export var SharedDriveEditModal = withLocales(function (_ref) {
|
|
|
17
21
|
var _useI18n = useI18n(),
|
|
18
22
|
t = _useI18n.t;
|
|
19
23
|
|
|
24
|
+
var _useAlert = useAlert(),
|
|
25
|
+
showAlert = _useAlert.showAlert;
|
|
26
|
+
|
|
20
27
|
var createContact = function createContact(contact) {
|
|
21
28
|
return client.create(Contact.doctype, contact);
|
|
22
29
|
};
|
|
23
30
|
|
|
31
|
+
var _useState = useState(sharing === null || sharing === void 0 ? void 0 : sharing.description),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
name = _useState2[0],
|
|
34
|
+
setName = _useState2[1];
|
|
35
|
+
|
|
36
|
+
var handleNameChange = function handleNameChange(event) {
|
|
37
|
+
setName(event.target.value);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var onRename = /*#__PURE__*/function () {
|
|
41
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value) {
|
|
42
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
43
|
+
while (1) switch (_context.prev = _context.next) {
|
|
44
|
+
case 0:
|
|
45
|
+
_context.prev = 0;
|
|
46
|
+
_context.next = 3;
|
|
47
|
+
return client.collection('io.cozy.sharings').renameSharedDrive(sharing, value);
|
|
48
|
+
|
|
49
|
+
case 3:
|
|
50
|
+
showAlert({
|
|
51
|
+
message: t('SharedDrive.sharedDriveModal.successNotificationUpdate'),
|
|
52
|
+
severity: 'success'
|
|
53
|
+
});
|
|
54
|
+
onClose();
|
|
55
|
+
_context.next = 10;
|
|
56
|
+
break;
|
|
57
|
+
|
|
58
|
+
case 7:
|
|
59
|
+
_context.prev = 7;
|
|
60
|
+
_context.t0 = _context["catch"](0);
|
|
61
|
+
showAlert({
|
|
62
|
+
message: t('SharedDrive.sharedDriveModal.errorNotificationUpdate'),
|
|
63
|
+
severity: 'error'
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
case 10:
|
|
67
|
+
case "end":
|
|
68
|
+
return _context.stop();
|
|
69
|
+
}
|
|
70
|
+
}, _callee, null, [[0, 7]]);
|
|
71
|
+
}));
|
|
72
|
+
|
|
73
|
+
return function onRename(_x) {
|
|
74
|
+
return _ref2.apply(this, arguments);
|
|
75
|
+
};
|
|
76
|
+
}();
|
|
77
|
+
|
|
24
78
|
return /*#__PURE__*/React.createElement(DumbSharedDriveModal, {
|
|
25
79
|
title: t('Files.share.title', {
|
|
26
80
|
name: sharing === null || sharing === void 0 ? void 0 : sharing.description
|
|
@@ -30,7 +84,11 @@ export var SharedDriveEditModal = withLocales(function (_ref) {
|
|
|
30
84
|
recipients: recipients,
|
|
31
85
|
onRevoke: onRevoke,
|
|
32
86
|
onClose: onClose,
|
|
33
|
-
onShare: onShare
|
|
87
|
+
onShare: onShare,
|
|
88
|
+
sharedDriveName: name,
|
|
89
|
+
handleSharedDriveNameChange: handleNameChange,
|
|
90
|
+
onRename: onRename,
|
|
91
|
+
originalSharedDriveName: sharing === null || sharing === void 0 ? void 0 : sharing.description
|
|
34
92
|
});
|
|
35
93
|
});
|
|
36
94
|
SharedDriveEditModal.propTypes = {
|
|
@@ -4,9 +4,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
|
+
import { useI18n } from 'twake-i18n';
|
|
7
8
|
import { useClient } from 'cozy-client';
|
|
8
9
|
import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
|
|
9
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
10
10
|
import { DumbSharedDriveModal } from './DumbSharedDriveModal';
|
|
11
11
|
import { mergeAndDeduplicateRecipients, formatRecipients } from './helpers';
|
|
12
12
|
import withLocales from '../../hoc/withLocales';
|
|
@@ -3,13 +3,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["fadeIn", "members"];
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { useI18n } from 'twake-i18n';
|
|
6
7
|
import Fade from 'cozy-ui/transpiled/react/Fade';
|
|
7
8
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
8
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
9
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
10
11
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
11
12
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
12
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
13
13
|
import SharedDriveRecipientPermissions from './SharedDriveRecipientPermissions';
|
|
14
14
|
import SharedDriveRecipientStatus from './SharedDriveRecipientStatus';
|
|
15
15
|
import { FADE_IN_DURATION, DEFAULT_DISPLAY_NAME } from '../../helpers/recipients';
|
|
@@ -2,10 +2,11 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React, { useState, useRef } from 'react';
|
|
5
|
+
import { useI18n } from 'twake-i18n';
|
|
6
|
+
import { useClient } from 'cozy-client';
|
|
5
7
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
|
|
6
8
|
import { makeActions, divider } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
|
|
7
9
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
|
|
8
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
9
10
|
import { revokeSharedDriveMember } from '../Recipient/actions/revokeSharedDriveMember';
|
|
10
11
|
import { setReadOnlySharedPermission } from '../Recipient/actions/setReadOnlySharedPermission';
|
|
11
12
|
import { setReadWriteSharedPermission } from '../Recipient/actions/setReadWriteSharedPermission';
|
|
@@ -20,6 +21,7 @@ var ShareDriveRecipientPermissions = function ShareDriveRecipientPermissions(_re
|
|
|
20
21
|
t = _useI18n.t;
|
|
21
22
|
|
|
22
23
|
var buttonRef = useRef();
|
|
24
|
+
var client = useClient();
|
|
23
25
|
|
|
24
26
|
var _useState = useState(false),
|
|
25
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -79,6 +81,7 @@ var ShareDriveRecipientPermissions = function ShareDriveRecipientPermissions(_re
|
|
|
79
81
|
|
|
80
82
|
var actions = makeActions([setReadOnlySharedPermission, setReadWriteSharedPermission, divider, revokeSharedDriveMember], {
|
|
81
83
|
t: t,
|
|
84
|
+
client: client,
|
|
82
85
|
type: type,
|
|
83
86
|
setType: setType,
|
|
84
87
|
handleRevocation: handleRevocation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useI18n } from 'twake-i18n';
|
|
2
3
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
3
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
4
4
|
|
|
5
5
|
var SharedDriveRecipientStatus = function SharedDriveRecipientStatus(_ref) {
|
|
6
6
|
var members = _ref.members,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cx from 'classnames';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useI18n } from '
|
|
3
|
+
import { useI18n } from 'twake-i18n';
|
|
4
4
|
import { SharingTooltip, TooltipRecipientList } from './Tooltip';
|
|
5
5
|
|
|
6
6
|
var LinkIcon = function LinkIcon(props) {
|
|
@@ -2,11 +2,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import snarkdown from 'snarkdown';
|
|
5
|
+
import { useI18n } from 'twake-i18n';
|
|
5
6
|
import { useClient } from 'cozy-client';
|
|
6
7
|
import flag from 'cozy-flags';
|
|
7
8
|
import Banner from 'cozy-ui/transpiled/react/Banner';
|
|
8
9
|
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
9
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
10
10
|
import CozyHomeLinkIcon from './CozyHomeLinkIcon';
|
|
11
11
|
var styles = {
|
|
12
12
|
"bannermarkdown": "publicBanner__bannermarkdown___1dR1E"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { render } from '@testing-library/react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { useI18n } from 'twake-i18n';
|
|
3
4
|
import { useClient } from 'cozy-client';
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
import { SharingBannerCozyToCozy } from './PublicBanner';
|
|
6
|
-
jest.mock('
|
|
6
|
+
jest.mock('twake-i18n');
|
|
7
7
|
jest.mock('cozy-client');
|
|
8
8
|
describe('PublicBanner', function () {
|
|
9
9
|
beforeEach(function () {
|
|
@@ -3,10 +3,10 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import { useClient, models } from 'cozy-client';
|
|
6
|
+
import flag from 'cozy-flags';
|
|
6
7
|
import logger from '../../../logger';
|
|
7
8
|
import { buildSharingsByIdQuery } from '../../../queries/queries';
|
|
8
9
|
import getQueryParameter from '../helpers/QueryParameter';
|
|
9
|
-
import flag from 'cozy-flags';
|
|
10
10
|
|
|
11
11
|
var getSharingId = function getSharingId(permission) {
|
|
12
12
|
var sourceId = permission.data.attributes.source_id;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Provider } from 'react-redux';
|
|
3
3
|
import { createStore } from 'redux';
|
|
4
|
+
import { I18n } from 'twake-i18n';
|
|
4
5
|
import { CozyProvider } from 'cozy-client';
|
|
5
6
|
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
6
|
-
import { I18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
7
7
|
import { AcceptingSharingProvider } from './AcceptingSharingContext';
|
|
8
8
|
import FabProvider from './FabProvider';
|
|
9
9
|
import { ModalContext } from './ModalContext';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { useI18n } from 'twake-i18n';
|
|
3
4
|
import List from 'cozy-ui/transpiled/react/List';
|
|
4
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
import LinkRecipient from './Recipient/LinkRecipient';
|
|
6
6
|
import OwnerRecipient from './Recipient/OwnerRecipient';
|
|
7
7
|
import { RecipientList } from './Recipient/RecipientList';
|
package/dist/hoc/withLocales.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { I18n, translate } from '
|
|
3
|
-
import { getI18n } from '
|
|
2
|
+
import { I18n, translate } from 'twake-i18n';
|
|
3
|
+
import { getI18n } from 'twake-i18n';
|
|
4
4
|
var locales = {
|
|
5
5
|
en: require("../../locales/en.json"),
|
|
6
6
|
fr: require("../../locales/fr.json"),
|
package/locales/en.json
CHANGED
|
@@ -463,9 +463,13 @@
|
|
|
463
463
|
"add": "Add",
|
|
464
464
|
"cancel": "Cancel",
|
|
465
465
|
"create": "Create",
|
|
466
|
+
"save": "Save",
|
|
466
467
|
"addPeople": "Add people to the shared drive :",
|
|
467
468
|
"successNotification": "Shared drive has been added",
|
|
468
|
-
"errorNotification": "Error during shared drive creation"
|
|
469
|
+
"errorNotification": "Error during shared drive creation",
|
|
470
|
+
"successNotificationUpdate": "Your shared drive has been modified",
|
|
471
|
+
"errorNotificationUpdate": "Error durring shared drive modification"
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
474
|
}
|
|
475
|
+
|
package/locales/fr.json
CHANGED
|
@@ -461,9 +461,12 @@
|
|
|
461
461
|
"add": "Ajouter",
|
|
462
462
|
"cancel": "Annuler",
|
|
463
463
|
"create": "Créer",
|
|
464
|
+
"save": "Enregistrer",
|
|
464
465
|
"addPeople": "Ajouter des utilisateurs au drive partagé :",
|
|
465
466
|
"successNotification": "Le drive partagé a été ajouté",
|
|
466
|
-
"errorNotification": "Erreur lors de la création du drive partagé"
|
|
467
|
+
"errorNotification": "Erreur lors de la création du drive partagé",
|
|
468
|
+
"successNotificationUpdate": "Votre drive partagé a été modifié",
|
|
469
|
+
"errorNotificationUpdate": "Erreur lors de la modification du drive partagé"
|
|
467
470
|
}
|
|
468
471
|
}
|
|
469
472
|
}
|
package/locales/ru.json
CHANGED
|
@@ -463,9 +463,12 @@
|
|
|
463
463
|
"add": "Добавить",
|
|
464
464
|
"cancel": "Отмена",
|
|
465
465
|
"create": "Создать",
|
|
466
|
+
"save": "Сохранить",
|
|
466
467
|
"addPeople": "Добавить людей в общий диск:",
|
|
467
468
|
"successNotification": "Общий диск добавлен",
|
|
468
|
-
"errorNotification": "Ошибка при создании общего диска"
|
|
469
|
+
"errorNotification": "Ошибка при создании общего диска",
|
|
470
|
+
"successNotificationUpdate": "Ваш общий диск был изменён",
|
|
471
|
+
"errorNotificationUpdate": "Ошибка при модификации общего диска"
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
474
|
}
|
package/locales/vi.json
CHANGED
|
@@ -461,9 +461,12 @@
|
|
|
461
461
|
"add": "Thêm",
|
|
462
462
|
"cancel": "Hủy",
|
|
463
463
|
"create": "Tạo",
|
|
464
|
+
"save": "Lưu",
|
|
464
465
|
"addPeople": "Thêm người vào ổ đĩa được chia sẻ:",
|
|
465
466
|
"successNotification": "Ổ đĩa được chia sẻ đã được thêm",
|
|
466
|
-
"errorNotification": "Lỗi trong quá trình tạo ổ đĩa được chia sẻ"
|
|
467
|
+
"errorNotification": "Lỗi trong quá trình tạo ổ đĩa được chia sẻ",
|
|
468
|
+
"successNotificationUpdate": "Ổ đĩa được chia sẻ của bạn đã được sửa đổi",
|
|
469
|
+
"errorNotificationUpdate": "Lỗi khi sửa đổi ổ đĩa được chia sẻ"
|
|
467
470
|
}
|
|
468
471
|
}
|
|
469
472
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"deploy:doc": "(cd ../.. && yarn deploy:doc)",
|
|
21
21
|
"prepublishOnly": "yarn build",
|
|
22
22
|
"test": "env NODE_ENV=test jest",
|
|
23
|
-
"lint": "cd
|
|
23
|
+
"lint": "cd ../.. && yarn eslint --ext js,jsx packages/cozy-sharing",
|
|
24
24
|
"start": "yarn build --watch",
|
|
25
25
|
"watch": "yarn run start",
|
|
26
26
|
"watch:doc:react": "(cd ../.. && TARGET=cozy-sharing yarn watch:doc:react)",
|
|
@@ -54,32 +54,34 @@
|
|
|
54
54
|
"babel-jest": "26.6.3",
|
|
55
55
|
"babel-plugin-css-modules-transform": "1.6.2",
|
|
56
56
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
57
|
-
"cozy-client": "^60.
|
|
57
|
+
"cozy-client": "^60.19.0",
|
|
58
58
|
"cozy-device-helper": "^3.7.1",
|
|
59
59
|
"cozy-intent": "^2.30.1",
|
|
60
60
|
"cozy-minilog": "^3.10.0",
|
|
61
|
-
"cozy-ui": "^
|
|
62
|
-
"cozy-ui-plus": "^
|
|
61
|
+
"cozy-ui": "^135.0.0",
|
|
62
|
+
"cozy-ui-plus": "^4.0.0",
|
|
63
63
|
"jest": "26.6.3",
|
|
64
64
|
"jest-environment-jsdom": "26.6.2",
|
|
65
65
|
"react": "16.12.0",
|
|
66
66
|
"react-dom": "16.13.0",
|
|
67
67
|
"react-router": "^5.0.1",
|
|
68
|
-
"storybook": "7.6.0"
|
|
68
|
+
"storybook": "7.6.0",
|
|
69
|
+
"twake-i18n": "^0.3.0"
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
71
|
-
"cozy-client": ">=60.
|
|
72
|
+
"cozy-client": ">=60.19.0",
|
|
72
73
|
"cozy-device-helper": ">=3.7.1",
|
|
73
74
|
"cozy-intent": ">=2.29.1",
|
|
74
75
|
"cozy-minilog": ">=3.9.1",
|
|
75
|
-
"cozy-ui": ">=
|
|
76
|
+
"cozy-ui": ">=135.0.0",
|
|
76
77
|
"cozy-ui-plus": ">=1.2.0",
|
|
77
78
|
"prop-types": ">=15.7.2",
|
|
78
79
|
"react": ">=16.12.0",
|
|
79
|
-
"react-router": ">=5.0.1"
|
|
80
|
+
"react-router": ">=5.0.1",
|
|
81
|
+
"twake-i18n": ">=0.3.0"
|
|
80
82
|
},
|
|
81
83
|
"sideEffects": [
|
|
82
84
|
"*.css"
|
|
83
85
|
],
|
|
84
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "b1d504a12eb88b8ecda4a53f82c400482d79452b"
|
|
85
87
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
6
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
7
|
|
|
8
8
|
import { getIconWithlabel, openExternalLink } from './helpers/sharings'
|
|
9
9
|
import withLocales from './hoc/withLocales'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { ExtendableFab } from 'cozy-ui/transpiled/react/Fab'
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import { getIconWithlabel, openExternalLink } from './helpers/sharings'
|
|
8
8
|
import withLocales from './hoc/withLocales'
|
package/src/ShareButton.jsx
CHANGED
package/src/ShareButton.spec.jsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import List from 'cozy-ui/transpiled/react/List'
|
|
5
6
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
6
7
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
7
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
8
8
|
|
|
9
9
|
import MemberRecipient from './Recipient/MemberRecipient'
|
|
10
10
|
import ShareDialogTwoStepsConfirmationContainer from './ShareDialogTwoStepsConfirmationContainer'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { models } from 'cozy-client'
|
|
5
6
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
7
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
7
8
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
8
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
9
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
10
10
|
|
|
11
11
|
import { Contact, Group, getDisplayName, getInitials } from '../models'
|
|
12
12
|
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
@@ -2,10 +2,10 @@ import cx from 'classnames'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import snarkdown from 'snarkdown'
|
|
5
|
+
import { useI18n } from 'twake-i18n'
|
|
5
6
|
|
|
6
7
|
import Paper from 'cozy-ui/transpiled/react/Paper'
|
|
7
8
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
8
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
9
9
|
|
|
10
10
|
import styles from '../styles/CozyPassFingerprintDialogContent.styl'
|
|
11
11
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { useClient } from 'cozy-client'
|
|
4
5
|
import Fade from 'cozy-ui/transpiled/react/Fade'
|
|
@@ -8,7 +9,6 @@ import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryA
|
|
|
8
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
9
10
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
11
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import { GroupRecipientDetail } from './GroupRecipientDetail'
|
|
14
14
|
import { GroupRecipientPermissions } from './GroupRecipientPermissions'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { useClient, generateWebLink } from 'cozy-client'
|
|
4
5
|
import Buttons from 'cozy-ui/transpiled/react/Buttons'
|
|
5
6
|
import { Dialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
6
7
|
import Empty from 'cozy-ui/transpiled/react/Empty'
|
|
7
8
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
8
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
9
9
|
|
|
10
10
|
import { GroupRecipientDetailWithAccess } from './GroupRecipientDetailWithAccess'
|
|
11
11
|
import { GroupRecipientDetailWithoutAccess } from './GroupRecipientDetailWithoutAccess'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { useClient } from 'cozy-client'
|
|
4
5
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
@@ -7,7 +8,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
7
8
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
8
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
9
10
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
11
11
|
|
|
12
12
|
import MemberRecipientStatus from './MemberRecipientStatus'
|
|
13
13
|
import { getInitials, getDisplayName } from '../../models'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
5
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
@@ -8,7 +9,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
8
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
9
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
11
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients'
|
|
14
14
|
import { getInitials, getDisplayName } from '../../models'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useState, useRef } from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
4
|
+
import { useClient } from 'cozy-client'
|
|
3
5
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
|
|
4
6
|
import {
|
|
5
7
|
makeActions,
|
|
@@ -10,7 +12,6 @@ import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
|
|
|
10
12
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
11
13
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
12
14
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
13
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
14
15
|
|
|
15
16
|
import { permission } from './actions/permission'
|
|
16
17
|
import { revokeGroup as revokeGroupAction } from './actions/revokeGroup'
|
|
@@ -29,6 +30,7 @@ const GroupRecipientPermissions = ({
|
|
|
29
30
|
}) => {
|
|
30
31
|
const { t } = useI18n()
|
|
31
32
|
const buttonRef = useRef()
|
|
33
|
+
const client = useClient()
|
|
32
34
|
const { revokeGroup, revokeSelf } = useSharingContext()
|
|
33
35
|
|
|
34
36
|
const [isMenuDisplayed, setMenuDisplayed] = useState(false)
|
|
@@ -52,6 +54,7 @@ const GroupRecipientPermissions = ({
|
|
|
52
54
|
const type = isReadOnly ? 'one-way' : 'two-way'
|
|
53
55
|
|
|
54
56
|
const actions = makeActions([permission, divider, revokeGroupAction], {
|
|
57
|
+
client,
|
|
55
58
|
t,
|
|
56
59
|
type,
|
|
57
60
|
isOwner,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
6
|
import Fade from 'cozy-ui/transpiled/react/Fade'
|
|
@@ -10,7 +11,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
|
10
11
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
11
12
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
12
13
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
13
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
14
14
|
|
|
15
15
|
import LinkRecipientPermissions from './LinkRecipientPermissions'
|
|
16
16
|
import RecipientConfirm from './RecipientConfirm'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
6
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
@@ -8,7 +9,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
8
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
9
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
11
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import { checkIsReadOnlyPermissions } from '../../helpers/permissions'
|
|
14
14
|
import withLocales from '../../hoc/withLocales'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React, { useState, useRef } from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
|
|
5
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import { checkIsReadOnlyPermissions } from '../../helpers/permissions'
|
|
8
8
|
import { ShareRestrictionModal } from '../ShareRestrictionModal/ShareRestrictionModal'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { useClient } from 'cozy-client'
|
|
5
6
|
import Fade from 'cozy-ui/transpiled/react/Fade'
|
|
@@ -8,7 +9,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
|
8
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
9
10
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
11
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
11
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import MemberRecipientPermissions from './MemberRecipientPermissions'
|
|
14
14
|
import MemberRecipientStatus from './MemberRecipientStatus'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import { useI18n } from 'twake-i18n'
|
|
3
4
|
|
|
4
5
|
import { useClient } from 'cozy-client'
|
|
5
6
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
6
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
7
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
8
9
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
9
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
10
10
|
|
|
11
11
|
import MemberRecipientStatus from './MemberRecipientStatus'
|
|
12
12
|
import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useCallback } from 'react'
|
|
2
|
+
import { useI18n } from 'twake-i18n'
|
|
2
3
|
|
|
3
4
|
import { useClient } from 'cozy-client'
|
|
4
5
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
|
|
@@ -9,7 +10,6 @@ import {
|
|
|
9
10
|
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
|
|
10
11
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
11
12
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
12
|
-
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
13
13
|
|
|
14
14
|
import { permission } from './actions/permission'
|
|
15
15
|
import { revokeMember } from './actions/revokeMember'
|
|
@@ -56,6 +56,7 @@ const MemberRecipientPermissions = ({
|
|
|
56
56
|
}, [isOwner, onRevoke, onRevokeSelf, document, sharingId, memberIndex])
|
|
57
57
|
|
|
58
58
|
const actions = makeActions([permission, divider, revokeMember], {
|
|
59
|
+
client,
|
|
59
60
|
t,
|
|
60
61
|
type: type ?? 'one-way',
|
|
61
62
|
isOwner,
|