@vue-skuilder/common-ui 0.1.11 → 0.1.12
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 +71 -164
- package/dist/common-ui.es.js.map +1 -1
- package/dist/common-ui.umd.js +2 -2
- package/dist/common-ui.umd.js.map +1 -1
- package/dist/stores/useAuthStore.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/StudySession.vue +93 -164
- package/src/components/cardRendering/CardLoader.vue +1 -1
package/dist/assets/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.tooltip[data-v-ca46239a]{background-color:#000c;color:#fff;padding:5px;border-radius:3px;font-size:12px}.sk-mousetrap-tooltip-wrapper[data-v-5d6fb09c]{display:inline-block;position:relative}.sk-mousetrap-tooltip[data-v-5d6fb09c]{position:absolute;background-color:#000c;color:#fff;padding:2px 6px;border-radius:4px;font-size:12px;white-space:nowrap;pointer-events:none;z-index:9999}.sk-mt-tooltip-top[data-v-5d6fb09c]{bottom:100%;margin-bottom:5px;left:50%;transform:translate(-50%)}.sk-mt-tooltip-bottom[data-v-5d6fb09c]{top:100%;margin-top:5px;left:50%;transform:translate(-50%)}.sk-mt-tooltip-left[data-v-5d6fb09c]{right:100%;margin-right:5px;top:50%;transform:translateY(-50%)}.sk-mt-tooltip-right[data-v-5d6fb09c]{left:100%;margin-left:5px;top:50%;transform:translateY(-50%)}.sk-mousetrap-highlight-glow[data-v-5d6fb09c]{box-shadow:0 0 8px 2px #1976d299;transition:box-shadow .25s ease}.sk-mousetrap-highlight-scale[data-v-5d6fb09c]{transform:scale(1.03);transition:transform .25s ease}.sk-mousetrap-highlight-border[data-v-5d6fb09c]{outline:2px solid rgba(25,118,210,.8);outline-offset:2px;border-radius:4px;transition:outline .25s ease,outline-offset .25s ease}.fade-enter-active[data-v-5d6fb09c],.fade-leave-active[data-v-5d6fb09c]{transition:opacity .25s ease}.fade-enter-from[data-v-5d6fb09c],.fade-leave-to[data-v-5d6fb09c]{opacity:0}.pageSelect[data-v-a75fea7e]{max-width:60px}.selected-card[data-v-285e13bd]{background-color:#e0f2f7;border-left:4px solid #2196f3}.cursor-pointer[data-v-285e13bd]{cursor:pointer}.error-message[data-v-a4bdfdfb]{color:#f44336;padding:16px;background-color:#ffebee;border-radius:4px;margin:8px 0}.negative-interval[data-v-a4bdfdfb]{color:#f44336;font-weight:700;background-color:#ffebee;padding:2px 4px;border-radius:3px}.invalid-timestamp[data-v-a4bdfdfb]{color:#f44336;font-weight:700}.card-history-viewer[data-v-a4bdfdfb]{margin:16px 0}.timer-container[data-v-5960940a]{display:inline-flex;cursor:pointer}.cardView[data-v-a180fe1c]{padding:15px;border-radius:8px}.component-fade-enter-active[data-v-a180fe1c],.component-fade-leave-active[data-v-a180fe1c]{transition:opacity .3s ease}.component-fade-enter[data-v-a180fe1c],.component-fade-leave-to[data-v-a180fe1c]{opacity:0}.footer-controls[data-v-
|
|
1
|
+
.tooltip[data-v-ca46239a]{background-color:#000c;color:#fff;padding:5px;border-radius:3px;font-size:12px}.sk-mousetrap-tooltip-wrapper[data-v-5d6fb09c]{display:inline-block;position:relative}.sk-mousetrap-tooltip[data-v-5d6fb09c]{position:absolute;background-color:#000c;color:#fff;padding:2px 6px;border-radius:4px;font-size:12px;white-space:nowrap;pointer-events:none;z-index:9999}.sk-mt-tooltip-top[data-v-5d6fb09c]{bottom:100%;margin-bottom:5px;left:50%;transform:translate(-50%)}.sk-mt-tooltip-bottom[data-v-5d6fb09c]{top:100%;margin-top:5px;left:50%;transform:translate(-50%)}.sk-mt-tooltip-left[data-v-5d6fb09c]{right:100%;margin-right:5px;top:50%;transform:translateY(-50%)}.sk-mt-tooltip-right[data-v-5d6fb09c]{left:100%;margin-left:5px;top:50%;transform:translateY(-50%)}.sk-mousetrap-highlight-glow[data-v-5d6fb09c]{box-shadow:0 0 8px 2px #1976d299;transition:box-shadow .25s ease}.sk-mousetrap-highlight-scale[data-v-5d6fb09c]{transform:scale(1.03);transition:transform .25s ease}.sk-mousetrap-highlight-border[data-v-5d6fb09c]{outline:2px solid rgba(25,118,210,.8);outline-offset:2px;border-radius:4px;transition:outline .25s ease,outline-offset .25s ease}.fade-enter-active[data-v-5d6fb09c],.fade-leave-active[data-v-5d6fb09c]{transition:opacity .25s ease}.fade-enter-from[data-v-5d6fb09c],.fade-leave-to[data-v-5d6fb09c]{opacity:0}.pageSelect[data-v-a75fea7e]{max-width:60px}.selected-card[data-v-285e13bd]{background-color:#e0f2f7;border-left:4px solid #2196f3}.cursor-pointer[data-v-285e13bd]{cursor:pointer}.error-message[data-v-a4bdfdfb]{color:#f44336;padding:16px;background-color:#ffebee;border-radius:4px;margin:8px 0}.negative-interval[data-v-a4bdfdfb]{color:#f44336;font-weight:700;background-color:#ffebee;padding:2px 4px;border-radius:3px}.invalid-timestamp[data-v-a4bdfdfb]{color:#f44336;font-weight:700}.card-history-viewer[data-v-a4bdfdfb]{margin:16px 0}.timer-container[data-v-5960940a]{display:inline-flex;cursor:pointer}.cardView[data-v-a180fe1c]{padding:15px;border-radius:8px}.component-fade-enter-active[data-v-a180fe1c],.component-fade-leave-active[data-v-a180fe1c]{transition:opacity .3s ease}.component-fade-enter[data-v-a180fe1c],.component-fade-leave-to[data-v-a180fe1c]{opacity:0}.footer-controls[data-v-49a65e47]{position:fixed;bottom:0;background-color:var(--v-background);z-index:100}.footer-right[data-v-49a65e47]{position:fixed;bottom:0;right:0;background-color:var(--v-background);z-index:100}.correct[data-v-49a65e47]{animation:varFade-49a65e47 1.25s ease-out}.incorrect[data-v-49a65e47]{animation:purpleFade-49a65e47 1.25s ease-out}a[data-v-49a65e47]{text-decoration:underline}@keyframes varFade-49a65e47{0%{box-shadow:rgba(var(--r),var(--g),0,.25) 0 7px 8px -4px,rgba(var(--r),var(--g),0,.25) 0 12px 17px 2px,rgba(var(--r),var(--g),0,.25) 0 5px 22px 4px}to{box-shadow:#00960000 0 0}}@keyframes greenFade-49a65e47{0%{box-shadow:#00960040 0 7px 8px -4px,#00960040 0 12px 17px 2px,#00960040 0 5px 22px 4px}to{box-shadow:#00960000 0 0}}@keyframes purpleFade-49a65e47{0%{box-shadow:#73004b40 0 7px 8px -4px,#73004b40 0 12px 17px 2px,#73004b40 0 5px 22px 4px}to{box-shadow:#73004b00 0 0}}.choice[data-v-96de7172]{text-align:center;display:inline-block;border-radius:4px;padding:5px 15px;margin:10px;min-width:75px;transition:all .2s ease-in-out}.selected[data-v-96de7172]{transform:translateY(-10px) scale(1.15);z-index:1}.not-selected[data-v-96de7172]{z-index:0}.userInput[data-v-a56dcd1c]{border:none;text-align:center;border-bottom:1px black}.user-input-container[data-v-aa14961f]{display:inline-block;min-width:6em;vertical-align:baseline}.user-input-string[data-v-aa14961f]{display:inline-block;background:transparent;border:none;border-bottom:1px solid currentColor;color:currentColor;font-family:inherit;font-size:inherit;line-height:inherit;padding:0;margin:0;text-align:center;width:100%;outline:none}.user-input-string[data-v-aa14961f]:focus{border-bottom:2px solid currentColor}#input[data-v-486ac035]{display:inline-block;min-width:4em;text-align:center}.underline[data-v-486ac035]{text-decoration:underline;text-decoration-style:solid 14px}.cardView[data-v-93f758b5]{padding:15px;border-radius:8px}.component-fade-enter-active[data-v-93f758b5],.component-fade-leave-active[data-v-93f758b5]{transition:opacity .3s ease}.component-fade-enter[data-v-93f758b5],.component-fade-leave-to[data-v-93f758b5]{opacity:0}.playing[data-v-e1a0f62c]{animation:.85s ease-in-out infinite alternate pulse-e1a0f62c;z-index:1}@keyframes pulse-e1a0f62c{0%{transform:scale(1)}to{transform:scale(1.15)}}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
2
|
Theme: GitHub
|
|
3
3
|
Description: Light theme as seen on github.com
|
|
4
4
|
Author: github.com
|
package/dist/common-ui.es.js
CHANGED
|
@@ -2,8 +2,8 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { defineComponent, createElementBlock, openBlock, createCommentVNode, Fragment, renderList, normalizeStyle, toDisplayString, resolveComponent, createBlock, withCtx, createVNode, createTextVNode, createElementVNode, mergeProps, ref, computed, watch, onMounted, onBeforeUnmount, normalizeClass, renderSlot, Transition, withKeys, resolveDynamicComponent, markRaw, defineAsyncComponent, withDirectives, vModelText, getCurrentInstance, h, withModifiers, vShow } from "vue";
|
|
5
|
-
import { Status, FieldType, toCourseElo,
|
|
6
|
-
import { getCardHistoryID, docIsDeleted, isReview,
|
|
5
|
+
import { Status, FieldType, toCourseElo, log, displayableDataToViewData } from "@vue-skuilder/common";
|
|
6
|
+
import { getCardHistoryID, docIsDeleted, isReview, getStudySource, SessionController, getDataLayer, GuestUsername } from "@vue-skuilder/db";
|
|
7
7
|
import { defineStore, setActivePinia } from "pinia";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
9
9
|
import { VueTagsInput } from "@vojtechlanka/vue-tags-input";
|
|
@@ -7009,117 +7009,60 @@ const _sfc_main$j = defineComponent({
|
|
|
7009
7009
|
this.currentCard.records.push(r2);
|
|
7010
7010
|
console.log(`[StudySession] StudySession.processResponse is running...`);
|
|
7011
7011
|
const cardHistory = this.logCardRecord(r2);
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
} else {
|
|
7046
|
-
const k = Math.ceil(32 / history.records.length);
|
|
7047
|
-
this.updateUserAndCardElo(0.5 + r2.performance / 2, this.courseID, this.cardID, k);
|
|
7048
|
-
}
|
|
7049
|
-
});
|
|
7050
|
-
} else {
|
|
7051
|
-
this.loadCard(await this.sessionController.nextCard("marked-failed"));
|
|
7052
|
-
}
|
|
7053
|
-
} else {
|
|
7054
|
-
try {
|
|
7055
|
-
if (this.$refs.shadowWrapper) {
|
|
7056
|
-
this.$refs.shadowWrapper.classList.add("incorrect");
|
|
7057
|
-
}
|
|
7058
|
-
} catch (e) {
|
|
7059
|
-
console.warn(`[StudySession] Error setting shadowWrapper style: ${e}`);
|
|
7012
|
+
let maxAttemptsPerView = 1;
|
|
7013
|
+
let maxSessionViews = 1;
|
|
7014
|
+
if (isQuestionView(this.$refs.cardViewer?.$refs.activeView)) {
|
|
7015
|
+
const view = this.$refs.cardViewer.$refs.activeView;
|
|
7016
|
+
maxAttemptsPerView = view.maxAttemptsPerView;
|
|
7017
|
+
maxSessionViews = view.maxSessionViews;
|
|
7018
|
+
}
|
|
7019
|
+
const sessionViews = this.countCardViews(this.courseID, this.cardID);
|
|
7020
|
+
const result = await this.sessionController.submitResponse(
|
|
7021
|
+
r2,
|
|
7022
|
+
cardHistory,
|
|
7023
|
+
this.userCourseRegDoc,
|
|
7024
|
+
this.currentCard,
|
|
7025
|
+
this.courseID,
|
|
7026
|
+
this.cardID,
|
|
7027
|
+
maxAttemptsPerView,
|
|
7028
|
+
maxSessionViews,
|
|
7029
|
+
sessionViews
|
|
7030
|
+
);
|
|
7031
|
+
this.handleUIFeedback(result);
|
|
7032
|
+
if (result.shouldLoadNextCard) {
|
|
7033
|
+
this.loadCard(await this.sessionController.nextCard(result.nextCardAction));
|
|
7034
|
+
}
|
|
7035
|
+
if (result.shouldClearFeedbackShadow) {
|
|
7036
|
+
this.clearFeedbackShadow();
|
|
7037
|
+
}
|
|
7038
|
+
},
|
|
7039
|
+
handleUIFeedback(result) {
|
|
7040
|
+
if (result.isCorrect) {
|
|
7041
|
+
try {
|
|
7042
|
+
if (this.$refs.shadowWrapper && result.performanceScore !== void 0) {
|
|
7043
|
+
this.$refs.shadowWrapper.setAttribute("style", `--r: ${255 * (1 - result.performanceScore)}; --g:${255}`);
|
|
7044
|
+
this.$refs.shadowWrapper.classList.add("correct");
|
|
7060
7045
|
}
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7046
|
+
} catch (e) {
|
|
7047
|
+
console.warn(`[StudySession] Error setting shadowWrapper style: ${e}`);
|
|
7048
|
+
}
|
|
7049
|
+
if (this.sessionConfig.likesConfetti) {
|
|
7050
|
+
confetti({
|
|
7051
|
+
origin: {
|
|
7052
|
+
y: 1,
|
|
7053
|
+
x: 0.25 + 0.5 * Math.random()
|
|
7054
|
+
},
|
|
7055
|
+
disableForReducedMotion: true,
|
|
7056
|
+
angle: 60 + 60 * Math.random()
|
|
7065
7057
|
});
|
|
7066
|
-
if (isQuestionView(this.$refs.cardViewer?.$refs.activeView)) {
|
|
7067
|
-
const view = this.$refs.cardViewer.$refs.activeView;
|
|
7068
|
-
if (this.currentCard.records.length >= view.maxAttemptsPerView) {
|
|
7069
|
-
const sessionViews = this.countCardViews(this.courseID, this.cardID);
|
|
7070
|
-
if (sessionViews >= view.maxSessionViews) {
|
|
7071
|
-
this.loadCard(await this.sessionController.nextCard("dismiss-failed"));
|
|
7072
|
-
this.updateUserAndCardElo(0, this.courseID, this.cardID);
|
|
7073
|
-
} else {
|
|
7074
|
-
this.loadCard(await this.sessionController.nextCard("marked-failed"));
|
|
7075
|
-
}
|
|
7076
|
-
}
|
|
7077
|
-
}
|
|
7078
7058
|
}
|
|
7079
7059
|
} else {
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
},
|
|
7084
|
-
async updateUserAndCardElo(userScore, course_id, card_id, k) {
|
|
7085
|
-
if (k) {
|
|
7086
|
-
console.warn(`k value interpretation not currently implemented`);
|
|
7087
|
-
}
|
|
7088
|
-
const courseDB = this.dataLayer.getCourseDB(this.currentCard.card.course_id);
|
|
7089
|
-
const userElo = toCourseElo(this.userCourseRegDoc.courses.find((c) => c.courseID === course_id).elo);
|
|
7090
|
-
const cardElo = (await courseDB.getCardEloData([this.currentCard.card.card_id]))[0];
|
|
7091
|
-
if (cardElo && userElo) {
|
|
7092
|
-
const eloUpdate = adjustCourseScores(userElo, cardElo, userScore);
|
|
7093
|
-
this.userCourseRegDoc.courses.find((c) => c.courseID === course_id).elo = eloUpdate.userElo;
|
|
7094
|
-
const results = await Promise.allSettled([
|
|
7095
|
-
this.user.updateUserElo(course_id, eloUpdate.userElo),
|
|
7096
|
-
courseDB.updateCardElo(card_id, eloUpdate.cardElo)
|
|
7097
|
-
]);
|
|
7098
|
-
const userEloStatus = results[0].status === "fulfilled";
|
|
7099
|
-
const cardEloStatus = results[1].status === "fulfilled";
|
|
7100
|
-
if (userEloStatus && cardEloStatus) {
|
|
7101
|
-
const user = results[0].value;
|
|
7102
|
-
const card = results[1].value;
|
|
7103
|
-
if (user.ok && card && card.ok) {
|
|
7104
|
-
console.log(
|
|
7105
|
-
`[StudySession] Updated ELOS:
|
|
7106
|
-
User: ${JSON.stringify(eloUpdate.userElo)})
|
|
7107
|
-
Card: ${JSON.stringify(eloUpdate.cardElo)})
|
|
7108
|
-
`
|
|
7109
|
-
);
|
|
7110
|
-
}
|
|
7111
|
-
} else {
|
|
7112
|
-
console.log(
|
|
7113
|
-
`[StudySession] Partial ELO update:
|
|
7114
|
-
User ELO update: ${userEloStatus ? "SUCCESS" : "FAILED"}
|
|
7115
|
-
Card ELO update: ${cardEloStatus ? "SUCCESS" : "FAILED"}`
|
|
7116
|
-
);
|
|
7117
|
-
if (!userEloStatus && results[0].status === "rejected") {
|
|
7118
|
-
console.error("[StudySession] User ELO update error:", results[0].reason);
|
|
7119
|
-
}
|
|
7120
|
-
if (!cardEloStatus && results[1].status === "rejected") {
|
|
7121
|
-
console.error("[StudySession] Card ELO update error:", results[1].reason);
|
|
7060
|
+
try {
|
|
7061
|
+
if (this.$refs.shadowWrapper) {
|
|
7062
|
+
this.$refs.shadowWrapper.classList.add("incorrect");
|
|
7122
7063
|
}
|
|
7064
|
+
} catch (e) {
|
|
7065
|
+
console.warn(`[StudySession] Error setting shadowWrapper style: ${e}`);
|
|
7123
7066
|
}
|
|
7124
7067
|
}
|
|
7125
7068
|
},
|
|
@@ -7135,23 +7078,8 @@ const _sfc_main$j = defineComponent({
|
|
|
7135
7078
|
}, 1250);
|
|
7136
7079
|
},
|
|
7137
7080
|
async logCardRecord(r2) {
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
async scheduleReview(history, item) {
|
|
7141
|
-
const nextInterval = newInterval(this.$props.user, history);
|
|
7142
|
-
const nextReviewTime = hooks.utc().add(nextInterval, "seconds");
|
|
7143
|
-
if (isReview(item)) {
|
|
7144
|
-
console.log(`[StudySession] Removing previously scheduled review for: ${item.cardID}`);
|
|
7145
|
-
this.user.removeScheduledCardReview(item.reviewID);
|
|
7146
|
-
}
|
|
7147
|
-
this.user.scheduleCardReview({
|
|
7148
|
-
user: this.user.getUsername(),
|
|
7149
|
-
course_id: history.courseID,
|
|
7150
|
-
card_id: history.cardID,
|
|
7151
|
-
time: nextReviewTime,
|
|
7152
|
-
scheduledFor: item.contentSourceType,
|
|
7153
|
-
schedulingAgentId: item.contentSourceID
|
|
7154
|
-
});
|
|
7081
|
+
const result = await this.user.putCardRecord(r2);
|
|
7082
|
+
return result;
|
|
7155
7083
|
},
|
|
7156
7084
|
async loadCard(card) {
|
|
7157
7085
|
if (this.loading) {
|
|
@@ -7208,24 +7136,19 @@ const _hoisted_1$b = {
|
|
|
7208
7136
|
class: "StudySession"
|
|
7209
7137
|
};
|
|
7210
7138
|
const _hoisted_2$7 = {
|
|
7211
|
-
key: 0,
|
|
7212
|
-
class: "text-h3"
|
|
7213
|
-
};
|
|
7214
|
-
const _hoisted_3$5 = {
|
|
7215
7139
|
key: 0,
|
|
7216
7140
|
class: "text-h4"
|
|
7217
7141
|
};
|
|
7218
|
-
const
|
|
7219
|
-
const
|
|
7142
|
+
const _hoisted_3$5 = { key: 0 };
|
|
7143
|
+
const _hoisted_4$3 = {
|
|
7220
7144
|
key: 1,
|
|
7221
7145
|
ref: "shadowWrapper"
|
|
7222
7146
|
};
|
|
7223
|
-
const
|
|
7147
|
+
const _hoisted_5$3 = { key: 2 };
|
|
7224
7148
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7225
7149
|
const _component_v_spacer = resolveComponent("v-spacer");
|
|
7226
7150
|
const _component_v_progress_circular = resolveComponent("v-progress-circular");
|
|
7227
7151
|
const _component_v_row = resolveComponent("v-row");
|
|
7228
|
-
const _component_router_link = resolveComponent("router-link");
|
|
7229
7152
|
const _component_heat_map = resolveComponent("heat-map");
|
|
7230
7153
|
const _component_card_viewer = resolveComponent("card-viewer");
|
|
7231
7154
|
const _component_StudySessionTimer = resolveComponent("StudySessionTimer");
|
|
@@ -7234,10 +7157,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7234
7157
|
return _ctx.sessionPrepared ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
7235
7158
|
createVNode(_component_v_row, { align: "center" }, {
|
|
7236
7159
|
default: withCtx(() => [
|
|
7237
|
-
_ctx.courseNames[_ctx.courseID] ? (openBlock(), createElementBlock("h1", _hoisted_2$7, toDisplayString(_ctx.courseNames[_ctx.courseID]) + ":", 1)) : createCommentVNode("", true),
|
|
7238
7160
|
createVNode(_component_v_spacer),
|
|
7239
7161
|
_ctx.loading ? (openBlock(), createBlock(_component_v_progress_circular, {
|
|
7240
|
-
key:
|
|
7162
|
+
key: 0,
|
|
7241
7163
|
color: "primary",
|
|
7242
7164
|
indeterminate: "",
|
|
7243
7165
|
size: "32",
|
|
@@ -7246,32 +7168,17 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7246
7168
|
]),
|
|
7247
7169
|
_: 1
|
|
7248
7170
|
}),
|
|
7249
|
-
_cache[
|
|
7250
|
-
_ctx.sessionFinished ? (openBlock(), createElementBlock("div",
|
|
7251
|
-
_cache[
|
|
7252
|
-
_ctx.sessionController ? (openBlock(), createElementBlock("p",
|
|
7253
|
-
createElementVNode("p", null, [
|
|
7254
|
-
_cache[3] || (_cache[3] = createTextVNode(" Start ")),
|
|
7255
|
-
createElementVNode("a", {
|
|
7256
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("session-finished"))
|
|
7257
|
-
}, "another study session"),
|
|
7258
|
-
_cache[4] || (_cache[4] = createTextVNode(", or try ")),
|
|
7259
|
-
createVNode(_component_router_link, {
|
|
7260
|
-
to: `/edit/${_ctx.courseID}`
|
|
7261
|
-
}, {
|
|
7262
|
-
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
7263
|
-
createTextVNode("adding some new content")
|
|
7264
|
-
])),
|
|
7265
|
-
_: 1
|
|
7266
|
-
}, 8, ["to"]),
|
|
7267
|
-
_cache[5] || (_cache[5] = createTextVNode(" to challenge yourself and others! "))
|
|
7268
|
-
]),
|
|
7171
|
+
_cache[2] || (_cache[2] = createElementVNode("br", null, null, -1)),
|
|
7172
|
+
_ctx.sessionFinished ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
7173
|
+
_cache[1] || (_cache[1] = createElementVNode("p", null, "Study session finished! Great job!", -1)),
|
|
7174
|
+
_ctx.sessionController ? (openBlock(), createElementBlock("p", _hoisted_3$5, toDisplayString(_ctx.sessionController.report), 1)) : createCommentVNode("", true),
|
|
7269
7175
|
createVNode(_component_heat_map, {
|
|
7270
7176
|
"activity-records-getter": () => _ctx.user.getActivityRecords()
|
|
7271
7177
|
}, null, 8, ["activity-records-getter"])
|
|
7272
|
-
])) : (openBlock(), createElementBlock("div",
|
|
7273
|
-
|
|
7178
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_4$3, [
|
|
7179
|
+
(openBlock(), createBlock(_component_card_viewer, {
|
|
7274
7180
|
ref: "cardViewer",
|
|
7181
|
+
key: _ctx.cardID,
|
|
7275
7182
|
class: normalizeClass(_ctx.loading ? "muted" : ""),
|
|
7276
7183
|
view: _ctx.view,
|
|
7277
7184
|
data: _ctx.data,
|
|
@@ -7280,11 +7187,11 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7280
7187
|
"session-order": _ctx.cardCount,
|
|
7281
7188
|
user_elo: _ctx.user_elo(_ctx.courseID),
|
|
7282
7189
|
card_elo: _ctx.card_elo,
|
|
7283
|
-
onEmitResponse: _cache[
|
|
7284
|
-
}, null, 8, ["class", "view", "data", "card_id", "course_id", "session-order", "user_elo", "card_elo"])
|
|
7190
|
+
onEmitResponse: _cache[0] || (_cache[0] = ($event) => _ctx.processResponse($event))
|
|
7191
|
+
}, null, 8, ["class", "view", "data", "card_id", "course_id", "session-order", "user_elo", "card_elo"]))
|
|
7285
7192
|
], 512)),
|
|
7286
|
-
_cache[
|
|
7287
|
-
_ctx.sessionController ? (openBlock(), createElementBlock("div",
|
|
7193
|
+
_cache[3] || (_cache[3] = createElementVNode("br", null, null, -1)),
|
|
7194
|
+
_ctx.sessionController ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
7288
7195
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sessionController.failedCount, (i) => {
|
|
7289
7196
|
return openBlock(), createElementBlock("span", {
|
|
7290
7197
|
key: i,
|
|
@@ -7325,7 +7232,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7325
7232
|
})
|
|
7326
7233
|
])) : createCommentVNode("", true);
|
|
7327
7234
|
}
|
|
7328
|
-
const StudySession = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$d], ["__scopeId", "data-v-
|
|
7235
|
+
const StudySession = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$d], ["__scopeId", "data-v-49a65e47"]]);
|
|
7329
7236
|
let _pinia = null;
|
|
7330
7237
|
const setPinia = (pinia) => {
|
|
7331
7238
|
_pinia = pinia;
|
|
@@ -7903,7 +7810,7 @@ const _sfc_main$c = defineComponent({
|
|
|
7903
7810
|
},
|
|
7904
7811
|
async loadCard() {
|
|
7905
7812
|
const qualified_id = this.qualified_id;
|
|
7906
|
-
console.log(`Card Loader displaying: ${qualified_id.courseID}
|
|
7813
|
+
console.log(`Card Loader displaying: ${qualified_id.courseID}::${qualified_id.cardID}`);
|
|
7907
7814
|
this.loading = true;
|
|
7908
7815
|
const _courseID = qualified_id.courseID;
|
|
7909
7816
|
const _cardID = qualified_id.cardID;
|
|
@@ -7948,7 +7855,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7948
7855
|
onEmitResponse: _cache[0] || (_cache[0] = ($event) => _ctx.processResponse($event))
|
|
7949
7856
|
}, null, 8, ["class", "view", "data", "card_id", "course_id", "session-order"])) : createCommentVNode("", true);
|
|
7950
7857
|
}
|
|
7951
|
-
const CardLoader = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$6], ["__scopeId", "data-v-
|
|
7858
|
+
const CardLoader = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$6], ["__scopeId", "data-v-93f758b5"]]);
|
|
7952
7859
|
function _getDefaults() {
|
|
7953
7860
|
return {
|
|
7954
7861
|
async: false,
|