Adding workflow management

I
This commit is contained in:
2025-07-01 22:07:12 +02:00
parent 9e1133c7fb
commit 4b06a0fe9b
17 changed files with 303 additions and 4 deletions

View File

@@ -34,3 +34,20 @@ class BaseComponent:
@staticmethod
def create_component_id(session):
pass
class BaseComponentSingleton(BaseComponent):
"""
Base class for components that will have a single instance per user
"""
COMPONENT_INSTANCE_ID = None
def __init__(self, session, _id=None, settings_manager=None, tabs_manager=None, **kwargs):
super().__init__(session, _id, **kwargs)
self._settings_manager = settings_manager
self.tabs_manager = tabs_manager
@classmethod
def create_component_id(cls, session):
return f"{cls.COMPONENT_INSTANCE_ID}{session['user_id']}"