@eeacms/volto-clms-theme 1.1.293 → 1.1.294
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,6 +4,11 @@ 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
|
+
### [1.1.294](https://github.com/eea/volto-clms-theme/compare/1.1.293...1.1.294) - 5 June 2026
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Fix redirect [Dobricean Ioan Dorian - [`18dc53d`](https://github.com/eea/volto-clms-theme/commit/18dc53d5b4fde69cf2ce95013ce7624b8dcb156d)]
|
|
7
12
|
### [1.1.293](https://github.com/eea/volto-clms-theme/compare/1.1.292...1.1.293) - 5 June 2026
|
|
8
13
|
|
|
9
14
|
#### :house: Internal changes
|
package/package.json
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
Grid,
|
|
15
15
|
} from 'semantic-ui-react';
|
|
16
16
|
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
|
17
|
-
import qs from 'query-string';
|
|
18
17
|
import { useCookies } from 'react-cookie';
|
|
19
18
|
|
|
20
19
|
import { Helmet } from '@plone/volto/helpers';
|
|
@@ -34,6 +33,7 @@ import {
|
|
|
34
33
|
oidcRedirect,
|
|
35
34
|
} from '@plone-collective/volto-authomatic/actions';
|
|
36
35
|
import AuthProviders from '@plone-collective/volto-authomatic/components/AuthProviders/AuthProviders';
|
|
36
|
+
import { getReturnUrl } from './loginUrl';
|
|
37
37
|
|
|
38
38
|
const messages = defineMessages({
|
|
39
39
|
login: {
|
|
@@ -92,21 +92,6 @@ const messages = defineMessages({
|
|
|
92
92
|
},
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
/**
|
|
96
|
-
* Get return url function.
|
|
97
|
-
* @function getReturnUrl
|
|
98
|
-
* @param {Object} location Location object.
|
|
99
|
-
* @returns {string} Return url.
|
|
100
|
-
*/
|
|
101
|
-
function getReturnUrl(location) {
|
|
102
|
-
return `${
|
|
103
|
-
qs.parse(location.search).return_url ||
|
|
104
|
-
(location.pathname === '/login'
|
|
105
|
-
? '/'
|
|
106
|
-
: location.pathname.replace('/login', ''))
|
|
107
|
-
}`;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
95
|
/**
|
|
111
96
|
* Combined Login function.
|
|
112
97
|
* @function Login
|
|
@@ -131,10 +116,7 @@ function Login({ intl }) {
|
|
|
131
116
|
const error = useSelector((state) => state.userSession.login.error);
|
|
132
117
|
const ploneLoading = useSelector((state) => state.userSession.login.loading);
|
|
133
118
|
|
|
134
|
-
const returnUrl =
|
|
135
|
-
qs.parse(location.search).return_url ||
|
|
136
|
-
location.pathname.replace(/\/login\/?$/, '').replace(/\/logout\/?$/, '') ||
|
|
137
|
-
'/';
|
|
119
|
+
const returnUrl = getReturnUrl(location);
|
|
138
120
|
|
|
139
121
|
useEffect(() => {
|
|
140
122
|
dispatch(listAuthOptions());
|