Added senario name in config selector. also now digipay works

This commit is contained in:
2026-06-30 18:58:37 +03:30
parent 3a1ceaaf2e
commit 42ddcdd22e
3 changed files with 42 additions and 8 deletions
+5 -4
View File
@@ -204,8 +204,8 @@
<option value="onclick">URL match — onclick goToProduct URL fragment</option>
<option value="text">Text match — product title text</option>
</select>
<p class="hint" id="digipay-onclick-hint">Paste URL fragment from <code>goToProduct('https://…')</code> — e.g. <code>roshdbook.ir/product/شیمی-دهم/</code></p>
<p class="hint" id="digipay-text-hint" style="display:none">Paste the visible Persian product title — e.g. <code>شیمی دهم تک جلدی انتشارات مبتکران</code></p>
<p class="hint" id="digipay-onclick-hint">Paste URL fragment from goToProduct('https://…')— e.g. roshdbook.ir/product/شیمی-دهم/</p>
<p class="hint" id="digipay-text-hint" style="display:none">Paste the visible Persian product title — e.g. شیمی دهم تک جلدی انتشارات مبتکران</p>
</div>
<div class="form-row">
<div class="fg">
@@ -821,7 +821,8 @@ function renderConfigs() {
<span class="pill id-badge">#${c.id}</span>
</div>
<div class="config-meta">
Searches: <strong>${(c.search_texts_json || []).length}</strong> text(s) &nbsp;·&nbsp;
<span class="pill" style="font-size:11px;text-transform:uppercase;letter-spacing:.05em">${esc(c.scenario || 'dynamic')}</span>
&nbsp;·&nbsp; Searches: <strong>${(c.search_texts_json || []).length}</strong> text(s) &nbsp;·&nbsp;
Items: <strong>${(c.target_item_ids_json || []).length}</strong> ID(s) &nbsp;·&nbsp;
Max scrolls: <strong>${c.max_scrolls}</strong> &nbsp;·&nbsp;
Search box: <code style="font-size:11px">${esc(c.search_box_selector || '—')}</code>
@@ -846,7 +847,7 @@ function _refreshBatchConfigSelect() {
const sel = document.getElementById('batch-config-select');
const cur = sel.value;
sel.innerHTML = '<option value="">— select a config —</option>' +
_configs.map(c => `<option value="${c.id}" ${String(c.id) === cur ? 'selected' : ''}>${esc(c.name)} (#${c.id})</option>`).join('');
_configs.map(c => `<option value="${c.id}" ${String(c.id) === cur ? 'selected' : ''}>${esc(c.name)} (#${c.id}) [${esc(c.scenario || 'dynamic')}]</option>`).join('');
}
async function deleteConfig(id) {