skillmkt 0.4.38 → 0.4.39
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/client/public/app.js +2 -2
- package/client/public/index.html +1 -0
- package/package.json +1 -1
package/client/public/app.js
CHANGED
|
@@ -278,8 +278,8 @@ async function render() {
|
|
|
278
278
|
app.querySelectorAll('[data-rm]').forEach((b) => {
|
|
279
279
|
let armed = false, timer = null;
|
|
280
280
|
b.onclick = async () => {
|
|
281
|
-
if (!armed) { armed = true; b.textContent = t('sk_remove_sure'); b.
|
|
282
|
-
clearTimeout(timer); b.disabled = true; b.textContent = t('op_busy');
|
|
281
|
+
if (!armed) { armed = true; b.textContent = t('sk_remove_sure'); b.classList.add('danger'); timer = setTimeout(() => { armed = false; b.textContent = t('sk_remove'); b.classList.remove('danger'); }, 3000); return; }
|
|
282
|
+
clearTimeout(timer); b.disabled = true; b.classList.remove('danger'); b.textContent = t('op_busy');
|
|
283
283
|
const r = await api('/remove', { method: 'POST', body: JSON.stringify({ name: b.dataset.rm }) });
|
|
284
284
|
b.textContent = r.code === 0 ? t('sk_removed') : t('ins_fail', r.code);
|
|
285
285
|
if (r.code === 0) refresh();
|
package/client/public/index.html
CHANGED
|
@@ -67,6 +67,7 @@ button:hover { border-color: var(--color-ink-mut); }
|
|
|
67
67
|
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
|
|
68
68
|
outline: 2px solid var(--color-accent); outline-offset: 2px; }
|
|
69
69
|
button.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
|
|
70
|
+
button.danger { background: var(--color-bad); border-color: var(--color-bad); color: var(--color-accent-ink); }
|
|
70
71
|
button.primary:hover { filter: brightness(0.94); }
|
|
71
72
|
button:disabled { opacity: 0.45; cursor: default; }
|
|
72
73
|
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
|