From 1937a1e512bb79956ec637e6b9e3d87cef89375a Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 18 Oct 2026 22:48:15 -0400 Subject: [PATCH] Say why a sign in was refused when the account can't be used right now. Co-Authored-By: Claude Sonnet 5.5 --- components/config/SigninScene.bs | 11 +++++++ components/config/SigninScene.xml | 2 +- components/quickConnect/QuickConnect.bs | 9 ++++-- locale/en_US/translations.ts | 5 +++ source/api/userauth.bs | 41 +++++++++++++++---------- test/server-compatibility.bs | 1 + test/server-compatibility.mjs | 3 +- test/sign-in-refused.bs | 21 +++++++++++++ 8 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 test/sign-in-refused.bs diff --git a/components/config/SigninScene.bs b/components/config/SigninScene.bs index 3a248528a..a104a71fb 100644 --- a/components/config/SigninScene.bs +++ b/components/config/SigninScene.bs @@ -191,6 +191,11 @@ sub onAlertChange() errorMessage = m.top.findNode("errorMessage") errorMessage.text = m.top.alert + + ' Some messages run to several lines, so the box grows to hold them instead of covering the first. + textHeight = errorMessage.boundingRect().height + m.errorContainer.height = textHeight + 26 + if m.errorContainer.height < 60 then m.errorContainer.height = 60 end sub sub onUserChange() @@ -282,6 +287,12 @@ sub onQuickConnectAuthenticated() if authenticated >= 0 then return + if authenticated = -2 + m.top.alert = signInRefusedMessage() + hideQuickConnect() + return + end if + ' A poll that can never succeed looks the same as one still waiting to be approved, so ' the wait is bounded rather than left running until the viewer walks away m.quickConnectAttempts = m.quickConnectAttempts + 1 diff --git a/components/config/SigninScene.xml b/components/config/SigninScene.xml index 46ae31486..c1419c51f 100644 --- a/components/config/SigninScene.xml +++ b/components/config/SigninScene.xml @@ -25,7 +25,7 @@ uri="pkg:/images/surface.9.png"> - +