@@ -344,7 +344,6 @@ def create_board_view(background_color: str, is_global: bool):
344344 build_board (container , tile_buttons , toggle_tile )
345345 board_views ["home" ] = (container , tile_buttons )
346346 # Add timers for synchronizing the global board.
347- ui .timer (0.1 , sync_board_state )
348347 ui .timer (1 , check_phrases_file_change )
349348 global seed_label
350349 with ui .row ().classes ("w-full mt-4 items-center justify-center gap-4" ):
@@ -359,15 +358,16 @@ def create_board_view(background_color: str, is_global: bool):
359358 local_tile_buttons = {}
360359 build_board (container , local_tile_buttons , toggle_tile )
361360 board_views ["stream" ] = (container , local_tile_buttons )
362- ui .timer (0.1 , sync_board_state )
363361
364362@ui .page ("/" )
365363def home_page ():
366364 create_board_view (HOME_BG_COLOR , True )
365+ ui .timer (0.1 , sync_board_state )
367366
368367@ui .page ("/stream" )
369368def stream_page ():
370369 create_board_view (STREAM_BG_COLOR , False )
370+ ui .timer (0.1 , sync_board_state )
371371
372372def setup_head (background_color : str ):
373373 """
@@ -479,7 +479,7 @@ def build_board(parent, tile_buttons_dict: dict, on_tile_click):
479479 lines = split_phrase_into_lines (phrase )
480480 line_count = len (lines )
481481 for line in lines :
482- with ui .row ().classes ("w-full" ):
482+ with ui .row ().classes ("w-full items-center justify-center " ):
483483 base_class = LABEL_SMALL_CLASSES if len (line ) <= 3 else LABEL_CLASSES
484484 lbl = ui .label (line ).classes (base_class ).style (get_line_style_for_lines (line_count , default_text_color ))
485485 labels_list .append ({
0 commit comments