Add nickname position selector and "use as price" toggle

Adds two more nickname controls. A position selector (Auto / Снизу /
Сверху) lets users override the auto-positioning that previously moved
the nickname to the top whenever a price tag was visible — Auto keeps
the old behavior. A "Use as price — add ₽" checkbox appends the ruble
symbol to the rendered nickname text and inserts thousands separators
when the text is purely digits, making it usable as a price label
without the yellow band (handy when you want a curved price instead).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zuevav
2026-05-14 22:51:29 +03:00
parent a781deccdd
commit 8434a6888f
2 changed files with 67 additions and 3 deletions
+23
View File
@@ -685,6 +685,29 @@ https://live.staticflickr.com/65535/12345678901_abcdef1234_b.jpg"></textarea>
<input type="text" id="badge-nickname-value" maxlength="40" placeholder="Никнейм">
<span class="hint">По умолчанию — из настроек.</span>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="badge-nick-as-price">
<span>Использовать как цену — добавить ₽</span>
</label>
</div>
<div class="form-group">
<label>Положение надписи:</label>
<div class="badge-radio-row">
<label class="radio-label">
<input type="radio" name="badge-nick-position" value="auto" checked>
<span>Авто</span>
</label>
<label class="radio-label">
<input type="radio" name="badge-nick-position" value="bottom">
<span>Снизу</span>
</label>
<label class="radio-label">
<input type="radio" name="badge-nick-position" value="top">
<span>Сверху</span>
</label>
</div>
</div>
<div class="form-group">
<label>Размер текста: <span id="badge-nick-size-value">100%</span></label>
<input type="range" id="badge-nick-size" min="60" max="160" step="5" value="100">