cozy-search 0.6.0 → 0.6.1
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.
|
@@ -17,6 +17,8 @@ var _contact = require("cozy-client/dist/models/contact");
|
|
|
17
17
|
|
|
18
18
|
var _Avatar = _interopRequireDefault(require("cozy-ui/transpiled/react/Avatar"));
|
|
19
19
|
|
|
20
|
+
var _I18n = require("cozy-ui/transpiled/react/providers/I18n");
|
|
21
|
+
|
|
20
22
|
var _ChatItem = _interopRequireDefault(require("./ChatItem"));
|
|
21
23
|
|
|
22
24
|
var _excluded = ["className", "label", "myself"];
|
|
@@ -26,13 +28,20 @@ var ChatUserItem = function ChatUserItem(_ref) {
|
|
|
26
28
|
label = _ref.label,
|
|
27
29
|
myself = _ref.myself,
|
|
28
30
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
+
|
|
32
|
+
var _useI18n = (0, _I18n.useI18n)(),
|
|
33
|
+
t = _useI18n.t;
|
|
34
|
+
|
|
35
|
+
var contact = myself || {
|
|
36
|
+
displayName: t('assistant.default_username')
|
|
37
|
+
};
|
|
29
38
|
return /*#__PURE__*/_react.default.createElement(_ChatItem.default, (0, _extends2.default)({}, props, {
|
|
30
39
|
className: className,
|
|
31
40
|
icon: /*#__PURE__*/_react.default.createElement(_Avatar.default, {
|
|
32
|
-
text: (0, _contact.getInitials)(
|
|
41
|
+
text: (0, _contact.getInitials)(contact),
|
|
33
42
|
size: 24
|
|
34
43
|
}),
|
|
35
|
-
name: (0, _contact.getDisplayName)(
|
|
44
|
+
name: (0, _contact.getDisplayName)(contact),
|
|
36
45
|
label: label
|
|
37
46
|
}));
|
|
38
47
|
};
|
package/dist/locales/en.json
CHANGED
package/dist/locales/fr.json
CHANGED
package/dist/locales/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var en = {
|
|
|
16
16
|
close: "Close"
|
|
17
17
|
},
|
|
18
18
|
name: "Twake Assistant",
|
|
19
|
+
default_username: "Anonymous",
|
|
19
20
|
sources: "%{smart_count} source |||| %{smart_count} sources",
|
|
20
21
|
suggestions: {
|
|
21
22
|
find_file: "Search a file",
|
|
@@ -36,6 +37,7 @@ var fr = {
|
|
|
36
37
|
close: "Fermer"
|
|
37
38
|
},
|
|
38
39
|
name: "Assistant Twake",
|
|
40
|
+
default_username: "Anonyme",
|
|
39
41
|
sources: "%{smart_count} source |||| %{smart_count} sources",
|
|
40
42
|
suggestions: {
|
|
41
43
|
find_file: "Rechercher un fichier",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-search",
|
|
3
3
|
"description": "UI components about search bar and IA assistant",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cozy Cloud",
|
|
7
7
|
"url": "https://github.com/cozy"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"lint": "cd .. && yarn eslint --ext js,jsx,ts packages/cozy-search"
|
|
88
88
|
},
|
|
89
89
|
"types": "dist/index.d.ts",
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "e1c26533651aaa8d8a7c6f8ddd4508a3b319c28a"
|
|
91
91
|
}
|