Skip to content

Commit

Permalink
Fix: non-alas mod compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Air111 committed May 17, 2024
1 parent 52a0195 commit 2d15fb6
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions module/webui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,21 +426,31 @@ def alas_overview(self) -> None:
log = RichLog("log")

with use_scope("logs"):
put_scope("log-bar", [
put_scope("log-title", [
put_text(t("Gui.Overview.Log")).style("font-size: 1.25rem; margin: auto .5rem auto;"),
put_scope("log-title-btns", [
put_scope("log_scroll_btn"),
if self.ALAS_STORED:
put_scope("log-bar", [
put_scope("log-title", [
put_text(t("Gui.Overview.Log")).style("font-size: 1.25rem; margin: auto .5rem auto;"),
put_scope("log-title-btns", [
put_scope("log_scroll_btn"),
]),
]),
]),
put_html('<hr class="hr-group">'),
put_scope("dashboard", [
# Empty dashboard, values will be updated in alas_update_overview_task()
put_scope(f"dashboard-row-{arg}", [])
for arg in self.ALAS_STORED.keys() if deep_get(self.ALAS_STORED, keys=[arg, "order"], default=0)
# Empty content to left-align last row
] + [put_html("<i></i>")] * min(len(self.ALAS_STORED), 4))
])
put_html('<hr class="hr-group">'),
put_scope("dashboard", [
# Empty dashboard, values will be updated in alas_update_overview_task()
put_scope(f"dashboard-row-{arg}", [])
for arg in self.ALAS_STORED.keys() if deep_get(self.ALAS_STORED, keys=[arg, "order"], default=0)
# Empty content to left-align last row
] + [put_html("<i></i>")] * min(len(self.ALAS_STORED), 4))
])
else:
put_scope("log-bar", [
put_scope("log-title", [
put_text(t("Gui.Overview.Log")).style("font-size: 1.25rem; margin: auto .5rem auto;"),
put_scope("log-title-btns", [
put_scope("log_scroll_btn"),
]),
])
]).style("height: auto;")
put_scope("log", [put_html("")])

log.console.width = log.get_width()
Expand Down

0 comments on commit 2d15fb6

Please sign in to comment.