|
@ -96,7 +96,7 @@ class Occupy(WLogic): |
|
|
else: |
|
|
else: |
|
|
b("Konec kola není stanoven") |
|
|
b("Konec kola není stanoven") |
|
|
|
|
|
|
|
|
def status(): |
|
|
def status(position="left"): |
|
|
members_counts = [0 for _ in teams] |
|
|
members_counts = [0 for _ in teams] |
|
|
occupied_counts = [0 for _ in teams] |
|
|
occupied_counts = [0 for _ in teams] |
|
|
|
|
|
|
|
@ -109,12 +109,14 @@ class Occupy(WLogic): |
|
|
members_counts[occupied_by_team] += len(members) |
|
|
members_counts[occupied_by_team] += len(members) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with b.div(_class="game_left_status button form-frame"): |
|
|
with b.div(_class=f"game_{position}_status button form-frame"): |
|
|
|
|
|
if position != "up": |
|
|
b.b("Kolo ", state.round) |
|
|
b.b("Kolo ", state.round) |
|
|
with b.p(): |
|
|
with b.p(): |
|
|
reaming_time(id="time_left") |
|
|
reaming_time(id="time_left") |
|
|
with b.p(): |
|
|
with b.p() if position == "left" else b.bucket(): |
|
|
for t, occupied_count, members_count in zip(teams, occupied_counts, members_counts): |
|
|
for t, occupied_count, members_count in zip(teams, occupied_counts, members_counts): |
|
|
|
|
|
with b.p() if position == "up" else b.bucket(): |
|
|
with b.line().span(_class=f"game_team_{t.team_id}"): |
|
|
with b.line().span(_class=f"game_team_{t.team_id}"): |
|
|
b.b("Tým ", t.print()) |
|
|
b.b("Tým ", t.print()) |
|
|
b.br() |
|
|
b.br() |
|
@ -124,6 +126,7 @@ class Occupy(WLogic): |
|
|
b.br() |
|
|
b.br() |
|
|
b("Vojáků: ", members_count) |
|
|
b("Vojáků: ", members_count) |
|
|
b.br() |
|
|
b.br() |
|
|
|
|
|
b.div(style="clear: both")("") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def table(): |
|
|
def table(): |
|
@ -188,12 +191,15 @@ class Occupy(WLogic): |
|
|
with b.p(): |
|
|
with b.p(): |
|
|
if team is not None: |
|
|
if team is not None: |
|
|
b.line().b(_class=f"game_team_{team.team_id}")(f"Pohled týmu {team.print()}") |
|
|
b.line().b(_class=f"game_team_{team.team_id}")(f"Pohled týmu {team.print()}") |
|
|
|
|
|
if not conff.show_data_only.data or conff.status.data == conff.status_up: |
|
|
with b.line().b(_class="pull-right"): |
|
|
with b.line().b(_class="pull-right"): |
|
|
reaming_time() |
|
|
reaming_time() |
|
|
|
|
|
if conff.status.data == conff.status_up: |
|
|
|
|
|
status("up") |
|
|
b.div(style="clear: both; margin-bottom: 1ex")("") |
|
|
b.div(style="clear: both; margin-bottom: 1ex")("") |
|
|
with b.div().div(style="text-align:center;", id="game_main"): |
|
|
with b.div().div(id="game_main"): |
|
|
if conff.status.data == conff.status_left: |
|
|
if conff.status.data == conff.status_left: |
|
|
status() |
|
|
status("left") |
|
|
table() |
|
|
table() |
|
|
if conff.clickable.data == conff.clickable_right: |
|
|
if conff.clickable.data == conff.clickable_right: |
|
|
clickable() |
|
|
clickable() |
|
@ -224,8 +230,8 @@ class Occupy(WLogic): |
|
|
main_w = table_w + left_w |
|
|
main_w = table_w + left_w |
|
|
if conff.clickable.data == conff.clickable_right: |
|
|
if conff.clickable.data == conff.clickable_right: |
|
|
right_w = 400 |
|
|
right_w = 400 |
|
|
main_w += right_w |
|
|
main_w += right_w + 40 |
|
|
style += f".game_tab {{\n width: {right_w}px\n}}\n" |
|
|
style += f".game_tab {{\n width: {right_w}px; margin-left: 10pt; \n}}\n" |
|
|
if main_w > page_w: |
|
|
if main_w > page_w: |
|
|
margin_cmd = f"margin-left: {(page_w-main_w) / 2}px;" |
|
|
margin_cmd = f"margin-left: {(page_w-main_w) / 2}px;" |
|
|
if conff.refresh.data == conff.refresh_meta: |
|
|
if conff.refresh.data == conff.refresh_meta: |
|
|