feat: pin personal notes to the top of the game modal

Move the status/rating/favorite/notes form under the title and make it a compact sticky panel.
This commit is contained in:
strsv committed 2026-11-07 04:59:46 +03:00
1 parent b65396421c
commit 92c4c62ca9
2 files changed
+33 -21

No files matched your search

+13 -11
View File
@@ -1789,6 +1789,19 @@ function renderModal(g) {
<h2 class="modal-title" id="modalTitle">${esc(g.name)}</h2>
<button class="modal-close" id="modalClose" title="Закрыть" aria-label="Закрыть">×</button>
</div>
<form class="personal personal-sticky" id="personalForm">
<div class="personal-head"><h3>Моя отметка</h3></div>
<div class="personal-grid">
<label>Статус<select id="pStatus">${statusOptions}</select></label>
<label>Оценка (1–10)<input id="pRating" type="number" min="1" max="10" value="${g.rating || ""}"></label>
<label class="check"><input type="checkbox" id="pFavorite" ${g.favorite ? "checked" : ""}> избранное</label>
<label class="wide">Заметка<textarea id="pNotes" rows="1">${esc(g.notes || "")}</textarea></label>
</div>
<div class="personal-actions">
<button type="submit" class="save">Сохранить</button>
<a class="steam-link" href="${g.steam_url}" target="_blank" rel="noopener">Открыть в Steam</a>
</div>
</form>
<div class="modal-meta">${meta}</div>
<div class="chip-row">${genres}</div>
<p class="modal-desc">${esc(shortText)}</p>
@@ -1799,17 +1812,6 @@ function renderModal(g) {
${addons}
${similar}
${attrs}
<form class="personal" id="personalForm">
<h3>Моя отметка</h3>
<label>Статус<select id="pStatus">${statusOptions}</select></label>
<label>Оценка (1–10)<input id="pRating" type="number" min="1" max="10" value="${g.rating || ""}"></label>
<label class="check wide"><input type="checkbox" id="pFavorite" ${g.favorite ? "checked" : ""}> избранное</label>
<label class="wide">Заметка<textarea id="pNotes" rows="2">${esc(g.notes || "")}</textarea></label>
<div class="personal-actions">
<button type="submit" class="save">Сохранить</button>
<a class="steam-link" href="${g.steam_url}" target="_blank" rel="noopener">Открыть в Steam</a>
</div>
</form>
</div>
</div>`;