fix: .hidden !important — модалка не была скрыта; защита от null-аккаунта в confirmSend/markDone
This commit is contained in:
1 parent
963c29084c
commit
a79be642f0
1 file changed
+3
-1
@@ -67,7 +67,7 @@
|
|||||||
border-radius: 8px; margin-bottom: 8px; background: var(--card); }
|
border-radius: 8px; margin-bottom: 8px; background: var(--card); }
|
||||||
.account-item .name { font-weight: 600; }
|
.account-item .name { font-weight: 600; }
|
||||||
.account-item .actions { display: flex; gap: 8px; }
|
.account-item .actions { display: flex; gap: 8px; }
|
||||||
.hidden { display: none; }
|
.hidden { display: none !important; }
|
||||||
.texts-panel textarea { min-height: 90px; margin-bottom: 8px; }
|
.texts-panel textarea { min-height: 90px; margin-bottom: 8px; }
|
||||||
.texts-panel .item { margin-bottom: 14px; }
|
.texts-panel .item { margin-bottom: 14px; }
|
||||||
.texts-panel .item .title { font-weight: 600; margin-bottom: 4px; }
|
.texts-panel .item .title { font-weight: 600; margin-bottom: 4px; }
|
||||||
@@ -613,6 +613,7 @@ function closeShot() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function confirmSend() {
|
async function confirmSend() {
|
||||||
|
if (!currentAccount) { alert('Сначала выберите аккаунт'); return; }
|
||||||
const btn = document.getElementById('btn-send');
|
const btn = document.getElementById('btn-send');
|
||||||
const note = document.getElementById('send-note');
|
const note = document.getElementById('send-note');
|
||||||
btn.disabled = true; note.textContent = 'Отправляю...';
|
btn.disabled = true; note.textContent = 'Отправляю...';
|
||||||
@@ -633,6 +634,7 @@ async function confirmSend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function markDone(id) {
|
async function markDone(id) {
|
||||||
|
if (!currentAccount) { alert('Сначала выберите аккаунт'); return; }
|
||||||
await api(`/api/accounts/${currentAccount}/done`, {
|
await api(`/api/accounts/${currentAccount}/done`, {
|
||||||
method: 'POST', body: JSON.stringify({ id }),
|
method: 'POST', body: JSON.stringify({ id }),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user