@@ -257,6 +211,7 @@
+
+
@@ -625,19 +580,13 @@ let _dashOffset = 0; // animated dash offset for link flow
const user = LS.getUser();
LS.initPage();
- // sbl-classes — только для учителей/админов
- if (user.role !== 'student') {
- const el = document.getElementById('sbl-classes');
- if (el) el.style.display = '';
- }
- if (user.role === 'admin') {
- const a = document.getElementById('sbl-admin');
- if (a) a.style.display = '';
- }
LS.showBoardIfAllowed();
LS.notif.init();
lucide.createIcons();
+ const feats = await LS.loadFeatures();
+ if (feats.knowledge_map === false) { window.location.replace('/403'); return; }
+ LS.hideDisabledFeatures?.();
document.querySelector('.sb-toggle')?.addEventListener('click', () => {
setTimeout(() => { resizeCanvas(); recenter(); }, 310);
diff --git a/frontend/lab.html b/frontend/lab.html
index d48c851..b4dc8da 100644
--- a/frontend/lab.html
+++ b/frontend/lab.html
@@ -648,51 +648,7 @@
-
+
@@ -3689,6 +3645,7 @@
+
@@ -3713,10 +3670,7 @@
const { user, isTeacher, isAdmin } = LS.initPage();
window._simQuizAllowed = true; // default; overridden after permission fetch for students
LS.showBoardIfAllowed();
- if (isTeacher) {
- document.getElementById('sbl-classes').style.display = '';
- document.getElementById('sbl-admin').style.display = '';
- }
+
/* ════════════════════════════════
SIM CATALOGUE (defined after P_* consts below)
diff --git a/frontend/lesson-editor.html b/frontend/lesson-editor.html
index d79bb46..000882a 100644
--- a/frontend/lesson-editor.html
+++ b/frontend/lesson-editor.html
@@ -1001,6 +1001,7 @@
+
+
+
+
+
@@ -497,11 +449,8 @@
LS.showBoardIfAllowed();
if (isTeacher) {
- document.getElementById('btn-upload-nav').style.display = '';
document.getElementById('btn-upload-main').style.display = '';
document.getElementById('btn-new-folder').style.display = '';
- document.getElementById('sbl-classes').style.display = '';
- document.getElementById('sbl-admin').style.display = '';
}
/* ── constants ── */
diff --git a/frontend/live-quiz.html b/frontend/live-quiz.html
index 0afcef9..1e90618 100644
--- a/frontend/live-quiz.html
+++ b/frontend/live-quiz.html
@@ -336,53 +336,7 @@
-
+
@@ -495,6 +449,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
after api.js on each page.
+
+const fs = require('fs');
+const path = require('path');
+
+const FRONTEND = path.join(__dirname, '..', 'frontend');
+
+// Pages that get the universal sidebar (excludes test-run.html, login.html, 403/404/500, parent.html, guest-board.html)
+const PAGES = [
+ 'admin', 'analytics',
+ 'biochem', 'biochem-library', 'biochem-pathways', 'biochem-properties', 'biochem-reactions',
+ 'board', 'classes', 'classroom', 'collection', 'collection-rb', 'course', 'crossword',
+ 'dashboard', 'flashcards', 'gradebook', 'hangman', 'homework',
+ 'knowledge-map', 'lab', 'lesson', 'lesson-editor', 'lesson-history', 'library', 'live-quiz',
+ 'my-lessons', 'pet', 'profile', 'question-bank',
+ 'red-book', 'red-book-biomes', 'red-book-ecosystem', 'red-book-games',
+ 'theory',
+];
+
+// Regex: match
+// Handles optional extra attributes and multi-line content
+const ASIDE_RE = /