cozy-sharing 25.0.0 → 25.1.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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [25.1.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@25.0.0...cozy-sharing@25.1.0) (2025-03-25)
7
+
8
+ ### Bug Fixes
9
+
10
+ - Missing translation ([a5d0464](https://github.com/cozy/cozy-libs/commit/a5d0464e09a1be6027b94d1d2ab9a965422f236d))
11
+
12
+ ### Features
13
+
14
+ - Dynamic title in BoxEditingRights ([909cdc4](https://github.com/cozy/cozy-libs/commit/909cdc417015c66e2e2d52ee5fb665f739b74dbf))
15
+
6
16
  # [25.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@24.0.0...cozy-sharing@25.0.0) (2025-03-17)
7
17
 
8
18
  ### Features
@@ -44,6 +44,7 @@ export var BoxEditingRights = function BoxEditingRights(_ref) {
44
44
  documentType: documentType,
45
45
  isDirectory: isDirectory
46
46
  });
47
+ var textPrimary = editingRights === 'readOnly' ? t('BoxEditingRights.readOnlyTitle') : t('BoxEditingRights.editTitle');
47
48
  var textSecondary = editingRights === 'readOnly' ? t('Share.permissionLink.readDescription') : t('Share.permissionLink.writeDescription');
48
49
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
49
50
  borderRadius: "0.5rem",
@@ -59,7 +60,7 @@ export var BoxEditingRights = function BoxEditingRights(_ref) {
59
60
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
60
61
  icon: PeopleIcon
61
62
  })), /*#__PURE__*/React.createElement(ListItemText, {
62
- primary: t('BoxEditingRights.text'),
63
+ primary: textPrimary,
63
64
  secondary: textSecondary
64
65
  }), /*#__PURE__*/React.createElement(ListItemIcon, {
65
66
  className: "u-mr-half"
package/locales/en.json CHANGED
@@ -425,6 +425,7 @@
425
425
  }
426
426
  },
427
427
  "ShareRestrictionModal": {
428
+ "title": "Sharing link",
428
429
  "action": {
429
430
  "confirm": "Confirm"
430
431
  },
@@ -439,9 +440,10 @@
439
440
  "text": "Limit access with a password"
440
441
  },
441
442
  "BoxEditingRights": {
443
+ "editTitle": "Editing rights",
444
+ "readOnlyTitle": "Reading rights",
442
445
  "editSubText": "People with access to the link can modify the content",
443
- "readOnlySubText": "People who have access to the link can only view the content",
444
- "text": "Editing rights"
446
+ "readOnlySubText": "People who have access to the link can only view the content"
445
447
  },
446
448
  "copyReminderContent": {
447
449
  "success": "Copied to clipboard",
package/locales/fr.json CHANGED
@@ -438,9 +438,10 @@
438
438
  "text": "Limiter l'accès par un mot de passe"
439
439
  },
440
440
  "BoxEditingRights": {
441
+ "editTitle": "Droit d'édition",
442
+ "readOnlyTitle": "Droit de lecture",
441
443
  "editSubText": "Les personnes ayant accès au lien peuvent modifier le contenu",
442
- "readOnlySubText": "Les personnes ayant accès au lien peuvent uniquement consulter le contenu",
443
- "text": "Droit d’édition"
444
+ "readOnlySubText": "Les personnes ayant accès au lien peuvent uniquement consulter le contenu"
444
445
  },
445
446
  "copyReminderContent": {
446
447
  "success": "Copié dans le presse-papier",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "25.0.0",
3
+ "version": "25.1.0",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -79,5 +79,5 @@
79
79
  "sideEffects": [
80
80
  "*.css"
81
81
  ],
82
- "gitHead": "33dab08dabe1d4d7367cc83642c749d3af9edefa"
82
+ "gitHead": "c696f2743f0031a04d7f045d4da2b91c1bb83f98"
83
83
  }
@@ -37,6 +37,11 @@ export const BoxEditingRights = ({ file, editingRights, setEditingRights }) => {
37
37
  isDirectory
38
38
  })
39
39
 
40
+ const textPrimary =
41
+ editingRights === 'readOnly'
42
+ ? t('BoxEditingRights.readOnlyTitle')
43
+ : t('BoxEditingRights.editTitle')
44
+
40
45
  const textSecondary =
41
46
  editingRights === 'readOnly'
42
47
  ? t('Share.permissionLink.readDescription')
@@ -59,10 +64,7 @@ export const BoxEditingRights = ({ file, editingRights, setEditingRights }) => {
59
64
  <ListItemIcon>
60
65
  <Icon icon={PeopleIcon} />
61
66
  </ListItemIcon>
62
- <ListItemText
63
- primary={t('BoxEditingRights.text')}
64
- secondary={textSecondary}
65
- />
67
+ <ListItemText primary={textPrimary} secondary={textSecondary} />
66
68
  <ListItemIcon className="u-mr-half">
67
69
  <Icon icon={BottomIcon} />
68
70
  </ListItemIcon>