Add presets system and convert back to Flask

- Convert from Microdot back to Flask
- Add presets system with CRUD operations
- Store presets in presets.json file
- Replace patterns section with presets grid
- Add preset editor with full configuration
- Add collapse/expand functionality to left panel
- Always show on/off presets in presets list
- Highlight active preset matching current tab settings
- Add 'Create from Current' button in preset editor
This commit is contained in:
2026-01-08 21:45:55 +13:00
parent ce3b9f4ea5
commit 90be198483
10 changed files with 1758 additions and 71 deletions

View File

@@ -1,12 +1,16 @@
{
"tab_password": "",
"color_palette": [
"#c12525",
"#246dcc"
],
"lights": {
"test": {
"names": [
"test"
],
"settings": {
"pattern": "transition",
"pattern": "pulse",
"brightness": 127,
"colors": [
"#000000"
@@ -49,10 +53,94 @@
},
"transition": {
"colors": [
"#c12525",
"#246dcc"
"#000000"
],
"delay": 1321,
"delay": 100,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10
},
"blink": {
"colors": [
"#12b533"
],
"delay": 100,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10
},
"circle": {
"colors": [
"#9d3434",
"#cb5d5d"
],
"delay": 100,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10
},
"pulse": {
"colors": [
"#9f1d1d",
"#176d2d",
"#50309c"
],
"delay": 300,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10
}
}
}
},
"test2": {
"names": [
"test"
],
"settings": {
"pattern": "pulse",
"brightness": 127,
"colors": [
"#000000"
],
"delay": 100,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10,
"patterns": {
"blink": {
"colors": [
"#12b533"
],
"delay": 100,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10
},
"circle": {
"colors": [
"#9d3434",
"#cb5d5d"
],
"delay": 100,
"n1": 10,
"n2": 10,
"n3": 10,
"n4": 10
},
"pulse": {
"colors": [
"#9f1d1d",
"#176d2d",
"#50309c"
],
"delay": 300,
"n1": 10,
"n2": 10,
"n3": 10,
@@ -63,10 +151,7 @@
}
},
"tab_order": [
"test"
],
"color_palette": [
"#c12525",
"#246dcc"
"test",
"test2"
]
}