fix: resolve widget deletion and layout persistence issues

- Add drag handles to widget title bars for precise drag control
- Prevent delete button from triggering drag via event stopPropagation
- Include statsConfig field in all GET/PUT API responses
- Remove debug console logs from production code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-10-09 09:13:54 +08:00
parent 8623ab896d
commit 8e022f0f1c
2 changed files with 6 additions and 10 deletions

View File

@@ -524,6 +524,7 @@ router.put(
? JSON.parse(updatedHost.tunnelConnections)
: [],
enableFileManager: !!updatedHost.enableFileManager,
statsConfig: updatedHost.statsConfig || undefined,
};
const resolvedHost = (await resolveHostCredentials(baseHost)) || baseHost;
@@ -592,6 +593,7 @@ router.get("/db/host", authenticateJWT, async (req: Request, res: Response) => {
? JSON.parse(row.tunnelConnections)
: [],
enableFileManager: !!row.enableFileManager,
statsConfig: row.statsConfig || undefined,
};
return (await resolveHostCredentials(baseHost)) || baseHost;
@@ -656,6 +658,7 @@ router.get(
? JSON.parse(host.tunnelConnections)
: [],
enableFileManager: !!host.enableFileManager,
statsConfig: host.statsConfig || undefined,
};
res.json((await resolveHostCredentials(result)) || result);