From f9cb8293f3292ace9d101a90c36b4f8cb05f5c83 Mon Sep 17 00:00:00 2001 From: LouisLam Date: Mon, 9 Aug 2021 01:58:56 +0800 Subject: [PATCH] improve a bit ux --- server/server.js | 16 ++++++++++------ src/layouts/Layout.vue | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/server/server.js b/server/server.js index 7f5b0de04..98fe97943 100644 --- a/server/server.js +++ b/server/server.js @@ -619,13 +619,17 @@ async function afterLogin(socket, user) { let monitorList = await sendMonitorList(socket) - for (let monitorID in monitorList) { - sendHeartbeatList(socket, monitorID); - sendImportantHeartbeatList(socket, monitorID); - Monitor.sendStats(io, monitorID, user.id) - } - sendNotificationList(socket) + + // Delay a bit, so that it let the main page to query the data first, since SQLite can process one sql at the same time only. + // For example, query the edit data first. + setTimeout(() => { + for (let monitorID in monitorList) { + sendHeartbeatList(socket, monitorID); + sendImportantHeartbeatList(socket, monitorID); + Monitor.sendStats(io, monitorID, user.id) + } + }, 500); } async function getMonitorJSONList(userID) { diff --git a/src/layouts/Layout.vue b/src/layouts/Layout.vue index 9607483eb..93ad065bc 100644 --- a/src/layouts/Layout.vue +++ b/src/layouts/Layout.vue @@ -143,6 +143,10 @@ export default { } } +main { + min-height: calc(100vh - 160px) +} + .title { font-weight: bold; }