From 5ab5ed1454b059c21a0dda070a8a02fdb67d7a16 Mon Sep 17 00:00:00 2001 From: PhuocNTB Date: Mon, 13 Jul 2026 14:50:57 +0700 Subject: [PATCH] thu nghiem --- client/app.go | 80 ++++++++-- client/client.exe | Bin 10637312 -> 12405760 bytes client/frontend/index.html | 1 + client/frontend/src/app.css | 2 + client/frontend/src/main.js | 17 +- client/main.go | 3 +- management/src/components/ExamGridProctor.tsx | 2 +- .../src/components/ProctorStreamPanels.tsx | 2 +- server/internal/websocket/websocket.go | 148 ++++++++++++------ 9 files changed, 187 insertions(+), 68 deletions(-) diff --git a/client/app.go b/client/app.go index cd960f8..66e2ce1 100644 --- a/client/app.go +++ b/client/app.go @@ -142,8 +142,10 @@ type App struct { unsyncedOff int lastSyncTime time.Time isStreamingSc bool + scIntervalMs int streamScStop chan struct{} isStreamingCam bool + camIntervalMs int streamCamStop chan struct{} statusMsg string expectingLogin bool @@ -229,8 +231,16 @@ func NewApp() *App { } } +func (a *App) forceLightTheme() { + if a.ctx == nil { + return + } + runtime.WindowSetLightTheme(a.ctx) +} + func (a *App) startup(ctx context.Context) { a.ctx = ctx + a.forceLightTheme() a.loadSession() a.loadStats() @@ -644,6 +654,7 @@ func (a *App) startLocalServer() { a.mu.Lock() a.localBrowserActive = true a.mu.Unlock() + a.forceLightTheme() go func() { guard.SuppressFor(3 * time.Second) runtime.WindowExecJS(a.ctx, fmt.Sprintf("window.location.href = %q", raw)) @@ -662,8 +673,10 @@ const examViewHTML = ` + %s