cozy-viewer 13.0.0 → 13.0.2
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,28 @@
|
|
|
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
|
+
## [13.0.2](https://github.com/cozy/cozy-libs/compare/cozy-viewer@13.0.1...cozy-viewer@13.0.2) (2025-01-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **Viewer:** Now hide option to see file folder on public pages ([3eda54a](https://github.com/cozy/cozy-libs/commit/3eda54a32ada848b192eb18fbd0e4596b03ef565))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [13.0.1](https://github.com/cozy/cozy-libs/compare/cozy-viewer@13.0.0...cozy-viewer@13.0.1) (2025-01-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **Viewer:** Sharing panel is no longer shown on public pages ([c434b12](https://github.com/cozy/cozy-libs/commit/c434b1289dc0b64e59dbfd1113aa484e9e742100))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [13.0.0](https://github.com/cozy/cozy-libs/compare/cozy-viewer@12.0.3...cozy-viewer@13.0.0) (2025-01-08)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -61,6 +61,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
61
61
|
|
|
62
62
|
var Informations = function Informations(_ref) {
|
|
63
63
|
var file = _ref.file,
|
|
64
|
+
isPublic = _ref.isPublic,
|
|
64
65
|
t = _ref.t;
|
|
65
66
|
|
|
66
67
|
var _useState = (0, _react.useState)(false),
|
|
@@ -98,7 +99,7 @@ var Informations = function Informations(_ref) {
|
|
|
98
99
|
})), /*#__PURE__*/_react.default.createElement(_ListItemText.default, {
|
|
99
100
|
primary: path,
|
|
100
101
|
secondary: t('Viewer.panel.informations.location')
|
|
101
|
-
}), /*#__PURE__*/_react.default.createElement(_ListItemSecondaryAction.default, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
102
|
+
}), !isPublic && /*#__PURE__*/_react.default.createElement(_ListItemSecondaryAction.default, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
102
103
|
ref: anchorRef,
|
|
103
104
|
onClick: function onClick() {
|
|
104
105
|
return setShowMenu(function (v) {
|
|
@@ -155,6 +156,7 @@ var Informations = function Informations(_ref) {
|
|
|
155
156
|
|
|
156
157
|
Informations.propTypes = {
|
|
157
158
|
file: _propTypes.default.object.isRequired,
|
|
159
|
+
isPublic: _propTypes.default.bool,
|
|
158
160
|
t: _propTypes.default.func
|
|
159
161
|
};
|
|
160
162
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-viewer",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
4
4
|
"description": "Cozy-Viewer provides a component to show files in a viewer.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"babel-preset-cozy-app": "^2.8.1",
|
|
28
28
|
"cozy-client": "^52.1.0",
|
|
29
29
|
"cozy-device-helper": "2.0.0",
|
|
30
|
-
"cozy-harvest-lib": "^32.2.
|
|
30
|
+
"cozy-harvest-lib": "^32.2.8",
|
|
31
31
|
"cozy-intent": "^2.29.1",
|
|
32
32
|
"cozy-logger": "^1.16.1",
|
|
33
33
|
"cozy-sharing": "^19.0.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react": ">=16.12.0",
|
|
60
60
|
"react-dom": ">=16.12.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1f870295d2bbc0b0a74367d7b3e70c5606c4eec6"
|
|
63
63
|
}
|
|
@@ -27,7 +27,7 @@ import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
|
27
27
|
import { makeFormat, makeSize, makeDate, makePath } from './helpers'
|
|
28
28
|
import { withViewerLocales } from '../hoc/withViewerLocales'
|
|
29
29
|
|
|
30
|
-
const Informations = ({ file, t }) => {
|
|
30
|
+
const Informations = ({ file, isPublic, t }) => {
|
|
31
31
|
const [showMenu, setShowMenu] = useState(false)
|
|
32
32
|
const { f, lang } = useI18n()
|
|
33
33
|
const format = makeFormat(file)
|
|
@@ -69,11 +69,13 @@ const Informations = ({ file, t }) => {
|
|
|
69
69
|
primary={path}
|
|
70
70
|
secondary={t('Viewer.panel.informations.location')}
|
|
71
71
|
/>
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
{!isPublic && (
|
|
73
|
+
<ListItemSecondaryAction>
|
|
74
|
+
<IconButton ref={anchorRef} onClick={() => setShowMenu(v => !v)}>
|
|
75
|
+
<Icon icon={DotsIcon} />
|
|
76
|
+
</IconButton>
|
|
77
|
+
</ListItemSecondaryAction>
|
|
78
|
+
)}
|
|
77
79
|
</ListItem>
|
|
78
80
|
{showMenu && (
|
|
79
81
|
<ActionsMenu
|
|
@@ -142,6 +144,7 @@ const Informations = ({ file, t }) => {
|
|
|
142
144
|
|
|
143
145
|
Informations.propTypes = {
|
|
144
146
|
file: PropTypes.object.isRequired,
|
|
147
|
+
isPublic: PropTypes.bool,
|
|
145
148
|
t: PropTypes.func
|
|
146
149
|
}
|
|
147
150
|
|