From c0e134981cb494f12c72fbbd3e5c4de513327520 Mon Sep 17 00:00:00 2001 From: Kostya Date: Tue, 13 Oct 2026 13:14:50 +0300 Subject: ui-fx: support running as one logged-in user of a server The shared UI assumed the whole market was local: it showed nothing until a file was loaded, let the user act as anyone in the list and offered to create events by hand. None of that holds for a client of a shared server. AppState and AppView now take an optional session user. When it is set: - the tabs show from the start, since other users' events are there whether or not we loaded a file ourselves; - the acting user is fixed, and the user list becomes a directory of the other users with their balance and role; - the buttons that create events are hidden, and the Users tab gets a Deposit Funds button with a small dialog; - loading a file skips the two-second pause Ex2 asked for. Without a session user everything behaves as before. Also keep the event's Trade and Close buttons from collapsing to an ellipsis when the description is long. --- .../market/guess/ui/desktop/app_view.fxml | 1 + .../ui/desktop/controllers/dialog_deposit.fxml | 46 ++++++++++++++++++++++ .../guess/ui/desktop/controllers/events_tab.fxml | 6 +-- .../guess/ui/desktop/controllers/users_tab.fxml | 3 +- 4 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_deposit.fxml (limited to 'ui-fx/src/main/resources/market/guess') diff --git a/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml b/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml index 855b787..3a34a7e 100644 --- a/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml +++ b/ui-fx/src/main/resources/market/guess/ui/desktop/app_view.fxml @@ -143,6 +143,7 @@ + diff --git a/ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_deposit.fxml b/ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_deposit.fxml new file mode 100644 index 0000000..8f7076d --- /dev/null +++ b/ui-fx/src/main/resources/market/guess/ui/desktop/controllers/dialog_deposit.fxml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +