fix: indentation in frontend handlers and restore dhcp auto-sync toast

This commit is contained in:
2026-07-28 19:32:17 +00:00
parent 8ae60ab8cf
commit 6d30f1387e
3 changed files with 17 additions and 12 deletions
+6 -1
View File
@@ -209,7 +209,12 @@ export default definePage({
'on:click': async () => { 'on:click': async () => {
const res = await apiFetch('/api/dhcp/apply', { method: 'POST' }); const res = await apiFetch('/api/dhcp/apply', { method: 'POST' });
if (res.ok) { if (res.ok) {
toast('dnsmasq applied', 'success'); const synced = res.data?.synced;
let msg = 'dnsmasq applied';
if (synced && synced.length) {
msg += ' (auto-synced: ' + synced.join(', ') + ')';
}
toast(msg, 'success');
modelFetch('dnsmasq'); modelFetch('dnsmasq');
} else { } else {
toast(res.error || 'Apply failed', 'error'); toast(res.error || 'Apply failed', 'error');