This commit is contained in:
Chris Oloff 2025-12-19 15:39:23 +02:00
parent 6f8870f9ad
commit cc7ee0817e

View file

@ -15,7 +15,7 @@ w42_state = panel.rx(None)
attach_w42_state(rx_var=w42_state, system_id=SYSTEM_ID, token=API_TOKEN) attach_w42_state(rx_var=w42_state, system_id=SYSTEM_ID, token=API_TOKEN)
def state_to_text(state: dict[str, Any]) -> str: def state_to_text(state: dict[str, Any]) -> str:
return f"W42 State:\n\n```\n{json.dumps(state, indent=2)}\n```\n\nReplace this with some awesome visuals" return f"Watt42 State:\n\n```\n{json.dumps(state, indent=2)}\n```\n\nReplace this with some awesome visuals"
state_as_text = panel.bind(state_to_text, w42_state) state_as_text = panel.bind(state_to_text, w42_state)
@ -31,7 +31,7 @@ here](https://source.c3.uber5.com/watt42-public/watt42_viewlib/src/branch/main/R
""" """
_ = panel.template.FastListTemplate( _ = panel.template.FastListTemplate(
title="Sample W42 App", title="Sample Watt42 App",
sidebar=[panel.pane.Markdown(sidebar_content, sizing_mode='stretch_width')], sidebar=[panel.pane.Markdown(sidebar_content, sizing_mode='stretch_width')],
main=[ main=[
state_pane, state_pane,