viberadar 0.3.130 → 0.3.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/dashboard.html +16 -8
- package/package.json +1 -1
package/dist/ui/dashboard.html
CHANGED
|
@@ -4765,11 +4765,16 @@ async function renderDocFeatureDetail(c) {
|
|
|
4765
4765
|
const featResult = D.features?.find(x => x.key === drillFeatureKey);
|
|
4766
4766
|
const featRoutes = featResult?.routes;
|
|
4767
4767
|
const hasRoutes = featRoutes && featRoutes.length > 0;
|
|
4768
|
-
const
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4768
|
+
const isFirstGen = !f.docExists;
|
|
4769
|
+
// First generation + routes → Playwright runs automatically, show info
|
|
4770
|
+
// Re-actualization + routes → show checkbox (opt-in)
|
|
4771
|
+
const screenshotUiHtml = hasRoutes
|
|
4772
|
+
? isFirstGen
|
|
4773
|
+
? `<div style="margin-top:8px;font-size:12px;color:var(--muted)">📸 Playwright автоматически захватит скриншоты (${featRoutes.length} маршрут${featRoutes.length < 5 ? 'а' : 'ов'}: ${featRoutes.join(', ')})</div>`
|
|
4774
|
+
: `<label style="display:flex;align-items:center;gap:6px;margin-top:8px;font-size:12px;color:var(--muted);cursor:pointer">
|
|
4775
|
+
<input type="checkbox" id="docCaptureScreenshots" style="cursor:pointer">
|
|
4776
|
+
📸 Переснять скриншоты (${featRoutes.length} маршрут${featRoutes.length < 5 ? 'а' : 'ов'}: ${featRoutes.join(', ')})
|
|
4777
|
+
</label>`
|
|
4773
4778
|
: '';
|
|
4774
4779
|
const detailActionsHtml = `
|
|
4775
4780
|
<div class="doc-detail-actions">
|
|
@@ -4778,9 +4783,9 @@ async function renderDocFeatureDetail(c) {
|
|
|
4778
4783
|
<div class="doc-step-label">${detailActualizeLabel}</div>
|
|
4779
4784
|
<div class="doc-step-hint">${detailActualizeHint}</div>
|
|
4780
4785
|
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px">
|
|
4781
|
-
<button class="agent-card-btn doc-detail-agent-btn" data-task="actualize-docs" data-key="${f.key}">Актуализировать документацию → v${nextVersion}</button>
|
|
4782
|
-
${screenshotCheckboxHtml}
|
|
4786
|
+
<button class="agent-card-btn doc-detail-agent-btn" data-task="actualize-docs" data-key="${f.key}" data-first-gen="${isFirstGen ? '1' : '0'}">Актуализировать документацию → v${nextVersion}</button>
|
|
4783
4787
|
</div>
|
|
4788
|
+
${screenshotUiHtml}
|
|
4784
4789
|
<div id="docActualizeStatus" style="display:none;margin-top:10px;padding:8px 12px;border-radius:6px;background:rgba(88,166,255,0.08);border:1px solid rgba(88,166,255,0.2);font-size:12px;color:var(--blue)"></div>
|
|
4785
4790
|
${versionsHtml}
|
|
4786
4791
|
</div>
|
|
@@ -4837,8 +4842,11 @@ async function renderDocFeatureDetail(c) {
|
|
|
4837
4842
|
|
|
4838
4843
|
c.querySelectorAll('.doc-detail-agent-btn').forEach(btn => {
|
|
4839
4844
|
btn.addEventListener('click', () => {
|
|
4845
|
+
const isFirstGen = btn.dataset.firstGen === '1';
|
|
4840
4846
|
const cb = document.getElementById('docCaptureScreenshots');
|
|
4841
|
-
|
|
4847
|
+
// First gen → always capture if routes exist (info shown, no checkbox)
|
|
4848
|
+
// Re-actualization → only if checkbox checked
|
|
4849
|
+
const captureScreenshots = isFirstGen || (cb && cb.checked);
|
|
4842
4850
|
const meta = captureScreenshots ? { captureScreenshots: true } : undefined;
|
|
4843
4851
|
btn.disabled = true;
|
|
4844
4852
|
setDocActualizeStatus(btn.dataset.key,
|