@vue-skuilder/common-ui 0.2.20 → 0.2.22
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/dist/assets/index.css +1 -1
- package/dist/common-ui.es.js +152 -101
- package/dist/common-ui.es.js.map +1 -1
- package/dist/common-ui.umd.js +7 -7
- package/dist/common-ui.umd.js.map +1 -1
- package/dist/components/StudySession.types.d.ts +7 -1
- package/dist/components/StudySession.types.d.ts.map +1 -1
- package/dist/components/StudySession.vue.d.ts.map +1 -1
- package/dist/components/auth/UserLogin.vue.d.ts.map +1 -1
- package/dist/components/auth/UserRegistration.vue.d.ts +8 -0
- package/dist/components/auth/UserRegistration.vue.d.ts.map +1 -1
- package/dist/components/auth/index.d.ts +1 -1
- package/dist/components/auth/index.d.ts.map +1 -1
- package/dist/services/authAPI.d.ts +20 -0
- package/dist/services/authAPI.d.ts.map +1 -1
- package/dist/stores/useAuthStore.d.ts +8 -0
- package/dist/stores/useAuthStore.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/StudySession.types.ts +8 -1
- package/src/components/StudySession.vue +26 -0
- package/src/components/auth/UserLogin.vue +44 -8
- package/src/components/auth/UserRegistration.vue +3 -4
- package/src/components/auth/index.ts +2 -0
- package/src/services/authAPI.ts +66 -1
package/dist/common-ui.es.js
CHANGED
|
@@ -950,10 +950,47 @@ async function verifyEmail(e) {
|
|
|
950
950
|
credentials: "include",
|
|
951
951
|
body: JSON.stringify({ token: e })
|
|
952
952
|
});
|
|
953
|
-
|
|
953
|
+
if (!t.ok) {
|
|
954
|
+
let e;
|
|
955
|
+
try {
|
|
956
|
+
e = (await t.json())?.error;
|
|
957
|
+
} catch {}
|
|
958
|
+
return {
|
|
959
|
+
ok: !1,
|
|
960
|
+
error: e || `HTTP ${t.status}: ${t.statusText}`
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
return await t.json();
|
|
964
|
+
} catch (e) {
|
|
965
|
+
return {
|
|
954
966
|
ok: !1,
|
|
955
|
-
error:
|
|
967
|
+
error: e instanceof Error ? e.message : "Network error"
|
|
956
968
|
};
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
async function resolveLoginIdentifier(e, t) {
|
|
972
|
+
try {
|
|
973
|
+
let n = await fetch(`${getApiBase()}/auth/resolve-login`, {
|
|
974
|
+
method: "POST",
|
|
975
|
+
headers: { "Content-Type": "application/json" },
|
|
976
|
+
credentials: "include",
|
|
977
|
+
body: JSON.stringify({
|
|
978
|
+
identifier: e,
|
|
979
|
+
password: t
|
|
980
|
+
})
|
|
981
|
+
});
|
|
982
|
+
if (!n.ok) {
|
|
983
|
+
let e;
|
|
984
|
+
try {
|
|
985
|
+
e = (await n.json())?.error;
|
|
986
|
+
} catch {}
|
|
987
|
+
return {
|
|
988
|
+
ok: !1,
|
|
989
|
+
status: n.status,
|
|
990
|
+
error: e || `HTTP ${n.status}: ${n.statusText}`
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
return await n.json();
|
|
957
994
|
} catch (e) {
|
|
958
995
|
return {
|
|
959
996
|
ok: !1,
|
|
@@ -1881,6 +1918,9 @@ var Ut = M({
|
|
|
1881
1918
|
async created() {
|
|
1882
1919
|
this.userCourseRegDoc = await this.user.getCourseRegistrationsDoc(), console.log("[StudySession] Created lifecycle hook - starting initSession"), await this.initSession(), console.log("[StudySession] InitSession completed in created hook");
|
|
1883
1920
|
},
|
|
1921
|
+
beforeUnmount() {
|
|
1922
|
+
this.sessionController && !this.sessionFinished && this.sessionController.endSession("abandoned"), this.intervalHandler && clearInterval(this.intervalHandler);
|
|
1923
|
+
},
|
|
1884
1924
|
errorCaptured(e, t, n) {
|
|
1885
1925
|
return console.error(`[StudySession] Card render error (${n}), skipping card "${this.cardID}":`, e), this.sessionController && this.sessionController.nextCard().then((e) => this.loadCard(e)), !1;
|
|
1886
1926
|
},
|
|
@@ -1927,7 +1967,9 @@ var Ut = M({
|
|
|
1927
1967
|
}
|
|
1928
1968
|
}))).filter((e) => e !== null)), this.timeRemaining = this.sessionTimeLimit * 60, e = await Promise.all(this.contentSources.filter((e) => e.type === "classroom").map(async (e) => await this.dataLayer.getClassroomDB(e.id, "student"))), e.forEach((e) => {});
|
|
1929
1969
|
let t = {};
|
|
1930
|
-
this.sessionConfig?.defaultBatchLimit !== void 0 && (t.defaultBatchLimit = this.sessionConfig.defaultBatchLimit), this.sessionConfig?.outcomeObservers?.length && (t.outcomeObservers = this.sessionConfig.outcomeObservers)
|
|
1970
|
+
this.sessionConfig?.defaultBatchLimit !== void 0 && (t.defaultBatchLimit = this.sessionConfig.defaultBatchLimit), this.sessionConfig?.outcomeObservers?.length && (t.outcomeObservers = this.sessionConfig.outcomeObservers);
|
|
1971
|
+
let n = this.contentSources.find((e) => e.type === "course")?.id;
|
|
1972
|
+
n && (t.courseId = n), this.sessionConfig?.sessionStateSnapshot && (t.stateSnapshotProvider = this.sessionConfig.sessionStateSnapshot), this.sessionController = N(new ve(this.sessionContentSources, 60 * this.sessionTimeLimit, this.dataLayer, this.getViewComponent, void 0, t)), this.sessionController.sessionRecord = this.sessionRecord, this.sessionConfig?.initHints && (this.sessionController.setSessionHints(this.sessionConfig.initHints), console.log("[StudySession] Applied init hints as session-durable hints")), await this.sessionController.prepareSession(), this.intervalHandler = setInterval(this.tick, 1e3), this.sessionPrepared = !0, console.log("[StudySession] Session preparation complete, emitting session-prepared event"), this.$emit("session-prepared"), console.log("[StudySession] Event emission completed");
|
|
1931
1973
|
} catch (e) {
|
|
1932
1974
|
console.error("[StudySession] Error during session preparation:", e), this.$emit("session-error", {
|
|
1933
1975
|
message: "Failed to prepare study session",
|
|
@@ -1957,7 +1999,7 @@ var Ut = M({
|
|
|
1957
1999
|
return this.sessionRecord.filter((n) => n.card.course_id === e && n.card.card_id === t).length;
|
|
1958
2000
|
},
|
|
1959
2001
|
async processResponse(e) {
|
|
1960
|
-
this.$emit("card-response", e), this.timerIsActive = !0, e.cardID = this.cardID, e.courseID = this.courseID, this.currentCard.records.push(e), console.log("[StudySession] StudySession.processResponse is running...");
|
|
2002
|
+
this.$emit("card-response", e), this.timerIsActive = !0, e.cardID = this.cardID, e.courseID = this.courseID, e.sessionId = this.sessionController?.sessionId, this.currentCard.records.push(e), console.log("[StudySession] StudySession.processResponse is running...");
|
|
1961
2003
|
let t = this.logCardRecord(e).catch((e) => {
|
|
1962
2004
|
throw console.error("[StudySession] putCardRecord failed:", e), e;
|
|
1963
2005
|
}), n = 1, r = 1;
|
|
@@ -2149,7 +2191,7 @@ function _sfc_render$15(e, t, n, r, i, a) {
|
|
|
2149
2191
|
])) : D("", !0);
|
|
2150
2192
|
}
|
|
2151
2193
|
t(_sfc_render$15, "_sfc_render");
|
|
2152
|
-
var Zt = /* @__PURE__ */ r(Ut, [["render", _sfc_render$15], ["__scopeId", "data-v-
|
|
2194
|
+
var Zt = /* @__PURE__ */ r(Ut, [["render", _sfc_render$15], ["__scopeId", "data-v-c765534b"]]), Qt = M({
|
|
2153
2195
|
name: "MultipleChoiceOption",
|
|
2154
2196
|
components: { MarkdownRenderer: re(() => import("./MarkdownRenderer-kStoDRNE.mjs").then((e) => e.n)) },
|
|
2155
2197
|
props: {
|
|
@@ -2854,7 +2896,7 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2854
2896
|
}, 8, ["modelValue"])], 64);
|
|
2855
2897
|
};
|
|
2856
2898
|
}
|
|
2857
|
-
}), [["__scopeId", "data-v-9a38a213"]]), fn = { class: "d-flex flex-column align-start" }, pn = { class: "mb-2" }, mn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
2899
|
+
}), [["__scopeId", "data-v-9a38a213"]]), fn = { class: "d-flex flex-column align-start" }, pn = { class: "mb-2" }, mn = "Username or password was incorrect.", hn = "Login is temporarily unavailable. Please try again in a moment.", gn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
2858
2900
|
__name: "UserLogin",
|
|
2859
2901
|
props: { redirectTo: { default: "/study" } },
|
|
2860
2902
|
emits: [
|
|
@@ -2863,21 +2905,31 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2863
2905
|
"forgotPassword"
|
|
2864
2906
|
],
|
|
2865
2907
|
setup(e, { emit: t }) {
|
|
2866
|
-
let n = e, r = t, i = we(), a = Ce(), o = useAuthStore(), s = useConfigStore(), c = R(""), l = R(""), u = R(!1), d = R(!1), f = R(!1), p = R(7e3), m = R(void 0),
|
|
2908
|
+
let n = e, r = t, i = we(), a = Ce(), o = useAuthStore(), s = useConfigStore(), c = R(""), l = R(""), u = R(!1), d = R(!1), f = R(!1), p = R(7e3), m = R("Username or password was incorrect."), h = R(void 0), g = T(() => a.name === "login"), _ = T(() => ({
|
|
2867
2909
|
color: f.value ? "error" : "success",
|
|
2868
2910
|
text: f.value ? "Try again" : "Log In"
|
|
2869
|
-
})), initBadLogin = () => {
|
|
2870
|
-
f.value = !0, Z({
|
|
2871
|
-
text:
|
|
2911
|
+
})), initBadLogin = (e = mn) => {
|
|
2912
|
+
m.value = e, f.value = !0, Z({
|
|
2913
|
+
text: e,
|
|
2872
2914
|
status: J.error,
|
|
2873
2915
|
timeout: p.value
|
|
2874
2916
|
}), setTimeout(() => {
|
|
2875
2917
|
f.value = !1;
|
|
2876
2918
|
}, p.value);
|
|
2877
2919
|
}, login = async () => {
|
|
2878
|
-
d.value = !0, Y("Starting login attempt"), Y(`Login attempt for
|
|
2920
|
+
d.value = !0, Y("Starting login attempt"), Y(`Login attempt for identifier: ${c.value}`);
|
|
2879
2921
|
try {
|
|
2880
|
-
Y("Attempting to get User instance"),
|
|
2922
|
+
Y("Attempting to get User instance"), h.value = await getCurrentUser(), Y("Got User instance, attempting login");
|
|
2923
|
+
let e = c.value;
|
|
2924
|
+
if (c.value.includes("@")) {
|
|
2925
|
+
let t = await resolveLoginIdentifier(c.value, l.value);
|
|
2926
|
+
if (!t.ok || !t.username) {
|
|
2927
|
+
t.status === 401 ? (Y("Email identifier did not resolve: invalid credentials"), initBadLogin()) : (Y(`Email login unavailable (resolver error: ${t.error ?? "network"})`), initBadLogin(hn)), d.value = !1;
|
|
2928
|
+
return;
|
|
2929
|
+
}
|
|
2930
|
+
e = t.username;
|
|
2931
|
+
}
|
|
2932
|
+
await h.value.login(e, l.value), Y("Login successful"), Y("Initializing user config"), s.init(), Y("User config initialized"), Y("Setting authentication state"), o.loginAndRegistration.loggedIn = !0, Y(`Authentication state set, redirecting to: ${n.redirectTo}`), r("loginSuccess", n.redirectTo), i.push(n.redirectTo), Y("Login and redirect complete");
|
|
2881
2933
|
} catch (e) {
|
|
2882
2934
|
Y("Login attempt failed"), Y(`Login error details: ${JSON.stringify(e)}`), console.log(`login error: ${JSON.stringify(e)}`), Y("Initiating bad login feedback"), initBadLogin();
|
|
2883
2935
|
}
|
|
@@ -2885,19 +2937,19 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2885
2937
|
}, toggle = () => {
|
|
2886
2938
|
Y("Toggling registration / login forms."), r("toggle");
|
|
2887
2939
|
}, handleForgotPassword = () => {
|
|
2888
|
-
Y("Forgot password clicked"),
|
|
2940
|
+
Y("Forgot password clicked"), g.value ? i.push("/request-reset") : r("forgotPassword");
|
|
2889
2941
|
};
|
|
2890
2942
|
return (e, t) => {
|
|
2891
|
-
let n = V("v-card-title"), r = V("v-text-field"), i = V("v-btn"), a = V("v-snackbar"), o = V("v-icon"), s = V("router-link"),
|
|
2892
|
-
return L(), E(
|
|
2893
|
-
default: W(() => [
|
|
2943
|
+
let n = V("v-card-title"), r = V("v-text-field"), i = V("v-btn"), a = V("v-snackbar"), o = V("v-icon"), s = V("router-link"), h = V("v-form"), v = V("v-card-text"), y = V("v-card");
|
|
2944
|
+
return L(), E(y, null, {
|
|
2945
|
+
default: W(() => [g.value ? D("", !0) : (L(), E(n, {
|
|
2894
2946
|
key: 0,
|
|
2895
2947
|
class: "text-h5 bg-grey-lighten-2"
|
|
2896
2948
|
}, {
|
|
2897
2949
|
default: W(() => t[5] || (t[5] = [A("Log In")])),
|
|
2898
2950
|
_: 1
|
|
2899
|
-
})), j(
|
|
2900
|
-
default: W(() => [j(
|
|
2951
|
+
})), j(v, null, {
|
|
2952
|
+
default: W(() => [j(h, {
|
|
2901
2953
|
onsubmit: "return false;",
|
|
2902
2954
|
onSubmit: K(login, ["prevent"])
|
|
2903
2955
|
}, {
|
|
@@ -2908,7 +2960,7 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2908
2960
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => c.value = e),
|
|
2909
2961
|
autofocus: "",
|
|
2910
2962
|
name: "username",
|
|
2911
|
-
label: "Username",
|
|
2963
|
+
label: "Username or email",
|
|
2912
2964
|
"prepend-icon": "mdi-account-circle"
|
|
2913
2965
|
}, null, 8, ["modelValue"]),
|
|
2914
2966
|
j(r, {
|
|
@@ -2934,7 +2986,7 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2934
2986
|
location: "bottom right",
|
|
2935
2987
|
timeout: p.value
|
|
2936
2988
|
}, {
|
|
2937
|
-
default: W(() => [
|
|
2989
|
+
default: W(() => [A(H(m.value) + " ", 1), j(i, {
|
|
2938
2990
|
color: "pink",
|
|
2939
2991
|
variant: "text",
|
|
2940
2992
|
onClick: t[3] || (t[3] = (e) => f.value = !1)
|
|
@@ -2948,19 +3000,19 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2948
3000
|
class: "mr-2",
|
|
2949
3001
|
type: "submit",
|
|
2950
3002
|
loading: d.value,
|
|
2951
|
-
color:
|
|
3003
|
+
color: _.value.color
|
|
2952
3004
|
}, {
|
|
2953
3005
|
default: W(() => [j(o, { start: "" }, {
|
|
2954
|
-
default: W(() => t[
|
|
3006
|
+
default: W(() => t[7] || (t[7] = [A("mdi-lock-open")])),
|
|
2955
3007
|
_: 1
|
|
2956
|
-
}), t[
|
|
3008
|
+
}), t[8] || (t[8] = A(" Log In "))]),
|
|
2957
3009
|
_: 1
|
|
2958
|
-
}, 8, ["loading", "color"]),
|
|
3010
|
+
}, 8, ["loading", "color"]), g.value ? (L(), E(s, {
|
|
2959
3011
|
key: 0,
|
|
2960
3012
|
to: "signup"
|
|
2961
3013
|
}, {
|
|
2962
3014
|
default: W(() => [j(i, { variant: "text" }, {
|
|
2963
|
-
default: W(() => t[
|
|
3015
|
+
default: W(() => t[9] || (t[9] = [A("Create New Account")])),
|
|
2964
3016
|
_: 1
|
|
2965
3017
|
})]),
|
|
2966
3018
|
_: 1
|
|
@@ -2969,7 +3021,7 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2969
3021
|
variant: "text",
|
|
2970
3022
|
onClick: toggle
|
|
2971
3023
|
}, {
|
|
2972
|
-
default: W(() => t[
|
|
3024
|
+
default: W(() => t[10] || (t[10] = [A("Create New Account")])),
|
|
2973
3025
|
_: 1
|
|
2974
3026
|
}))]), B(e.$slots, "forgot-password", {}, () => [k("a", {
|
|
2975
3027
|
href: "#",
|
|
@@ -2985,7 +3037,7 @@ var dn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
|
2985
3037
|
});
|
|
2986
3038
|
};
|
|
2987
3039
|
}
|
|
2988
|
-
}), [["__scopeId", "data-v-
|
|
3040
|
+
}), [["__scopeId", "data-v-764d1a76"]]);
|
|
2989
3041
|
//#endregion
|
|
2990
3042
|
//#region src/utils/passwordValidation.ts
|
|
2991
3043
|
function validatePassword(e) {
|
|
@@ -2996,7 +3048,7 @@ function isPasswordValid(e) {
|
|
|
2996
3048
|
}
|
|
2997
3049
|
//#endregion
|
|
2998
3050
|
//#region src/components/auth/UserRegistration.vue?vue&type=script&lang.ts
|
|
2999
|
-
var
|
|
3051
|
+
var _n = M({
|
|
3000
3052
|
name: "UserRegistration",
|
|
3001
3053
|
props: { onSignupSuccess: {
|
|
3002
3054
|
type: Function,
|
|
@@ -3085,7 +3137,6 @@ Author: ${this.author}
|
|
|
3085
3137
|
this.user.createAccount(this.username, this.password).then(async (e) => {
|
|
3086
3138
|
if (e.status === J.ok) {
|
|
3087
3139
|
if (this.authStore.loginAndRegistration.loggedIn = !0, this.authStore.loginAndRegistration.init = !1, this.authStore.loginAndRegistration.init = !0, this.email) try {
|
|
3088
|
-
await (await getCurrentUser()).setConfig({ email: this.email });
|
|
3089
3140
|
let e = typeof window < "u" ? window.location.origin : void 0, t = await sendVerificationEmail(this.username, this.email, e);
|
|
3090
3141
|
t.ok ? Z({
|
|
3091
3142
|
text: "Account created! Please check your email to verify your account.",
|
|
@@ -3255,7 +3306,7 @@ function _sfc_render$9(e, t, n, r, i, a) {
|
|
|
3255
3306
|
});
|
|
3256
3307
|
}
|
|
3257
3308
|
t(_sfc_render$9, "_sfc_render");
|
|
3258
|
-
var
|
|
3309
|
+
var vn = /* @__PURE__ */ r(_n, [["render", _sfc_render$9]]), yn = M({
|
|
3259
3310
|
name: "RequestPasswordReset",
|
|
3260
3311
|
emits: ["cancel", "success"],
|
|
3261
3312
|
data() {
|
|
@@ -3291,7 +3342,7 @@ var gn = /* @__PURE__ */ r(hn, [["render", _sfc_render$9]]), _n = M({
|
|
|
3291
3342
|
}
|
|
3292
3343
|
}
|
|
3293
3344
|
}
|
|
3294
|
-
}),
|
|
3345
|
+
}), bn = {
|
|
3295
3346
|
key: 1,
|
|
3296
3347
|
class: "text-center"
|
|
3297
3348
|
};
|
|
@@ -3304,7 +3355,7 @@ function _sfc_render$8(e, t, n, r, i, a) {
|
|
|
3304
3355
|
_: 1
|
|
3305
3356
|
}),
|
|
3306
3357
|
j(d, { class: "pa-6" }, {
|
|
3307
|
-
default: W(() => [e.requestSent ? (L(), O("div",
|
|
3358
|
+
default: W(() => [e.requestSent ? (L(), O("div", bn, [
|
|
3308
3359
|
j(c, {
|
|
3309
3360
|
color: "success",
|
|
3310
3361
|
size: "64",
|
|
@@ -3378,7 +3429,7 @@ function _sfc_render$8(e, t, n, r, i, a) {
|
|
|
3378
3429
|
});
|
|
3379
3430
|
}
|
|
3380
3431
|
t(_sfc_render$8, "_sfc_render");
|
|
3381
|
-
var
|
|
3432
|
+
var xn = /* @__PURE__ */ r(yn, [["render", _sfc_render$8]]), Sn = { key: 0 }, Cn = { key: "login-buttons" }, wn = { key: "user-chip" }, Tn = /* @__PURE__ */ r(/* @__PURE__ */ M({
|
|
3382
3433
|
__name: "UserLoginAndRegistrationContainer",
|
|
3383
3434
|
props: {
|
|
3384
3435
|
showLoginButton: { type: Boolean },
|
|
@@ -3428,11 +3479,11 @@ var yn = /* @__PURE__ */ r(_n, [["render", _sfc_render$8]]), bn = { key: 0 }, xn
|
|
|
3428
3479
|
};
|
|
3429
3480
|
return (e, t) => {
|
|
3430
3481
|
let n = V("v-btn"), r = V("v-dialog");
|
|
3431
|
-
return c.value && s.value ? (L(), O("div",
|
|
3482
|
+
return c.value && s.value ? (L(), O("div", Sn, [j(w, {
|
|
3432
3483
|
name: "component-fade",
|
|
3433
3484
|
mode: "out-in"
|
|
3434
3485
|
}, {
|
|
3435
|
-
default: W(() => [l.value ? (L(), O("div",
|
|
3486
|
+
default: W(() => [l.value ? (L(), O("div", Cn, [
|
|
3436
3487
|
u.value.showLoginRegistration ? (L(), E(r, {
|
|
3437
3488
|
key: 0,
|
|
3438
3489
|
modelValue: d.value,
|
|
@@ -3447,7 +3498,7 @@ var yn = /* @__PURE__ */ r(_n, [["render", _sfc_render$8]]), bn = { key: 0 }, xn
|
|
|
3447
3498
|
default: W(() => t[3] || (t[3] = [A("Sign Up")])),
|
|
3448
3499
|
_: 2
|
|
3449
3500
|
}, 1040)]),
|
|
3450
|
-
default: W(() => [j(
|
|
3501
|
+
default: W(() => [j(vn, {
|
|
3451
3502
|
onToggle: toggle,
|
|
3452
3503
|
onSignupSuccess: handleSignupSuccess,
|
|
3453
3504
|
"on-signup-success": handleSignupSuccess
|
|
@@ -3466,7 +3517,7 @@ var yn = /* @__PURE__ */ r(_n, [["render", _sfc_render$8]]), bn = { key: 0 }, xn
|
|
|
3466
3517
|
default: W(() => t[4] || (t[4] = [A("Log In")])),
|
|
3467
3518
|
_: 2
|
|
3468
3519
|
}, 1040)]),
|
|
3469
|
-
default: W(() => [j(
|
|
3520
|
+
default: W(() => [j(gn, {
|
|
3470
3521
|
onToggle: toggle,
|
|
3471
3522
|
onForgotPassword: openResetDialog
|
|
3472
3523
|
})]),
|
|
@@ -3477,18 +3528,18 @@ var yn = /* @__PURE__ */ r(_n, [["render", _sfc_render$8]]), bn = { key: 0 }, xn
|
|
|
3477
3528
|
"onUpdate:modelValue": t[2] || (t[2] = (e) => p.value = e),
|
|
3478
3529
|
width: "500px"
|
|
3479
3530
|
}, {
|
|
3480
|
-
default: W(() => [j(
|
|
3531
|
+
default: W(() => [j(xn, {
|
|
3481
3532
|
onCancel: closeResetDialog,
|
|
3482
3533
|
onSuccess: closeResetDialog
|
|
3483
3534
|
})]),
|
|
3484
3535
|
_: 1
|
|
3485
3536
|
}, 8, ["modelValue"])
|
|
3486
|
-
])) : (L(), O("div",
|
|
3537
|
+
])) : (L(), O("div", wn, [j(dn)]))]),
|
|
3487
3538
|
_: 1
|
|
3488
3539
|
})])) : D("", !0);
|
|
3489
3540
|
};
|
|
3490
3541
|
}
|
|
3491
|
-
}), [["__scopeId", "data-v-5a55bdf0"]]),
|
|
3542
|
+
}), [["__scopeId", "data-v-5a55bdf0"]]), En = M({
|
|
3492
3543
|
name: "VerifyEmail",
|
|
3493
3544
|
emits: ["verified", "error"],
|
|
3494
3545
|
props: { token: {
|
|
@@ -3536,16 +3587,16 @@ var yn = /* @__PURE__ */ r(_n, [["render", _sfc_render$8]]), bn = { key: 0 }, xn
|
|
|
3536
3587
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get("token");
|
|
3537
3588
|
}
|
|
3538
3589
|
}
|
|
3539
|
-
}),
|
|
3590
|
+
}), Dn = {
|
|
3540
3591
|
key: 0,
|
|
3541
3592
|
class: "text-center"
|
|
3542
|
-
},
|
|
3593
|
+
}, On = {
|
|
3543
3594
|
key: 1,
|
|
3544
3595
|
class: "text-center"
|
|
3545
|
-
},
|
|
3596
|
+
}, kn = { key: 0 }, An = {
|
|
3546
3597
|
key: 2,
|
|
3547
3598
|
class: "text-center"
|
|
3548
|
-
},
|
|
3599
|
+
}, jn = {
|
|
3549
3600
|
key: 3,
|
|
3550
3601
|
class: "text-center"
|
|
3551
3602
|
};
|
|
@@ -3571,12 +3622,12 @@ function _sfc_render$7(e, t, n, r, i, a) {
|
|
|
3571
3622
|
_: 1
|
|
3572
3623
|
}),
|
|
3573
3624
|
j(l, { class: "pa-6" }, {
|
|
3574
|
-
default: W(() => [e.isVerifying ? (L(), O("div",
|
|
3625
|
+
default: W(() => [e.isVerifying ? (L(), O("div", Dn, [j(s, {
|
|
3575
3626
|
indeterminate: "",
|
|
3576
3627
|
color: "primary",
|
|
3577
3628
|
size: "64",
|
|
3578
3629
|
class: "mb-4"
|
|
3579
|
-
}), t[3] || (t[3] = k("p", null, "Verifying your email...", -1))])) : e.verificationStatus === "success" ? (L(), O("div",
|
|
3630
|
+
}), t[3] || (t[3] = k("p", null, "Verifying your email...", -1))])) : e.verificationStatus === "success" ? (L(), O("div", On, [
|
|
3580
3631
|
j(c, {
|
|
3581
3632
|
color: "success",
|
|
3582
3633
|
size: "64",
|
|
@@ -3587,8 +3638,8 @@ function _sfc_render$7(e, t, n, r, i, a) {
|
|
|
3587
3638
|
}),
|
|
3588
3639
|
t[5] || (t[5] = k("h3", { class: "mb-2" }, "Email Verified!", -1)),
|
|
3589
3640
|
t[6] || (t[6] = k("p", null, "Your account has been successfully verified.", -1)),
|
|
3590
|
-
e.username ? (L(), O("p",
|
|
3591
|
-
])) : e.verificationStatus === "error" ? (L(), O("div",
|
|
3641
|
+
e.username ? (L(), O("p", kn, "Welcome, " + H(e.username) + "!", 1)) : D("", !0)
|
|
3642
|
+
])) : e.verificationStatus === "error" ? (L(), O("div", An, [
|
|
3592
3643
|
j(c, {
|
|
3593
3644
|
color: "error",
|
|
3594
3645
|
size: "64",
|
|
@@ -3599,7 +3650,7 @@ function _sfc_render$7(e, t, n, r, i, a) {
|
|
|
3599
3650
|
}),
|
|
3600
3651
|
t[8] || (t[8] = k("h3", { class: "mb-2" }, "Verification Failed", -1)),
|
|
3601
3652
|
k("p", null, H(e.errorMessage), 1)
|
|
3602
|
-
])) : (L(), O("div",
|
|
3653
|
+
])) : (L(), O("div", jn, [
|
|
3603
3654
|
j(c, {
|
|
3604
3655
|
color: "warning",
|
|
3605
3656
|
size: "64",
|
|
@@ -3645,7 +3696,7 @@ function _sfc_render$7(e, t, n, r, i, a) {
|
|
|
3645
3696
|
});
|
|
3646
3697
|
}
|
|
3647
3698
|
t(_sfc_render$7, "_sfc_render");
|
|
3648
|
-
var
|
|
3699
|
+
var Mn = /* @__PURE__ */ r(En, [["render", _sfc_render$7]]), Nn = M({
|
|
3649
3700
|
name: "ResetPassword",
|
|
3650
3701
|
emits: ["complete", "error"],
|
|
3651
3702
|
props: { token: {
|
|
@@ -3703,7 +3754,7 @@ var An = /* @__PURE__ */ r(wn, [["render", _sfc_render$7]]), jn = M({
|
|
|
3703
3754
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get("token");
|
|
3704
3755
|
}
|
|
3705
3756
|
}
|
|
3706
|
-
}),
|
|
3757
|
+
}), Pn = {
|
|
3707
3758
|
key: 1,
|
|
3708
3759
|
class: "text-center"
|
|
3709
3760
|
};
|
|
@@ -3729,7 +3780,7 @@ function _sfc_render$6(e, t, n, r, i, a) {
|
|
|
3729
3780
|
_: 1
|
|
3730
3781
|
}),
|
|
3731
3782
|
j(d, { class: "pa-6" }, {
|
|
3732
|
-
default: W(() => [e.isComplete ? (L(), O("div",
|
|
3783
|
+
default: W(() => [e.isComplete ? (L(), O("div", Pn, [
|
|
3733
3784
|
j(c, {
|
|
3734
3785
|
color: "success",
|
|
3735
3786
|
size: "64",
|
|
@@ -3823,7 +3874,7 @@ function _sfc_render$6(e, t, n, r, i, a) {
|
|
|
3823
3874
|
});
|
|
3824
3875
|
}
|
|
3825
3876
|
t(_sfc_render$6, "_sfc_render");
|
|
3826
|
-
var
|
|
3877
|
+
var Fn = /* @__PURE__ */ r(Nn, [["render", _sfc_render$6]]), In = M({
|
|
3827
3878
|
name: "SkTagsInput",
|
|
3828
3879
|
components: { VueTagsInput: Te },
|
|
3829
3880
|
props: {
|
|
@@ -3930,13 +3981,13 @@ var Nn = /* @__PURE__ */ r(jn, [["render", _sfc_render$6]]), Pn = M({
|
|
|
3930
3981
|
this.loading = !1;
|
|
3931
3982
|
}
|
|
3932
3983
|
}
|
|
3933
|
-
}),
|
|
3984
|
+
}), Ln = { "data-cy": "tags-input" }, Rn = { class: "tag-name" }, zn = {
|
|
3934
3985
|
key: 0,
|
|
3935
3986
|
class: "tag-snippet"
|
|
3936
3987
|
};
|
|
3937
3988
|
function _sfc_render$5(e, t, n, r, i, a) {
|
|
3938
3989
|
let o = V("vue-tags-input"), s = V("v-btn");
|
|
3939
|
-
return L(), O("div",
|
|
3990
|
+
return L(), O("div", Ln, [j(o, {
|
|
3940
3991
|
modelValue: e.tag,
|
|
3941
3992
|
"onUpdate:modelValue": t[0] || (t[0] = (t) => e.tag = t),
|
|
3942
3993
|
tags: e.tags,
|
|
@@ -3945,7 +3996,7 @@ function _sfc_render$5(e, t, n, r, i, a) {
|
|
|
3945
3996
|
"add-on-key": e.separators,
|
|
3946
3997
|
onTagsChanged: e.tagsChanged
|
|
3947
3998
|
}, {
|
|
3948
|
-
"autocomplete-item": W((e) => [k("div", { class: F(["autocomplete-item", { "is-active": e.selected }]) }, [k("span",
|
|
3999
|
+
"autocomplete-item": W((e) => [k("div", { class: F(["autocomplete-item", { "is-active": e.selected }]) }, [k("span", Rn, H(e.item.text), 1), e.item.data && e.item.data.snippet ? (L(), O("span", zn, " - " + H(e.item.data.snippet), 1)) : D("", !0)], 2)]),
|
|
3949
4000
|
_: 1
|
|
3950
4001
|
}, 8, [
|
|
3951
4002
|
"modelValue",
|
|
@@ -3965,11 +4016,11 @@ function _sfc_render$5(e, t, n, r, i, a) {
|
|
|
3965
4016
|
}, 8, ["loading", "onClick"]))]);
|
|
3966
4017
|
}
|
|
3967
4018
|
t(_sfc_render$5, "_sfc_render");
|
|
3968
|
-
var
|
|
4019
|
+
var Bn = /* @__PURE__ */ r(In, [["render", _sfc_render$5], ["__scopeId", "data-v-f7373dc0"]]), Vn = M({
|
|
3969
4020
|
name: "CourseCardBrowser",
|
|
3970
4021
|
components: {
|
|
3971
4022
|
CardLoader: un,
|
|
3972
|
-
TagsInput:
|
|
4023
|
+
TagsInput: Bn,
|
|
3973
4024
|
PaginatingToolbar: Ue
|
|
3974
4025
|
},
|
|
3975
4026
|
props: {
|
|
@@ -4124,26 +4175,26 @@ var Rn = /* @__PURE__ */ r(Pn, [["render", _sfc_render$5], ["__scopeId", "data-v
|
|
|
4124
4175
|
}
|
|
4125
4176
|
}
|
|
4126
4177
|
}
|
|
4127
|
-
}),
|
|
4178
|
+
}), Hn = {
|
|
4128
4179
|
key: 0,
|
|
4129
4180
|
class: "d-flex justify-center align-center pa-6"
|
|
4130
|
-
},
|
|
4181
|
+
}, Un = { key: 1 }, Wn = {
|
|
4131
4182
|
key: 0,
|
|
4132
4183
|
class: "px-4 py-2 bg-blue-grey-lighten-5"
|
|
4133
|
-
},
|
|
4184
|
+
}, Gn = {
|
|
4134
4185
|
key: 0,
|
|
4135
4186
|
class: "mt-4"
|
|
4136
|
-
},
|
|
4187
|
+
}, Kn = { class: "mt-4" }, qn = {
|
|
4137
4188
|
key: 0,
|
|
4138
4189
|
class: "ml-4"
|
|
4139
4190
|
};
|
|
4140
4191
|
function _sfc_render$4(e, t, n, r, i, a) {
|
|
4141
4192
|
let o = V("v-progress-circular"), s = V("paginating-toolbar"), c = V("v-list-item-title"), l = V("v-list-item-subtitle"), u = V("v-btn"), d = V("v-icon"), f = V("v-speed-dial"), p = V("v-list-item"), m = V("card-loader"), h = V("v-chip"), g = V("v-chip-group"), _ = V("tags-input"), v = V("v-list"), y = V("v-card");
|
|
4142
4193
|
return L(), E(y, null, {
|
|
4143
|
-
default: W(() => [e.updatePending ? (L(), O("div",
|
|
4194
|
+
default: W(() => [e.updatePending ? (L(), O("div", Hn, [j(o, {
|
|
4144
4195
|
indeterminate: "",
|
|
4145
4196
|
color: "primary"
|
|
4146
|
-
})])) : (L(), O("div",
|
|
4197
|
+
})])) : (L(), O("div", Un, [
|
|
4147
4198
|
j(s, {
|
|
4148
4199
|
title: "Exercises",
|
|
4149
4200
|
page: e.page,
|
|
@@ -4226,13 +4277,13 @@ function _sfc_render$4(e, t, n, r, i, a) {
|
|
|
4226
4277
|
_: 2
|
|
4227
4278
|
}, 1032, ["modelValue", "onUpdate:modelValue"])]),
|
|
4228
4279
|
_: 2
|
|
4229
|
-
}, 1032, ["class"]), n.isOpen ? (L(), O("div",
|
|
4280
|
+
}, 1032, ["class"]), n.isOpen ? (L(), O("div", Wn, [
|
|
4230
4281
|
j(m, {
|
|
4231
4282
|
qualified_id: n.card,
|
|
4232
4283
|
"view-lookup": e.viewLookup,
|
|
4233
4284
|
class: "elevation-1"
|
|
4234
4285
|
}, null, 8, ["qualified_id", "view-lookup"]),
|
|
4235
|
-
e.editMode === "readonly" && e.cardTags[n.card.cardID] ? (L(), O("div",
|
|
4286
|
+
e.editMode === "readonly" && e.cardTags[n.card.cardID] ? (L(), O("div", Gn, [j(g, null, {
|
|
4236
4287
|
default: W(() => [(L(!0), O(C, null, z(e.cardTags[n.card.cardID], (e) => (L(), E(h, {
|
|
4237
4288
|
key: e.name,
|
|
4238
4289
|
size: "small",
|
|
@@ -4249,14 +4300,14 @@ function _sfc_render$4(e, t, n, r, i, a) {
|
|
|
4249
4300
|
"card-i-d": n.card.cardID,
|
|
4250
4301
|
class: "mt-4"
|
|
4251
4302
|
}, null, 8, ["course-i-d", "card-i-d"]), [[ue, e.internalEditMode === "tags" && e.editMode === "full"]]),
|
|
4252
|
-
de(k("div",
|
|
4303
|
+
de(k("div", Kn, [j(u, {
|
|
4253
4304
|
color: "error",
|
|
4254
4305
|
variant: "outlined",
|
|
4255
4306
|
onClick: (e) => n.delBtn = !0
|
|
4256
4307
|
}, {
|
|
4257
4308
|
default: W(() => t[6] || (t[6] = [A(" Delete this card ")])),
|
|
4258
4309
|
_: 2
|
|
4259
|
-
}, 1032, ["onClick"]), n.delBtn ? (L(), O("span",
|
|
4310
|
+
}, 1032, ["onClick"]), n.delBtn ? (L(), O("span", qn, [t[8] || (t[8] = k("span", { class: "mr-2" }, "Are you sure?", -1)), j(u, {
|
|
4260
4311
|
color: "error",
|
|
4261
4312
|
variant: "elevated",
|
|
4262
4313
|
onClick: (t) => e.deleteCard(n.card.cardID)
|
|
@@ -4289,9 +4340,9 @@ function _sfc_render$4(e, t, n, r, i, a) {
|
|
|
4289
4340
|
});
|
|
4290
4341
|
}
|
|
4291
4342
|
t(_sfc_render$4, "_sfc_render");
|
|
4292
|
-
var
|
|
4343
|
+
var Jn = /* @__PURE__ */ r(Vn, [["render", _sfc_render$4], ["__scopeId", "data-v-5ecc9d21"]]), Yn = M({
|
|
4293
4344
|
name: "CourseInformation",
|
|
4294
|
-
components: { CourseCardBrowser:
|
|
4345
|
+
components: { CourseCardBrowser: Jn },
|
|
4295
4346
|
props: {
|
|
4296
4347
|
courseId: {
|
|
4297
4348
|
type: String,
|
|
@@ -4333,15 +4384,15 @@ var Kn = /* @__PURE__ */ r(zn, [["render", _sfc_render$4], ["__scopeId", "data-v
|
|
|
4333
4384
|
Y(`Dropping course ${this.courseId}`), (await this.user.dropCourse(this.courseId)).ok && (this.userIsRegistered = !1);
|
|
4334
4385
|
}
|
|
4335
4386
|
}
|
|
4336
|
-
}),
|
|
4387
|
+
}), Xn = { key: 0 }, Zn = { class: "text-h4 mb-2" }, Qn = { class: "text-body-2" }, $n = { key: 0 }, er = { key: 1 };
|
|
4337
4388
|
function _sfc_render$3(e, t, n, r, i, a) {
|
|
4338
4389
|
let o = V("v-btn"), s = V("v-icon"), c = V("v-toolbar-title"), l = V("v-toolbar-items"), u = V("v-toolbar"), d = V("v-chip"), f = V("v-card-text"), p = V("v-card"), m = V("course-card-browser");
|
|
4339
|
-
return e.updatePending ? D("", !0) : (L(), O("div",
|
|
4390
|
+
return e.updatePending ? D("", !0) : (L(), O("div", Xn, [
|
|
4340
4391
|
B(e.$slots, "header", {
|
|
4341
4392
|
courseConfig: e.courseConfig,
|
|
4342
4393
|
courseId: e.courseId
|
|
4343
|
-
}, () => [k("h1",
|
|
4344
|
-
k("p",
|
|
4394
|
+
}, () => [k("h1", Zn, H(e.courseConfig.name), 1)], !0),
|
|
4395
|
+
k("p", Qn, H(e.courseConfig.description), 1),
|
|
4345
4396
|
B(e.$slots, "actions", {
|
|
4346
4397
|
userIsRegistered: e.userIsRegistered,
|
|
4347
4398
|
courseId: e.courseId,
|
|
@@ -4352,7 +4403,7 @@ function _sfc_render$3(e, t, n, r, i, a) {
|
|
|
4352
4403
|
name: "component-fade",
|
|
4353
4404
|
mode: "out-in"
|
|
4354
4405
|
}, {
|
|
4355
|
-
default: W(() => [e.userIsRegistered ? (L(), O("div",
|
|
4406
|
+
default: W(() => [e.userIsRegistered ? (L(), O("div", $n, [
|
|
4356
4407
|
j(o, {
|
|
4357
4408
|
color: "success",
|
|
4358
4409
|
"data-cy": "focused-study-session-btn",
|
|
@@ -4395,7 +4446,7 @@ function _sfc_render$3(e, t, n, r, i, a) {
|
|
|
4395
4446
|
default: W(() => t[5] || (t[5] = [A(" Drop this course ")])),
|
|
4396
4447
|
_: 1
|
|
4397
4448
|
}, 8, ["onClick"])) : D("", !0)
|
|
4398
|
-
])) : (L(), O("div",
|
|
4449
|
+
])) : (L(), O("div", er, [j(o, {
|
|
4399
4450
|
"data-cy": "register-btn",
|
|
4400
4451
|
color: "primary",
|
|
4401
4452
|
class: "me-2",
|
|
@@ -4455,7 +4506,7 @@ function _sfc_render$3(e, t, n, r, i, a) {
|
|
|
4455
4506
|
]));
|
|
4456
4507
|
}
|
|
4457
4508
|
t(_sfc_render$3, "_sfc_render");
|
|
4458
|
-
var
|
|
4509
|
+
var tr = /* @__PURE__ */ r(Yn, [["render", _sfc_render$3], ["__scopeId", "data-v-38e9efe1"]]), nr = M({
|
|
4459
4510
|
name: "CardBrowser",
|
|
4460
4511
|
components: { CardViewer: Q },
|
|
4461
4512
|
props: {
|
|
@@ -4495,7 +4546,7 @@ var $n = /* @__PURE__ */ r(qn, [["render", _sfc_render$3], ["__scopeId", "data-v
|
|
|
4495
4546
|
this.viewIndex--, this.viewIndex = (this.viewIndex + this.views.length) % this.views.length;
|
|
4496
4547
|
}
|
|
4497
4548
|
}
|
|
4498
|
-
}),
|
|
4549
|
+
}), rr = {
|
|
4499
4550
|
key: 0,
|
|
4500
4551
|
class: "text-subtitle-1 pa-2"
|
|
4501
4552
|
};
|
|
@@ -4515,7 +4566,7 @@ function _sfc_render$2(e, t, n, r, i, a) {
|
|
|
4515
4566
|
}, null, 8, ["view", "data"]),
|
|
4516
4567
|
t[2] || (t[2] = k("br", null, null, -1)),
|
|
4517
4568
|
t[3] || (t[3] = k("br", null, null, -1)),
|
|
4518
|
-
e.suppressSpinner ? D("", !0) : (L(), O("div",
|
|
4569
|
+
e.suppressSpinner ? D("", !0) : (L(), O("div", rr, [
|
|
4519
4570
|
e.spinner ? (L(), E(c, {
|
|
4520
4571
|
key: 0,
|
|
4521
4572
|
icon: "",
|
|
@@ -4549,7 +4600,7 @@ function _sfc_render$2(e, t, n, r, i, a) {
|
|
|
4549
4600
|
});
|
|
4550
4601
|
}
|
|
4551
4602
|
t(_sfc_render$2, "_sfc_render");
|
|
4552
|
-
var
|
|
4603
|
+
var ir = /* @__PURE__ */ r(nr, [["render", _sfc_render$2]]), ar = M({
|
|
4553
4604
|
name: "CourseTagFilterWidget",
|
|
4554
4605
|
props: {
|
|
4555
4606
|
courseId: {
|
|
@@ -4604,13 +4655,13 @@ var nr = /* @__PURE__ */ r(er, [["render", _sfc_render$2]]), rr = M({
|
|
|
4604
4655
|
fuzzyFilter
|
|
4605
4656
|
};
|
|
4606
4657
|
}
|
|
4607
|
-
}),
|
|
4658
|
+
}), or = { class: "course-tag-filter-widget" }, sr = {
|
|
4608
4659
|
key: 0,
|
|
4609
4660
|
class: "filter-summary text-caption mt-2"
|
|
4610
|
-
},
|
|
4661
|
+
}, cr = { key: 0 }, lr = { key: 1 }, ur = { key: 2 };
|
|
4611
4662
|
function _sfc_render$1(e, t, n, r, i, a) {
|
|
4612
4663
|
let o = V("v-chip"), s = V("v-list-item"), c = V("v-autocomplete"), l = V("v-icon");
|
|
4613
|
-
return L(), O("div",
|
|
4664
|
+
return L(), O("div", or, [
|
|
4614
4665
|
j(c, {
|
|
4615
4666
|
modelValue: e.localFilter.include,
|
|
4616
4667
|
"onUpdate:modelValue": t[0] || (t[0] = (t) => e.localFilter.include = t),
|
|
@@ -4692,7 +4743,7 @@ function _sfc_render$1(e, t, n, r, i, a) {
|
|
|
4692
4743
|
"disabled",
|
|
4693
4744
|
"custom-filter"
|
|
4694
4745
|
]),
|
|
4695
|
-
e.hasActiveFilter ? (L(), O("div",
|
|
4746
|
+
e.hasActiveFilter ? (L(), O("div", sr, [
|
|
4696
4747
|
j(l, {
|
|
4697
4748
|
size: "small",
|
|
4698
4749
|
color: "info",
|
|
@@ -4701,18 +4752,18 @@ function _sfc_render$1(e, t, n, r, i, a) {
|
|
|
4701
4752
|
default: W(() => t[2] || (t[2] = [A("mdi-filter")])),
|
|
4702
4753
|
_: 1
|
|
4703
4754
|
}),
|
|
4704
|
-
e.localFilter.include.length ? (L(), O("span",
|
|
4705
|
-
e.localFilter.include.length && e.localFilter.exclude.length ? (L(), O("span",
|
|
4706
|
-
e.localFilter.exclude.length ? (L(), O("span",
|
|
4755
|
+
e.localFilter.include.length ? (L(), O("span", cr, " Including: " + H(e.localFilter.include.join(", ")), 1)) : D("", !0),
|
|
4756
|
+
e.localFilter.include.length && e.localFilter.exclude.length ? (L(), O("span", lr, " · ")) : D("", !0),
|
|
4757
|
+
e.localFilter.exclude.length ? (L(), O("span", ur, " Excluding: " + H(e.localFilter.exclude.join(", ")), 1)) : D("", !0)
|
|
4707
4758
|
])) : D("", !0)
|
|
4708
4759
|
]);
|
|
4709
4760
|
}
|
|
4710
4761
|
t(_sfc_render$1, "_sfc_render");
|
|
4711
|
-
var
|
|
4762
|
+
var dr = /* @__PURE__ */ r(ar, [["render", _sfc_render$1], ["__scopeId", "data-v-e1ba963b"]]), $ = {
|
|
4712
4763
|
min: 0,
|
|
4713
4764
|
startingMax: 2,
|
|
4714
4765
|
absoluteMax: 10
|
|
4715
|
-
},
|
|
4766
|
+
}, fr = "UserTagPreferenceFilter", pr = M({
|
|
4716
4767
|
name: "UserTagPreferences",
|
|
4717
4768
|
props: {
|
|
4718
4769
|
courseId: {
|
|
@@ -4778,7 +4829,7 @@ var lr = /* @__PURE__ */ r(rr, [["render", _sfc_render$1], ["__scopeId", "data-v
|
|
|
4778
4829
|
try {
|
|
4779
4830
|
if (this.user = await getCurrentUser() ?? null, !this.user) throw Error("User not available");
|
|
4780
4831
|
this.courseDB = X().getCourseDB(this.courseId), this.availableTags = (await this.courseDB.getCourseTagStubs()).rows.map((e) => e.doc).filter(Boolean);
|
|
4781
|
-
let e = await this.user.getStrategyState(this.courseId,
|
|
4832
|
+
let e = await this.user.getStrategyState(this.courseId, fr);
|
|
4782
4833
|
e ? this.preferences.boost = { ...e.boost } : this.preferences.boost = {}, this.savedPreferences.boost = { ...this.preferences.boost }, this.tagMaxRanges = {}, Object.keys(this.preferences.boost).forEach((e) => {
|
|
4783
4834
|
let t = this.preferences.boost[e], n = this.sliderConfigResolved.startingMax;
|
|
4784
4835
|
t > n ? this.tagMaxRanges[e] = Math.min(Math.ceil(t), this.sliderConfigResolved.absoluteMax) : this.tagMaxRanges[e] = n;
|
|
@@ -4829,7 +4880,7 @@ var lr = /* @__PURE__ */ r(rr, [["render", _sfc_render$1], ["__scopeId", "data-v
|
|
|
4829
4880
|
boost: { ...this.preferences.boost },
|
|
4830
4881
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4831
4882
|
};
|
|
4832
|
-
await this.user.putStrategyState(this.courseId,
|
|
4883
|
+
await this.user.putStrategyState(this.courseId, fr, e), this.savedPreferences.boost = { ...this.preferences.boost }, this.saveSuccess = !0, this.$emit("preferences-saved", e);
|
|
4833
4884
|
} catch (e) {
|
|
4834
4885
|
console.error("Failed to save preferences:", e), this.saveError = "Failed to save preferences. Please try again.";
|
|
4835
4886
|
} finally {
|
|
@@ -4837,13 +4888,13 @@ var lr = /* @__PURE__ */ r(rr, [["render", _sfc_render$1], ["__scopeId", "data-v
|
|
|
4837
4888
|
}
|
|
4838
4889
|
}
|
|
4839
4890
|
}
|
|
4840
|
-
}),
|
|
4891
|
+
}), mr = { key: 1 }, hr = { class: "mb-6" }, gr = { class: "text-subtitle-1 font-weight-bold mb-2" }, _r = { class: "d-flex align-center ga-3 w-100" }, vr = {
|
|
4841
4892
|
class: "text-body-2 flex-shrink-0",
|
|
4842
4893
|
style: {
|
|
4843
4894
|
"min-width": "60px",
|
|
4844
4895
|
"text-align": "right"
|
|
4845
4896
|
}
|
|
4846
|
-
},
|
|
4897
|
+
}, yr = {
|
|
4847
4898
|
key: 2,
|
|
4848
4899
|
class: "d-flex justify-center py-8"
|
|
4849
4900
|
};
|
|
@@ -4863,12 +4914,12 @@ function _sfc_render(e, t, n, r, i, a) {
|
|
|
4863
4914
|
_: 1
|
|
4864
4915
|
})) : D("", !0),
|
|
4865
4916
|
j(_, null, {
|
|
4866
|
-
default: W(() => [e.courseId ? e.loading ? (L(), O("div",
|
|
4917
|
+
default: W(() => [e.courseId ? e.loading ? (L(), O("div", yr, [j(g, {
|
|
4867
4918
|
indeterminate: "",
|
|
4868
4919
|
color: "primary"
|
|
4869
|
-
})])) : (L(), O("div",
|
|
4870
|
-
k("div",
|
|
4871
|
-
k("h3",
|
|
4920
|
+
})])) : (L(), O("div", mr, [
|
|
4921
|
+
k("div", hr, [
|
|
4922
|
+
k("h3", gr, [j(o, {
|
|
4872
4923
|
start: "",
|
|
4873
4924
|
size: "small"
|
|
4874
4925
|
}, {
|
|
@@ -4908,7 +4959,7 @@ function _sfc_render(e, t, n, r, i, a) {
|
|
|
4908
4959
|
key: t,
|
|
4909
4960
|
class: "px-0"
|
|
4910
4961
|
}, {
|
|
4911
|
-
default: W(() => [k("div",
|
|
4962
|
+
default: W(() => [k("div", _r, [
|
|
4912
4963
|
j(f, {
|
|
4913
4964
|
size: "small",
|
|
4914
4965
|
variant: "tonal",
|
|
@@ -4936,7 +4987,7 @@ function _sfc_render(e, t, n, r, i, a) {
|
|
|
4936
4987
|
"max",
|
|
4937
4988
|
"onUpdate:modelValue"
|
|
4938
4989
|
]),
|
|
4939
|
-
k("span",
|
|
4990
|
+
k("span", vr, H(e.formatMultiplier(e.preferences.boost[t])), 1),
|
|
4940
4991
|
j(m, {
|
|
4941
4992
|
icon: "mdi-plus",
|
|
4942
4993
|
size: "small",
|
|
@@ -5031,8 +5082,8 @@ function _sfc_render(e, t, n, r, i, a) {
|
|
|
5031
5082
|
_: 1
|
|
5032
5083
|
}, 8, ["loading"]);
|
|
5033
5084
|
}
|
|
5034
|
-
var
|
|
5085
|
+
var br = /* @__PURE__ */ r(pr, [["render", _sfc_render], ["__scopeId", "data-v-8fb14605"]]);
|
|
5035
5086
|
//#endregion
|
|
5036
|
-
export { a as AudioAutoPlayer,
|
|
5087
|
+
export { a as AudioAutoPlayer, ir as CardBrowser, at as CardHistoryViewer, un as CardLoader, Ke as CardSearch, Qe as CardSearchResults, Q as CardViewer, f as CodeBlockRenderer, Jn as CourseCardBrowser, tr as CourseInformation, dr as CourseTagFilterWidget, Displayable, m as FillInInput, Ae as HeatMap, y as MarkdownRenderer, _ as MdTokenRenderer, $t as MultipleChoiceOption, Ue as PaginatingToolbar, Question, nn as RadioMultipleChoice, xn as RequestPasswordReset, Fn as ResetPassword, Bt as SessionControllerDebug, Ne as SkMouseTrap, Fe as SkMouseTrapToolTip, e as SkldrMouseTrap, Be as SnackbarService, Zt as StudySession, st as StudySessionTimer, on as TFSelect, Bn as TagsInput, dn as UserChip, cn as UserInputNumber, d as UserInputString, gn as UserLogin, Tn as UserLoginAndRegistrationContainer, vn as UserRegistration, br as UserTagPreferences, Mn as VerifyEmail, Z as alertUser, h as containsComponent, getCurrentUser, getUserStatus, v as isComponent, isDefineComponent, s as isInlineComponent, isPasswordValid, o as isQuestionView, p as parseComponentSyntax, b as parseComponentToken, te as piniaPlugin, requestPasswordReset, resetPassword, resolveLoginIdentifier, sendVerificationEmail, c as splitByDelimiters, l as splitParagraphToken, g as splitTextToken, useAuthStore, i as useCardPreviewModeStore, useConfigStore, useEntitlements, ee as useQuestionView, n as useViewable, validatePassword, verifyEmail };
|
|
5037
5088
|
|
|
5038
5089
|
//# sourceMappingURL=common-ui.es.js.map
|