Commit Graph

6 Commits

Author SHA1 Message Date
Anders Kaseorg
b9e62c7af8 page_params: Split out state data for realm.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a second step, split
out the subset of fields that pertain to the entire realm.

Signed-off-by: Anders Kaseorg <[email protected]>
2024-02-15 10:22:52 -08:00
Anders Kaseorg
e96ede0ef6 page_params: Split out state data for current user.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a first step, split
out the subset of fields that pertain to the current user.

Signed-off-by: Anders Kaseorg <[email protected]>
2024-02-15 10:22:52 -08:00
Karl Stolley
9f00b513f7 compose_box: Improve structures around compose buttons. 2023-11-13 12:45:13 -08:00
Karl Stolley
383466eaff compose_box: Change 'audio' references to 'voice'. 2023-10-18 14:04:00 -07:00
Anders Kaseorg
833a15e121 compose: Move call button display functions to compose_call_ui.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-06 08:34:39 -07:00
Anders Kaseorg
6e725f0d17 compose: Move call link insertion to new compose_call_ui module.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-05 14:42:19 -07:00