INNER CODE UNIT · Python
on_mount
antoniorodr/cronboard · src/cronboard/app.py:118
def on_mount(self) -> None:
"""Loads the theme and config, and mounts the CronTable widget."""
self.register_theme(everforest_dark_hard)
config: dict = self.load_config()
saved_theme: str = config.get("theme", "catppuccin-mocha")
self.theme: str = saved_theme
self.servers = None
self.settings_tab = None
self.local_table = CronTable(id="local-crontable", server_name="local")
self.content_container.mount(self.local_table)
self.local_table.display = True
self.set_focus(self.local_table)
self.tab_disabled = False
def load_config(self) -> dict:
"""Loads the config file.