feat(materials): Фаза 6a — учителю своя коллекция «Мои материалы»
- lesson-history.html (страница учителя): подключён board-clip.js, кнопки «К себе»/«Область» на доске прошлой сессии (обёртки над _wb + _activeSession). - sidebar.js: пункт «Мои материалы» теперь виден всем (не только ученикам). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1001,6 +1001,14 @@
|
|||||||
<span>Загрузка доски...</span>
|
<span>Загрузка доски...</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="lh-board-export">
|
<div class="lh-board-export">
|
||||||
|
<button class="lh-export-btn" onclick="saveBoardToMaterials(this)" title="Сохранить страницу в «Мои материалы»">
|
||||||
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>
|
||||||
|
К себе
|
||||||
|
</button>
|
||||||
|
<button class="lh-export-btn" onclick="saveBoardRegion(this)" title="Выделить и сохранить часть доски">
|
||||||
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2v14a2 2 0 0 0 2 2h14"/><path d="M18 22V8a2 2 0 0 0-2-2H2"/></svg>
|
||||||
|
Область
|
||||||
|
</button>
|
||||||
<button class="lh-export-btn" onclick="exportBoardPage()">
|
<button class="lh-export-btn" onclick="exportBoardPage()">
|
||||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
||||||
PNG
|
PNG
|
||||||
@@ -1074,6 +1082,7 @@
|
|||||||
<script src="/js/notifications.js"></script>
|
<script src="/js/notifications.js"></script>
|
||||||
<script src="/js/mobile.js"></script>
|
<script src="/js/mobile.js"></script>
|
||||||
<script src="/js/whiteboard.js"></script>
|
<script src="/js/whiteboard.js"></script>
|
||||||
|
<script src="/js/board-clip.js"></script>
|
||||||
<script>
|
<script>
|
||||||
/* ══════════════════════════════════════════════════════
|
/* ══════════════════════════════════════════════════════
|
||||||
Lesson History — main script
|
Lesson History — main script
|
||||||
@@ -1619,6 +1628,20 @@ function exportBoardPage() {
|
|||||||
_wb.exportPNG();
|
_wb.exportPNG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Сохранить доску/фрагмент в «Мои материалы» (учитель) — общий модуль board-clip.js */
|
||||||
|
function _matSource() {
|
||||||
|
const s = _activeSession && _activeSession.session;
|
||||||
|
return { sourceSessionId: s ? s.id : null, sourceTitle: s ? (s.title || 'Урок') : null, pageNum: (_wbCurrentPage || 1) };
|
||||||
|
}
|
||||||
|
function saveBoardToMaterials(btn) {
|
||||||
|
if (!_wb) { LS.toast('Откройте страницу доски', 'warn'); return; }
|
||||||
|
BoardClip.savePage(_wb, _matSource(), btn);
|
||||||
|
}
|
||||||
|
function saveBoardRegion(btn) {
|
||||||
|
if (!_wb) { LS.toast('Откройте страницу доски', 'warn'); return; }
|
||||||
|
BoardClip.saveRegion(_wb, _matSource(), btn);
|
||||||
|
}
|
||||||
|
|
||||||
/* ─── Chat ─── */
|
/* ─── Chat ─── */
|
||||||
async function loadChat() {
|
async function loadChat() {
|
||||||
_chatLoaded = true;
|
_chatLoaded = true;
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@
|
|||||||
${L('/my-students', 'user-plus', 'Мои ученики', { cls: 'sb-teacher-only', hidden: !isTch })}
|
${L('/my-students', 'user-plus', 'Мои ученики', { cls: 'sb-teacher-only', hidden: !isTch })}
|
||||||
${L('/classroom', 'presentation', 'Онлайн-урок', { id: 'btn-classroom', cls: 'sb-link-cr' })}
|
${L('/classroom', 'presentation', 'Онлайн-урок', { id: 'btn-classroom', cls: 'sb-link-cr' })}
|
||||||
${L('/lesson-history','archive', 'Архив уроков')}
|
${L('/lesson-history','archive', 'Архив уроков')}
|
||||||
${L('/my-materials', 'bookmark', 'Мои материалы', { hidden: !isStu })}
|
${L('/my-materials', 'bookmark', 'Мои материалы')}
|
||||||
${L('/live-quiz', 'radio', 'Live-квиз', { cls: 'sb-teacher-only', hidden: !isTch })}
|
${L('/live-quiz', 'radio', 'Live-квиз', { cls: 'sb-teacher-only', hidden: !isTch })}
|
||||||
${L('/board', 'layout-dashboard', 'Доска', { id: 'btn-board', hidden: true })}
|
${L('/board', 'layout-dashboard', 'Доска', { id: 'btn-board', hidden: true })}
|
||||||
`)}
|
`)}
|
||||||
|
|||||||
Reference in New Issue
Block a user