diff --git a/frontend/course.html b/frontend/course.html
index 8348452..9bc0aff 100644
--- a/frontend/course.html
+++ b/frontend/course.html
@@ -448,70 +448,6 @@
-
-
-
Новый раздел
-
-
-
-
-
-
-
-
-
-
-
-
Редактировать курс
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Новый урок
-
-
-
-
-
-
-
-
-
-
-
-
Сохранить курс как шаблон
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/dashboard.html b/frontend/dashboard.html
index 8a32314..0e81729 100644
--- a/frontend/dashboard.html
+++ b/frontend/dashboard.html
@@ -1526,45 +1526,8 @@
-
-
-
Вступить в класс
-
-
Попросите учителя поделиться кодом или ссылкой
-
-
-
-
-
-
-
-
Быстрый тест
-
-
-
- Режим
-
-
-
- Вопросов
-
-
-
-
-
-
-
-
+
+
@@ -2801,12 +2764,19 @@
/* ══ УВЕДОМЛЕНИЯ — handled by notifications.js ══ */
/* ══ JOIN MODAL ════════════════════════════════════════════════════════ */
+ let _joinModal = null;
function openJoinModal(code) {
- document.getElementById('join-code').value = code || '';
- document.getElementById('join-modal').classList.add('open');
- setTimeout(() => document.getElementById('join-code').focus(), 50);
+ const body = `
+
+ Попросите учителя поделиться кодом или ссылкой
`;
+ _joinModal = LS.modal({
+ title: 'Вступить в класс', content: body, size: 'sm',
+ actions: [
+ { label: 'Отмена', onClick: () => _joinModal.close() },
+ { label: 'Вступить', primary: true, id: 'btn-do-join', onClick: doJoin },
+ ],
+ });
}
- function closeJoinModal() { document.getElementById('join-modal').classList.remove('open'); }
async function doJoin() {
const code = document.getElementById('join-code').value.trim();
if (!code) return;
@@ -2814,11 +2784,10 @@
btn.disabled = true;
try {
const r = await LS.joinClass(code);
- closeJoinModal();
+ _joinModal?.close();
LS.toast(`Вы вступили в класс «${r.class_name}»!`, 'success');
loadAssignments();
- } catch (e) { LS.toast('Ошибка: ' + e.message, 'error'); }
- finally { btn.disabled = false; }
+ } catch (e) { LS.toast('Ошибка: ' + e.message, 'error'); btn.disabled = false; }
}
/* ══ SUBMISSIONS (student) ════════════════════════════════════════════ */
@@ -3439,33 +3408,59 @@
/* ══ B1: QUICK-START MODAL ═════════════════════════════════════════ */
let _qsSlug = null;
+ let _qsModal = null;
async function openQuickStart(slug) {
_qsSlug = slug || null;
+ let subjectsHtml = '';
try {
const subjects = await LS.getSubjects();
- document.getElementById('qs-subjects').innerHTML = subjects.map(s => {
+ subjectsHtml = subjects.map(s => {
const color = SUBJ_COLORS[s.slug] || '#9B5DE5';
const active = s.slug === _qsSlug ? ' active' : '';
- return `