mirror of
https://github.com/gmbrax/Pilgrim.git
synced 2026-11-09 17:20:17 +00:00
Add the tomli library and create the config_manager.py to manage the configuration file and also add the dependency injection on the ui.py via the Application class
This commit is contained in:
parent
0adb230dd7
commit
3843be6e13
@@ -9,6 +9,7 @@ from pilgrim.service.servicemanager import ServiceManager
|
||||
from pilgrim.ui.screens.about_screen import AboutScreen
|
||||
from pilgrim.ui.screens.diary_list_screen import DiaryListScreen
|
||||
from pilgrim.ui.screens.edit_entry_screen import EditEntryScreen
|
||||
from pilgrim.utils import ConfigManager
|
||||
|
||||
CSS_FILE_PATH = Path(__file__).parent / "styles" / "pilgrim.css"
|
||||
|
||||
@@ -16,9 +17,10 @@ CSS_FILE_PATH = Path(__file__).parent / "styles" / "pilgrim.css"
|
||||
class UIApp(App):
|
||||
CSS_PATH = CSS_FILE_PATH
|
||||
|
||||
def __init__(self,service_manager: ServiceManager, **kwargs):
|
||||
def __init__(self,service_manager: ServiceManager, config_manager: ConfigManager, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.service_manager = service_manager
|
||||
self.config_manager = config_manager
|
||||
|
||||
|
||||
def on_mount(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user