fix: show viewing mode for all states
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 33s
CI / test (3.11) (pull_request) Canceled after 1m16s
CI / test (3.12) (pull_request) Canceled after 1m13s
CI / test (3.13) (pull_request) Canceled after 1m11s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Canceled after 1m8s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Canceled after 1m6s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 1m3s
CI / test-with-coverage (pull_request) Canceled after 1m1s
CI / coverage-analysis (pull_request) Canceled after 0s

This commit is contained in:
2026-08-12 15:40:07 +02:00
parent 63ea060fb9
commit 454222b91a
+6 -14
View File
@@ -108,7 +108,11 @@ def build_busy_overlay_style(
tell_state: TellStateModel | None,
session_state: SessionsStateEnum | None = None,
) -> BusyOverlayStyle | None:
if session_state == SessionsStateEnum.Vacant:
if session_state == {
SessionsStateEnum.OwnedByElse,
SessionsStateEnum.PendingYouToElse,
SessionsStateEnum.Vacant,
}:
return BusyOverlayStyle(
text="In viewing mode",
badge_bg=BUSY_YELLOW,
@@ -117,20 +121,8 @@ def build_busy_overlay_style(
overlay_border=qcolor(BUSY_YELLOW_BORDER, 235),
overlay_text=qcolor(WHITE),
accent_dot=BUSY_YELLOW_DOT,
subtext="Click here to grab baton if need to interact with GUI",
subtext="Click here to grab the baton if you need to interact with GUI",
)
if session_state in {SessionsStateEnum.OwnedByElse, SessionsStateEnum.PendingYouToElse}:
return BusyOverlayStyle(
text="GUEST MODE",
badge_bg=BUSY_PURPLE,
badge_fg=WHITE,
overlay_fill=qcolor(BUSY_PURPLE, 190),
overlay_border=qcolor(BUSY_PURPLE_BORDER, 230),
overlay_text=qcolor(WHITE),
accent_dot=BUSY_PURPLE_DOT,
)
if not is_busy:
return None