sass-template-common 0.9.49 → 0.9.50
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.
|
@@ -11930,7 +11930,7 @@ function Cu({
|
|
|
11930
11930
|
if (document.cookie.search(e.COGNITO_AUTH_PREFIX + "IS_AUTH=true") !== -1) {
|
|
11931
11931
|
if (!window) return;
|
|
11932
11932
|
const L = b("redirect_after_login_1");
|
|
11933
|
-
console.log("Redirect path after login:", L, document.cookie, document.cookie.search("redirect_after_login_1=") !== -1), L && L !== "" ? (
|
|
11933
|
+
console.log("Redirect path after login:", L, document.cookie, document.cookie.search("redirect_after_login_1=") !== -1), L && L !== "" ? (window.location.pathname = L, window.location.hash = "comentarios") : window.location.pathname = "/auth/success";
|
|
11934
11934
|
}
|
|
11935
11935
|
};
|
|
11936
11936
|
return /* @__PURE__ */ p(Y, { children: [
|
|
@@ -14383,36 +14383,36 @@ function Kl({
|
|
|
14383
14383
|
);
|
|
14384
14384
|
}
|
|
14385
14385
|
const _s = ({ onClick: e, isDisabled: t, API_ENV: s, icon: a, handleGoogleLogin: r, showAlert: i }) => {
|
|
14386
|
-
const [o, c] = le.useState(!1),
|
|
14386
|
+
const [o, c] = le.useState(!1), [u, l] = le.useState(!1), [d, m] = le.useState(!1);
|
|
14387
14387
|
le.useEffect(() => {
|
|
14388
|
-
let
|
|
14389
|
-
return o && (
|
|
14388
|
+
let g = null;
|
|
14389
|
+
return o && (g = setTimeout(() => {
|
|
14390
14390
|
c(!1);
|
|
14391
14391
|
}, 2400)), () => {
|
|
14392
|
-
|
|
14392
|
+
g && clearTimeout(g);
|
|
14393
14393
|
};
|
|
14394
14394
|
}, [o]), le.useEffect(() => {
|
|
14395
|
-
if (!
|
|
14396
|
-
const
|
|
14397
|
-
if (!
|
|
14398
|
-
const
|
|
14399
|
-
|
|
14395
|
+
if (!u || !s.CONFIG_commentsV2 || !i || !document) return;
|
|
14396
|
+
const g = document.getElementById("comment-button");
|
|
14397
|
+
if (!g) return;
|
|
14398
|
+
const f = g.closest(".comment-form"), A = f?.querySelector('input[name="username"]'), w = f?.querySelector('textarea[name="comment"]'), v = f?.querySelector("textarea.g-recaptcha-response") ?? document.querySelector("#g-recaptcha-response");
|
|
14399
|
+
A?.value?.trim() && w?.value?.trim() && v?.value?.trim() && g.click();
|
|
14400
14400
|
});
|
|
14401
|
-
const
|
|
14402
|
-
return o ? /* @__PURE__ */ n("div", { className: "success-gif-container su-flex-center su-relative", children: /* @__PURE__ */ n("img", { className: "success-gif su-absolute", src:
|
|
14403
|
-
|
|
14404
|
-
|
|
14401
|
+
const h = oe("/Success.gif");
|
|
14402
|
+
return o ? /* @__PURE__ */ n("div", { className: "success-gif-container su-flex-center su-relative", children: /* @__PURE__ */ n("img", { className: "success-gif su-absolute", src: h }) }) : /* @__PURE__ */ p(Y, { children: [
|
|
14403
|
+
d && s.CONFIG_commentsV2 && i && /* @__PURE__ */ n(Kl, { API_ENV: s, icon: a, handleGoogleLogin: r, onClose: (g) => {
|
|
14404
|
+
g && l(!0), m(!1);
|
|
14405
14405
|
} }),
|
|
14406
14406
|
/* @__PURE__ */ p(
|
|
14407
14407
|
"button",
|
|
14408
14408
|
{
|
|
14409
14409
|
type: "button",
|
|
14410
|
-
onClick: async (
|
|
14411
|
-
if (!
|
|
14412
|
-
|
|
14410
|
+
onClick: async (g) => {
|
|
14411
|
+
if (!u && s.CONFIG_commentsV2 && i) {
|
|
14412
|
+
m(!0), console.log("open popup");
|
|
14413
14413
|
return;
|
|
14414
14414
|
}
|
|
14415
|
-
await e(
|
|
14415
|
+
await e(g) && (s.CONFIG_commentsV2 && i && l(!1), c(!0));
|
|
14416
14416
|
},
|
|
14417
14417
|
id: "comment-button",
|
|
14418
14418
|
className: `submit-btn su-bg-transparent su-font-bold ${t ? "disabled" : "active"}`,
|
|
@@ -14987,7 +14987,7 @@ function id({
|
|
|
14987
14987
|
}
|
|
14988
14988
|
try {
|
|
14989
14989
|
const A = await (await fetch("/api/auth/user", { credentials: "include" })).json();
|
|
14990
|
-
o(A.isAuthenticated ?? !1), u(A.user ?? null);
|
|
14990
|
+
o(A.isAuthenticated ?? !1), u(A.user ?? null), document.cookie = "redirect_after_login_1=; Max-Age=0; path=/";
|
|
14991
14991
|
} catch (f) {
|
|
14992
14992
|
console.error("Error checking auth:", f), o(!1), u(null);
|
|
14993
14993
|
}
|