cozy-sharing 16.8.0 → 16.9.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 +11 -0
- package/dist/components/SharingBanner/components/PublicBanner.js +8 -2
- package/dist/components/SharingBanner/components/PublicBanner.spec.js +2 -2
- package/dist/styles/publicBanner.styl +0 -1
- package/dist/stylesheet.css +0 -1
- package/locales/en.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +2 -2
- package/src/components/SharingBanner/components/PublicBanner.jsx +5 -3
- package/src/components/SharingBanner/components/PublicBanner.spec.jsx +2 -2
- package/src/styles/publicBanner.styl +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [16.9.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@16.8.0...cozy-sharing@16.9.0) (2024-12-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **Sharing:** Change style of PublicBanner wording ([ddc8ce3](https://github.com/cozy/cozy-libs/commit/ddc8ce3cfcb1e3cfbdf17f5a7b8d9c8da997b5b0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [16.8.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@16.7.0...cozy-sharing@16.8.0) (2024-12-02)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import snarkdown from 'snarkdown';
|
|
@@ -29,13 +30,18 @@ var PublicBannerCozyToCozyContent = function PublicBannerCozyToCozyContent(_ref)
|
|
|
29
30
|
image: avatarURL
|
|
30
31
|
}));
|
|
31
32
|
var beginning = withAvatar.split('<img src');
|
|
32
|
-
|
|
33
|
+
|
|
34
|
+
var _beginning$1$split$1$ = beginning[1].split('<strong>')[1].split('</strong>'),
|
|
35
|
+
_beginning$1$split$1$2 = _slicedToArray(_beginning$1$split$1$, 2),
|
|
36
|
+
userBoldName = _beginning$1$split$1$2[0],
|
|
37
|
+
ending = _beginning$1$split$1$2[1];
|
|
38
|
+
|
|
33
39
|
return /*#__PURE__*/React.createElement("span", {
|
|
34
40
|
className: styles['bannermarkdown']
|
|
35
41
|
}, beginning[0], /*#__PURE__*/React.createElement("img", {
|
|
36
42
|
src: avatarURL,
|
|
37
43
|
alt: "avatar"
|
|
38
|
-
}),
|
|
44
|
+
}), " ", /*#__PURE__*/React.createElement("strong", null, userBoldName), ending);
|
|
39
45
|
};
|
|
40
46
|
|
|
41
47
|
PublicBannerCozyToCozyContent.propTypes = {
|
|
@@ -18,7 +18,7 @@ describe('PublicBanner', function () {
|
|
|
18
18
|
useI18n.mockReturnValue({
|
|
19
19
|
t: function t(localeToTranslate, options) {
|
|
20
20
|
if (localeToTranslate === 'Share.banner.shared_from') {
|
|
21
|
-
return "Shared from  ").concat(options.name, "'s cozy.");
|
|
21
|
+
return "Shared from  <strong>").concat(options.name, "</strong>'s cozy.");
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return localeToTranslate;
|
|
@@ -42,6 +42,6 @@ describe('PublicBanner', function () {
|
|
|
42
42
|
container = _render.container; // Then
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
expect(container.querySelector('.bannermarkdown').innerHTML).toEqual("Shared from <img src=\"http://cozy.localhost:8080/public/avatar?fallback=initials\" alt=\"avatar\">
|
|
45
|
+
expect(container.querySelector('.bannermarkdown').innerHTML).toEqual("Shared from <img src=\"http://cozy.localhost:8080/public/avatar?fallback=initials\" alt=\"avatar\"> <strong><a href=\"https://evil.com\">Click me!</a></strong>'s cozy.");
|
|
46
46
|
});
|
|
47
47
|
});
|
package/dist/stylesheet.css
CHANGED
package/locales/en.json
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"loadingError": "Loading error",
|
|
58
58
|
"banner": {
|
|
59
|
-
"shared_from": "The items below are displayed from 
|
|
59
|
+
"shared_from": "The items below are displayed from  **%{name}**'s Cozy. You can add a link to this share in your Cozy",
|
|
60
60
|
"whats_cozy": "Cozy is a secure digital home for all your data, hosted in France - ",
|
|
61
61
|
"know_more": "More information",
|
|
62
62
|
"sync_to_mine": "Synchronise in my Cozy",
|
package/locales/fr.json
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"loadingError": "Erreur de chargement",
|
|
58
58
|
"banner": {
|
|
59
|
-
"shared_from": "Les éléments ci-dessous sont affichés depuis le Cozy de 
|
|
59
|
+
"shared_from": "Les éléments ci-dessous sont affichés depuis le Cozy de  **%{name}**. Vous pouvez ajouter un lien vers ce partage dans votre Cozy.",
|
|
60
60
|
"whats_cozy": "Cozy est un domicile numérique sécurisé pour toutes vos données, hébergé en France - ",
|
|
61
61
|
"know_more": "En savoir plus",
|
|
62
62
|
"sync_to_mine": "Synchroniser dans mon Cozy",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.9.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"sideEffects": [
|
|
72
72
|
"*.css"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "8b0b03c7978ff9bff74635d31a8e4ec259294200"
|
|
75
75
|
}
|
|
@@ -28,13 +28,15 @@ const PublicBannerCozyToCozyContent = ({ sharing }) => {
|
|
|
28
28
|
})
|
|
29
29
|
)
|
|
30
30
|
const beginning = withAvatar.split('<img src')
|
|
31
|
-
const
|
|
31
|
+
const [userBoldName, ending] = beginning[1]
|
|
32
|
+
.split('<strong>')[1]
|
|
33
|
+
.split('</strong>')
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<span className={styles['bannermarkdown']}>
|
|
35
37
|
{beginning[0]}
|
|
36
|
-
<img src={avatarURL} alt="avatar" />
|
|
37
|
-
{
|
|
38
|
+
<img src={avatarURL} alt="avatar" /> <strong>{userBoldName}</strong>
|
|
39
|
+
{ending}
|
|
38
40
|
</span>
|
|
39
41
|
)
|
|
40
42
|
}
|
|
@@ -21,7 +21,7 @@ describe('PublicBanner', () => {
|
|
|
21
21
|
useI18n.mockReturnValue({
|
|
22
22
|
t: (localeToTranslate, options) => {
|
|
23
23
|
if (localeToTranslate === 'Share.banner.shared_from') {
|
|
24
|
-
return `Shared from 
|
|
24
|
+
return `Shared from  <strong>${options.name}</strong>'s cozy.`
|
|
25
25
|
}
|
|
26
26
|
return localeToTranslate
|
|
27
27
|
}
|
|
@@ -41,7 +41,7 @@ describe('PublicBanner', () => {
|
|
|
41
41
|
|
|
42
42
|
// Then
|
|
43
43
|
expect(container.querySelector('.bannermarkdown').innerHTML).toEqual(
|
|
44
|
-
`Shared from <img src="http://cozy.localhost:8080/public/avatar?fallback=initials" alt="avatar">
|
|
44
|
+
`Shared from <img src="http://cozy.localhost:8080/public/avatar?fallback=initials" alt="avatar"> <strong><a href="https://evil.com">Click me!</a></strong>'s cozy.`
|
|
45
45
|
)
|
|
46
46
|
})
|
|
47
47
|
})
|