Update backend models, controllers, and session
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user