feat(quizzes): публичные ссылки по токену и флаг no_shuffle
- quizzes.public_token (VARCHAR 32, уникальный индекс) вместо числового id в публичных роутах /api/public-quizzes/:token - бэкилл токенов для существующих строк в db/migration.sql + ensureQuizTables - quiz_questions.no_shuffle — вопрос исключён из перемешивания - POST /api/quizzes/:id/public-token/rotate — сброс утёкшей ссылки (автор/админ) - restore: no_shuffle в INSERT quiz_questions, backup.selftest обновлён - документация AGENTS.md + handoff
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
.qe-asset-cap:focus { outline: 1px solid var(--accent); }
|
||||
.qe-accepted { margin-top: 8px; display: grid; gap: 6px; grid-template-columns: minmax(0,1fr) 150px; align-items: center; }
|
||||
.qe-accepted textarea { grid-column: 1 / -1; }
|
||||
.qe-anon-link { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
|
||||
.qe-anon-link { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
|
||||
.qe-anon-link input { flex: 1; min-width: 0; }
|
||||
.qe-anon-link .btn-link { white-space: nowrap; }
|
||||
.qe-min-len { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
|
||||
@@ -172,6 +172,7 @@
|
||||
<div class="qe-anon-link" id="qeAnonLink" hidden>
|
||||
<input class="settings-input" id="qeAnonUrl" readonly>
|
||||
<button type="button" class="btn-link" data-act="copy-anon">Копировать</button>
|
||||
<button type="button" class="btn-link danger" data-act="rotate-anon">Обновить ссылку</button>
|
||||
<a class="btn-link" id="qeAnonOpen" target="_blank" rel="noopener noreferrer">Открыть</a>
|
||||
</div>
|
||||
<div class="qe-hint" id="qeAnonPublishHint" hidden>Опубликуйте, чтобы ссылка заработала.</div>
|
||||
|
||||
Reference in New Issue
Block a user