mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 01:16:14 +00:00
Refactor tab creation for control interface
Fix https://github.com/flobz/psa_car_controller/issues/1232 Thanks to @Dirtylife. Tested and works for me.
This commit is contained in:
committed by
Florian BEZANNIER
parent
04244ac8ea
commit
1c118170f8
@@ -76,5 +76,17 @@ def get_control_tabs(config):
|
||||
if not config.offline:
|
||||
buttons_row.append(Switch(ABRP_SWITCH, car.vin, "Send data to ABRP", myp.abrp.enable_abrp,
|
||||
car.vin in config.myp.abrp.abrp_enable_vin).get_html())
|
||||
tabs.append(dbc.Tab(label=label, id="tab-" + car.vin, children=[dbc.Row(buttons_row), *el]))
|
||||
return dbc.Tabs(id="control-tabs", children=tabs)
|
||||
tabs.append(
|
||||
dbc.Tab(
|
||||
label=label,
|
||||
id="tab-" + car.vin,
|
||||
tab_id="tab-" + car.vin,
|
||||
children=[dbc.Row(buttons_row), *el],
|
||||
)
|
||||
)
|
||||
|
||||
return dbc.Tabs(
|
||||
id="control-tabs",
|
||||
active_tab="tab-" + config.myp.vehicles_list[0].vin,
|
||||
children=tabs,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user