fix(nav): publish menu contrast, check-in toast and button layout

Use solid light plate + forced ink on 发布 items, notyf instead of alert,
and keep header check-in flex layout after success.
This commit is contained in:
kate522 committed 2026-07-22 09:09:02 +08:00
1 parent 77164fee45
commit 35ac26db28
5 files changed
+238 -81

No files matched your search

+22 -5
View File
@@ -17,12 +17,24 @@
}
function toast(msg, type) {
if (window.aksrt && typeof window.aksrt.toast === 'function') {
window.aksrt.toast(msg, type || 'info');
type = type || 'info';
// Site-wide notification widget (aksrt-runtime notyf).
if (window.aksrt && typeof window.aksrt.notyf === 'function') {
window.aksrt.notyf(msg, { type: type, duration: 2200 });
return;
}
// eslint-disable-next-line no-alert
window.alert(msg);
if (typeof window.aksrtToast === 'function') {
window.aksrtToast(msg, type);
return;
}
if (typeof window.AksrtToast === 'function') {
window.AksrtToast(msg, type);
return;
}
// Last resort: non-blocking console (never native alert for UX).
if (window.console && typeof window.console.log === 'function') {
window.console.log('[aksrt]', type, msg);
}
}
function openModal(id) {
@@ -91,7 +103,12 @@
}
toast((res.data && res.data.message) || '签到成功', 'success');
btn.classList.add('is-done');
btn.innerHTML = '<i class="fas fa-calendar-check" aria-hidden="true"></i> 今日已签到';
btn.disabled = true;
btn.setAttribute('disabled', 'disabled');
// Keep existing structure so CSS layout (.but.block flex) is not lost.
btn.innerHTML =
'<i class="fas fa-calendar-check" aria-hidden="true"></i>' +
'<span>今日已签到</span>';
})
.catch(function () {
toast('网络错误', 'danger');