@eeacms/volto-cca-policy 0.1.97 → 0.1.98

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
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- ### [0.1.97](https://github.com/eea/volto-cca-policy/compare/0.1.96...0.1.97) - 19 March 2024
7
+ ### [0.1.98](https://github.com/eea/volto-cca-policy/compare/0.1.97...0.1.98) - 21 March 2024
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Fix sync translation link [Tiberiu Ichim - [`1d161e9`](https://github.com/eea/volto-cca-policy/commit/1d161e9a8fe8d6a3734d6d5b8399bb547be8d530)]
12
+ ### [0.1.97](https://github.com/eea/volto-cca-policy/compare/0.1.96...0.1.97) - 20 March 2024
8
13
 
9
14
  #### :rocket: New Features
10
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.97",
3
+ "version": "0.1.98",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -1,5 +1,5 @@
1
1
  import { Plug } from '@plone/volto/components/manage/Pluggable';
2
- import { getBaseUrl, toPublicURL } from '@plone/volto/helpers';
2
+ import { getBaseUrl, toPublicURL, addAppURL } from '@plone/volto/helpers';
3
3
 
4
4
  const button = (id, title, label, destination) => (
5
5
  <button
@@ -18,52 +18,46 @@ function MigrationButtons(props) {
18
18
  const show = !!token && contentId;
19
19
  const base = getBaseUrl(pathname);
20
20
  let buttons = [
21
- button(
22
- 'migration',
23
- 'Migrate context',
24
- 'M',
25
- `http://localhost:8080/cca/${base}/@@volto_migrate`,
26
- ),
27
- button(
28
- 'view',
29
- 'View original',
30
- 'V',
31
- `https://climate-adapt.eea.europa.eu${base}`,
32
- ),
33
- button(
34
- 'debug',
35
- 'Debug',
36
- 'PDB',
37
- `http://localhost:8080/cca/${base}/@@gopdb`,
38
- ),
39
- button(
40
- 'translate',
41
- 'Translate',
42
- 'T',
43
- `http://localhost:8080/cca/${base}/@@volto-html`,
44
- ),
45
- button(
46
- 'preview',
47
- 'Preview Translation',
48
- 'P',
49
- `http://localhost:8080/cca/${base}/@@volto-html?half=1`,
50
- ),
51
21
  button(
52
22
  'sync-translations',
53
23
  'Sync Translations',
54
24
  'RT',
55
- toPublicURL(`${base}/@@translate-this-async`),
25
+ addAppURL(toPublicURL(`${base}/@@translate-this-async`)),
56
26
  ),
57
27
  ];
58
-
59
- if (contentId.indexOf('europa.eu') > -1) {
28
+ if (contentId.indexOf('europa.eu') === -1) {
60
29
  buttons = [
61
30
  button(
62
- 'sync-translations',
63
- 'Sync Translations',
31
+ 'migration',
32
+ 'Migrate context',
33
+ 'M',
34
+ `http://localhost:8080/cca/${base}/@@volto_migrate`,
35
+ ),
36
+ button(
37
+ 'view',
38
+ 'View original',
39
+ 'V',
40
+ `https://climate-adapt.eea.europa.eu${base}`,
41
+ ),
42
+ button(
43
+ 'debug',
44
+ 'Debug',
45
+ 'PDB',
46
+ `http://localhost:8080/cca/${base}/@@gopdb`,
47
+ ),
48
+ button(
49
+ 'translate',
50
+ 'Translate',
64
51
  'T',
65
- `/${base}/@@translate-this-async`,
52
+ `http://localhost:8080/cca/${base}/@@volto-html`,
53
+ ),
54
+ button(
55
+ 'preview',
56
+ 'Preview Translation',
57
+ 'P',
58
+ `http://localhost:8080/cca/${base}/@@volto-html?half=1`,
66
59
  ),
60
+ ...buttons,
67
61
  ];
68
62
  }
69
63