This commit is contained in:
Mateusz Gruszczyński
2025-08-29 22:08:11 +02:00
parent 0d35b3e654
commit 7b6dd96d68
3 changed files with 1 additions and 19 deletions

View File

@@ -1,25 +1,9 @@
(function () {
const t = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', t);
// prosty "try again"
document.querySelector('[data-action="try-again"]')?.addEventListener('click', () => {
location.reload();
});
// kopiowanie logs
document.querySelector('[data-action="copy-text"]')?.addEventListener('click', (e) => {
const sel = e.currentTarget.getAttribute('data-target');
const el = sel && document.querySelector(sel);
if (!el) return;
const txt = el.textContent || '';
navigator.clipboard.writeText(txt).then(() => {
const toast = document.getElementById('toast');
if (toast) {
toast.textContent = 'Copied!';
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 1200);
}
});
});
})();

View File

@@ -248,7 +248,6 @@
const expanded = btn.getAttribute('aria-expanded') === 'true';
panel.hidden = !expanded;
// usuń/ustaw inline display spójnie z hidden
panel.style.display = expanded ? '' : 'none';
const label = expanded ? 'Collapse' : 'Expand';

View File

@@ -65,8 +65,7 @@ user_ip: {{ request.remote_addr if request else '' }}
user_agent: {{ request.headers.get('User-Agent') if request else '' }}
</pre>
<div class="details-actions">
<button class="btn tiny" type="button" data-action="copy-text"
data-target="#error-dump">Copy</button>
</div>
</div>
</details>