Update backend models, controllers, and session

This commit is contained in:
2026-01-16 22:31:24 +13:00
parent d41faddfca
commit 9c43a0a22b
16 changed files with 916 additions and 64 deletions

View File

@@ -4,13 +4,18 @@ class Profile(Model):
def __init__(self):
super().__init__()
def create(self, name=""):
def create(self, name="", profile_type="tabs"):
"""
Create a new profile.
profile_type: "tabs" or "scenes" (ignoring scenes for now)
"""
next_id = self.get_next_id()
self[next_id] = {
"name": name,
"tabs": {},
"palette": [],
"tab_order": []
"type": profile_type, # "tabs" or "scenes"
"tabs": [], # Array of tab IDs
"scenes": [], # Array of scene IDs (for future use)
"palette": []
}
self.save()
return next_id