@mjhls/mjh-framework 1.0.302 → 1.0.303
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/README.md +1 -1
- package/dist/cjs/index.js +8 -10
- package/dist/esm/index.js +8 -10
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -16948,9 +16948,9 @@ var LoginForm = function LoginForm(props) {
|
|
|
16948
16948
|
break;
|
|
16949
16949
|
}
|
|
16950
16950
|
|
|
16951
|
-
// here, Router.push() does not carry new cookie value.
|
|
16951
|
+
// here, Router.push() does not carry new cookie value.
|
|
16952
16952
|
// so need hard redirect
|
|
16953
|
-
window.location.href =
|
|
16953
|
+
window.location.href = callbackUrl;
|
|
16954
16954
|
_context.next = 18;
|
|
16955
16955
|
break;
|
|
16956
16956
|
|
|
@@ -16986,6 +16986,10 @@ var LoginForm = function LoginForm(props) {
|
|
|
16986
16986
|
};
|
|
16987
16987
|
}();
|
|
16988
16988
|
|
|
16989
|
+
var _props$callbackUrl = props.callbackUrl,
|
|
16990
|
+
callbackUrl = _props$callbackUrl === undefined ? '/' : _props$callbackUrl;
|
|
16991
|
+
|
|
16992
|
+
|
|
16989
16993
|
React.useEffect(function () {
|
|
16990
16994
|
if (props.user) {
|
|
16991
16995
|
window.location.href = '/auth/profile';
|
|
@@ -17038,13 +17042,7 @@ var LoginForm = function LoginForm(props) {
|
|
|
17038
17042
|
loading && React__default.createElement(
|
|
17039
17043
|
reactBootstrap.Button,
|
|
17040
17044
|
{ variant: 'primary', disabled: true },
|
|
17041
|
-
React__default.createElement(reactBootstrap.Spinner, {
|
|
17042
|
-
as: 'span',
|
|
17043
|
-
animation: 'border',
|
|
17044
|
-
role: 'status',
|
|
17045
|
-
'aria-hidden': 'true',
|
|
17046
|
-
size: 'sm'
|
|
17047
|
-
}),
|
|
17045
|
+
React__default.createElement(reactBootstrap.Spinner, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
|
|
17048
17046
|
React__default.createElement(
|
|
17049
17047
|
'span',
|
|
17050
17048
|
{ className: 'sr-only' },
|
|
@@ -17061,7 +17059,7 @@ var LoginForm = function LoginForm(props) {
|
|
|
17061
17059
|
React__default.createElement(
|
|
17062
17060
|
'style',
|
|
17063
17061
|
{ jsx: 'true'.toString() },
|
|
17064
|
-
'
|
|
17062
|
+
'\n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
|
|
17065
17063
|
)
|
|
17066
17064
|
);
|
|
17067
17065
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -16946,9 +16946,9 @@ var LoginForm = function LoginForm(props) {
|
|
|
16946
16946
|
break;
|
|
16947
16947
|
}
|
|
16948
16948
|
|
|
16949
|
-
// here, Router.push() does not carry new cookie value.
|
|
16949
|
+
// here, Router.push() does not carry new cookie value.
|
|
16950
16950
|
// so need hard redirect
|
|
16951
|
-
window.location.href =
|
|
16951
|
+
window.location.href = callbackUrl;
|
|
16952
16952
|
_context.next = 18;
|
|
16953
16953
|
break;
|
|
16954
16954
|
|
|
@@ -16984,6 +16984,10 @@ var LoginForm = function LoginForm(props) {
|
|
|
16984
16984
|
};
|
|
16985
16985
|
}();
|
|
16986
16986
|
|
|
16987
|
+
var _props$callbackUrl = props.callbackUrl,
|
|
16988
|
+
callbackUrl = _props$callbackUrl === undefined ? '/' : _props$callbackUrl;
|
|
16989
|
+
|
|
16990
|
+
|
|
16987
16991
|
useEffect(function () {
|
|
16988
16992
|
if (props.user) {
|
|
16989
16993
|
window.location.href = '/auth/profile';
|
|
@@ -17036,13 +17040,7 @@ var LoginForm = function LoginForm(props) {
|
|
|
17036
17040
|
loading && React__default.createElement(
|
|
17037
17041
|
Button$1,
|
|
17038
17042
|
{ variant: 'primary', disabled: true },
|
|
17039
|
-
React__default.createElement(Spinner$1, {
|
|
17040
|
-
as: 'span',
|
|
17041
|
-
animation: 'border',
|
|
17042
|
-
role: 'status',
|
|
17043
|
-
'aria-hidden': 'true',
|
|
17044
|
-
size: 'sm'
|
|
17045
|
-
}),
|
|
17043
|
+
React__default.createElement(Spinner$1, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
|
|
17046
17044
|
React__default.createElement(
|
|
17047
17045
|
'span',
|
|
17048
17046
|
{ className: 'sr-only' },
|
|
@@ -17059,7 +17057,7 @@ var LoginForm = function LoginForm(props) {
|
|
|
17059
17057
|
React__default.createElement(
|
|
17060
17058
|
'style',
|
|
17061
17059
|
{ jsx: 'true'.toString() },
|
|
17062
|
-
'
|
|
17060
|
+
'\n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
|
|
17063
17061
|
)
|
|
17064
17062
|
);
|
|
17065
17063
|
};
|