From a8bc9dce528abb6340315f7daa61ad76be4a8739 Mon Sep 17 00:00:00 2001 From: Kostya Date: Tue, 13 Oct 2026 10:42:15 +0300 Subject: ui-client: add desktop client that talks to the server New module for the Ex3 desktop app. It reuses the ui-fx views and depends on the api only, never on the engine. ServerClient owns the OkHttp session and the last snapshot pulled from /api/sync. RemoteCatalogContext, RemoteGuessMarketContext and RemoteAccountContext implement the api interfaces on top of it: reads are answered from the snapshot, so AppState never waits on the network, and writes go over HTTP and pull a fresh snapshot before returning. A daemon thread polls once a second with blocking calls and refreshes AppState through Platform.runLater only when the server's version moved. AppState reselects the event and user by id, so a refresh keeps the selection. Server and user name come from --server= and --user= until the login screen exists. --- tools/_util.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/_util.sh b/tools/_util.sh index 7351e62..65cba8c 100644 --- a/tools/_util.sh +++ b/tools/_util.sh @@ -5,7 +5,7 @@ case "$(uname -s)" in *) SEP=":" ;; esac -MODULES="api service server ui-fx ui-console ui-desktop" +MODULES="api service server ui-fx ui-console ui-desktop ui-client" DEPS_api="" DEPS_service="api" @@ -13,12 +13,14 @@ DEPS_server="api service" DEPS_ui_console="api service" DEPS_ui_fx="api" DEPS_ui_desktop="api service ui-fx" +DEPS_ui_client="api ui-fx" -RUNTIME_LIB_DIRS="pico jaxb gson openjfx" +RUNTIME_LIB_DIRS="pico jaxb gson openjfx okhttp" -EXECUTABLES="ui-console ui-desktop" +EXECUTABLES="ui-console ui-desktop ui-client" MAINCLASS_ui_console="market.guess.ui.console.App" MAINCLASS_ui_desktop="market.guess.ui.desktop.Launcher" +MAINCLASS_ui_client="market.guess.ui.client.Launcher" JAVA_HOME_DIR=$(java -XshowSettings:properties -version 2>&1 | tr -d '\r' | sed -n 's/^ *java\.home = //p') case "$(uname -s)" in -- cgit v1.2.3