cozy-sharing 27.0.5 → 27.0.6
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,12 @@
|
|
|
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
|
+
## [27.0.6](https://github.com/cozy/cozy-libs/compare/cozy-sharing@27.0.5...cozy-sharing@27.0.6) (2025-11-14)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- Update create cozy link ([bb8fad8](https://github.com/cozy/cozy-libs/commit/bb8fad8c9af3e247e364d82103e4a12ee688e1fa))
|
|
11
|
+
|
|
6
12
|
## [27.0.5](https://github.com/cozy/cozy-libs/compare/cozy-sharing@27.0.4...cozy-sharing@27.0.5) (2025-11-13)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package cozy-sharing
|
|
@@ -6,6 +6,7 @@ import { useClient, models } from 'cozy-client';
|
|
|
6
6
|
import logger from '../../../logger';
|
|
7
7
|
import { buildSharingsByIdQuery } from '../../../queries/queries';
|
|
8
8
|
import getQueryParameter from '../helpers/QueryParameter';
|
|
9
|
+
import flag from 'cozy-flags';
|
|
9
10
|
|
|
10
11
|
var getSharingId = function getSharingId(permission) {
|
|
11
12
|
var sourceId = permission.data.attributes.source_id;
|
|
@@ -13,7 +14,6 @@ var getSharingId = function getSharingId(permission) {
|
|
|
13
14
|
return sharingId;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
var CREATE_COZY_LINK = 'https://manager.cozycloud.cc/cozy/create';
|
|
17
17
|
export var useSharingInfos = function useSharingInfos() {
|
|
18
18
|
var previewPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/preview';
|
|
19
19
|
var client = useClient();
|
|
@@ -43,6 +43,7 @@ export var useSharingInfos = function useSharingInfos() {
|
|
|
43
43
|
loading = _useState10[0],
|
|
44
44
|
setLoading = _useState10[1];
|
|
45
45
|
|
|
46
|
+
var createCozyLink = flag('signup-url') || 'https://sign-up.twake.app';
|
|
46
47
|
useEffect(function () {
|
|
47
48
|
var loadSharingDiscoveryLink = /*#__PURE__*/function () {
|
|
48
49
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -112,7 +113,7 @@ export var useSharingInfos = function useSharingInfos() {
|
|
|
112
113
|
loading: loading,
|
|
113
114
|
addSharingLink: addSharingLink,
|
|
114
115
|
syncSharingLink: syncSharingLink,
|
|
115
|
-
createCozyLink:
|
|
116
|
+
createCozyLink: createCozyLink,
|
|
116
117
|
isSharingShortcutCreated: isSharingShortcutCreated
|
|
117
118
|
};
|
|
118
119
|
};
|
package/dist/helpers/sharings.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fetchFilesPaths } from './files';
|
|
|
8
8
|
import { updateInternalObjectFromRealtime, normalizeDocFromRealtime } from './realtime';
|
|
9
9
|
import logger from '../logger';
|
|
10
10
|
import { addSharing, updateSharing } from '../state';
|
|
11
|
-
var CREATE_COZY_HREF = 'https://
|
|
11
|
+
var CREATE_COZY_HREF = 'https://sign-up.twake.app';
|
|
12
12
|
export var getSharingObject = function getSharingObject(internalSharing, sharing) {
|
|
13
13
|
if (internalSharing) {
|
|
14
14
|
return updateInternalObjectFromRealtime(internalSharing, sharing);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.6",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"sideEffects": [
|
|
82
82
|
"*.css"
|
|
83
83
|
],
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "3a0c0103636a6365a7d2a380960d7e7d773078eb"
|
|
85
85
|
}
|
|
@@ -5,6 +5,7 @@ import { useClient, models } from 'cozy-client'
|
|
|
5
5
|
import logger from '../../../logger'
|
|
6
6
|
import { buildSharingsByIdQuery } from '../../../queries/queries'
|
|
7
7
|
import getQueryParameter from '../helpers/QueryParameter'
|
|
8
|
+
import flag from 'cozy-flags'
|
|
8
9
|
|
|
9
10
|
const getSharingId = permission => {
|
|
10
11
|
const sourceId = permission.data.attributes.source_id
|
|
@@ -12,8 +13,6 @@ const getSharingId = permission => {
|
|
|
12
13
|
return sharingId
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
const CREATE_COZY_LINK = 'https://manager.cozycloud.cc/cozy/create'
|
|
16
|
-
|
|
17
16
|
export const useSharingInfos = (previewPath = '/preview') => {
|
|
18
17
|
const client = useClient()
|
|
19
18
|
|
|
@@ -23,6 +22,7 @@ export const useSharingInfos = (previewPath = '/preview') => {
|
|
|
23
22
|
useState(false)
|
|
24
23
|
const [sharing, setSharing] = useState()
|
|
25
24
|
const [loading, setLoading] = useState(true)
|
|
25
|
+
const createCozyLink = flag('signup-url') || 'https://sign-up.twake.app'
|
|
26
26
|
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
const loadSharingDiscoveryLink = async () => {
|
|
@@ -71,7 +71,7 @@ export const useSharingInfos = (previewPath = '/preview') => {
|
|
|
71
71
|
loading,
|
|
72
72
|
addSharingLink,
|
|
73
73
|
syncSharingLink,
|
|
74
|
-
createCozyLink
|
|
74
|
+
createCozyLink,
|
|
75
75
|
isSharingShortcutCreated
|
|
76
76
|
}
|
|
77
77
|
}
|
package/src/helpers/sharings.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import logger from '../logger'
|
|
12
12
|
import { addSharing, updateSharing } from '../state'
|
|
13
13
|
|
|
14
|
-
const CREATE_COZY_HREF = 'https://
|
|
14
|
+
const CREATE_COZY_HREF = 'https://sign-up.twake.app'
|
|
15
15
|
|
|
16
16
|
export const getSharingObject = (internalSharing, sharing) => {
|
|
17
17
|
if (internalSharing) {
|