@prefabs.tech/vue3-user 0.35.1 → 0.35.3
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.
|
@@ -22246,50 +22246,50 @@ var Wx = [
|
|
|
22246
22246
|
component: /* @__PURE__ */ m({
|
|
22247
22247
|
name: "VerifyEmailPage",
|
|
22248
22248
|
setup(e) {
|
|
22249
|
-
let n = Oe(), r = tt(), { t:
|
|
22250
|
-
if (
|
|
22249
|
+
let n = Oe(), r = tt(), i = nt(), { t: a } = t({ messages: MC() }), c = $t(), { setUser: l, user: d, verifyEmail: f } = c, p = F(!1), m = F(), h = o(() => {
|
|
22250
|
+
if (p.value) return a("user.emailVerification.messages.verifyingEmail");
|
|
22251
22251
|
let e = "";
|
|
22252
|
-
switch (
|
|
22252
|
+
switch (m.value) {
|
|
22253
22253
|
case jt.EMAIL_VERIFICATION_INVALID_TOKEN_ERROR:
|
|
22254
|
-
e =
|
|
22254
|
+
e = a("user.emailVerification.messages.verify.invalidToken");
|
|
22255
22255
|
break;
|
|
22256
22256
|
case jt.OK:
|
|
22257
|
-
e =
|
|
22257
|
+
e = a("user.emailVerification.messages.verify.success");
|
|
22258
22258
|
break;
|
|
22259
|
-
default: e =
|
|
22259
|
+
default: e = a("user.emailVerification.messages.resend.error");
|
|
22260
22260
|
}
|
|
22261
22261
|
return e;
|
|
22262
22262
|
});
|
|
22263
22263
|
return A(() => {
|
|
22264
|
-
if (!
|
|
22265
|
-
|
|
22264
|
+
if (!d) return;
|
|
22265
|
+
p.value = !0;
|
|
22266
22266
|
let e = typeof r.query.token == "string" ? r.query.token : typeof r.params.token == "string" ? r.params.token : void 0;
|
|
22267
|
-
|
|
22268
|
-
if (
|
|
22267
|
+
f(e).then(async (e) => {
|
|
22268
|
+
if (m.value = e.status, m.value === jt.OK) {
|
|
22269
22269
|
let e = await Yt(n.apiBaseUrl);
|
|
22270
22270
|
AC.emit("notify", {
|
|
22271
|
-
text:
|
|
22271
|
+
text: a("user.emailVerification.messages.verify.success"),
|
|
22272
22272
|
type: "success"
|
|
22273
|
-
}),
|
|
22273
|
+
}), l(e.data), c.isEmailVerified = !0, i.hasRoute("home") && i.push({ name: "home" });
|
|
22274
22274
|
} else AC.emit("notify", {
|
|
22275
|
-
text:
|
|
22275
|
+
text: a("user.emailVerification.messages.verify.invalidToken"),
|
|
22276
22276
|
type: "error"
|
|
22277
22277
|
});
|
|
22278
22278
|
}).catch(() => {
|
|
22279
22279
|
AC.emit("notify", {
|
|
22280
|
-
text:
|
|
22280
|
+
text: a("user.emailVerification.messages.resend.error"),
|
|
22281
22281
|
type: "error"
|
|
22282
22282
|
});
|
|
22283
22283
|
}).finally(() => {
|
|
22284
|
-
|
|
22284
|
+
p.value = !1;
|
|
22285
22285
|
});
|
|
22286
22286
|
}), (e, t) => (M(), s(V(We), {
|
|
22287
|
-
loading:
|
|
22288
|
-
title: V(
|
|
22287
|
+
loading: p.value,
|
|
22288
|
+
title: V(a)("user.emailVerification.verifyEmail"),
|
|
22289
22289
|
centered: "",
|
|
22290
22290
|
class: "email-verification"
|
|
22291
22291
|
}, {
|
|
22292
|
-
default: W(() => [u("p", null, B(
|
|
22292
|
+
default: W(() => [u("p", null, B(h.value), 1)]),
|
|
22293
22293
|
_: 1
|
|
22294
22294
|
}, 8, ["loading", "title"]));
|
|
22295
22295
|
}
|
|
@@ -22354,7 +22354,7 @@ var Wx = [
|
|
|
22354
22354
|
if (e.status === 401) return await p(), { name: "login" };
|
|
22355
22355
|
}
|
|
22356
22356
|
if ((r.verified ?? !0) && c.value === !1 && o !== "verifyEmailReminder" && e.hasRoute("verifyEmailReminder")) return { name: "verifyEmailReminder" };
|
|
22357
|
-
if (c.value && o
|
|
22357
|
+
if (c.value && s.includes(o) && e.hasRoute("home")) return { name: "home" };
|
|
22358
22358
|
}
|
|
22359
22359
|
let m = !!l.value.isProfileCompleted;
|
|
22360
22360
|
if (l.value.isProfileCompleted !== void 0 && !m && ![...s, "profile"].includes(o) && e.hasRoute("profile")) return { name: "profile" };
|