Skip to content

Commit

Permalink
POC to hide panel settings if panel is not set as visible to simplify UI
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-github committed Mar 4, 2024
1 parent 087c13d commit 4afcf88
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 25 deletions.
30 changes: 29 additions & 1 deletion src/targets/Printer3D/Marlin/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"id": "sd",
"type": "boolean",
"label": "S190",
"value": false
"value": false,
"depend":[{"id":"showfilespanel", "value":true}]
},
{
"id": "sdlistcmd",
Expand All @@ -86,6 +87,10 @@
{
"connection_id": "SDConnection",
"value": "=='none'"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -99,6 +104,10 @@
{
"id": "sd",
"value": true
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -112,6 +121,10 @@
{
"id": "sd",
"value": true
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -124,6 +137,10 @@
{
"connection_id": "SDConnection",
"value": "!='none'"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -141,6 +158,10 @@
{
"connection_id": "SDConnection",
"value": "!='none'"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -158,6 +179,10 @@
{
"connection_id": "SDConnection",
"value": "!='none'"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -175,6 +200,9 @@
{
"connection_id": "SDConnection",
"value": "!='none'"
}, {
"id": "showfilespanel",
"value": true
}
]
}
Expand Down
18 changes: 17 additions & 1 deletion src/targets/Printer3D/Repetier/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@
"id": "sd",
"type": "boolean",
"label": "S190",
"value": false
"value": false,
"depend": [{
"id": "showfilespanel",
"value": true
}]
},
{
"id": "sdlistcmd",
Expand All @@ -87,6 +91,10 @@
{
"connection_id": "SDConnection",
"value": "=='none'"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -100,6 +108,10 @@
{
"id": "sd",
"value": true
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -113,6 +125,10 @@
{
"id": "sd",
"value": true
},
{
"id": "showfilespanel",
"value": true
}
]
}
Expand Down
59 changes: 54 additions & 5 deletions src/targets/Printer3D/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,21 @@
],

"files": [

{
"id": "filesfilter",
"type": "text",
"label": "S96",
"value": "g;G;gco;GCO;gcode;GCODE",
"help": "S97"
"help": "S97",
"depend":[{"id":"showfilespanel", "value":true}]
},
{
"id": "flashfs",
"type": "boolean",
"depend": [
{ "connection_id": "FlashFileSystem", "value": "!='none'" }
{ "connection_id": "FlashFileSystem", "value": "!='none'" },
{"id":"showfilespanel", "value":true}
],
"label": "S137",
"value": true
Expand All @@ -273,15 +276,19 @@
],
"depend": [
{ "connection_id": "Screen", "value": "=='none'" },
{ "connection_id": "FWTargetID", "value": "!='30'" }
{ "connection_id": "FWTargetID", "value": "!='30'" },
{ "id":"showfilespanel", "value":true}
]
},
{
"id": "tftsd",
"type": "boolean",
"label": "S188",
"value": false,
"depend": [{ "id": "tftfs", "notvalue": "none"}]
"depend": [{ "id": "tftfs", "notvalue": "none"}, {
"id": "showfilespanel",
"value": true
}]
},
{
"id": "tftbttsdlistcmd",
Expand All @@ -297,6 +304,9 @@
{
"id": "tftfs",
"value": "btt"
}, {
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -314,6 +324,10 @@
{
"id": "tftfs",
"value": "btt"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -331,6 +345,10 @@
{
"id": "tftfs",
"value": "btt"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -348,6 +366,10 @@
{
"id": "tftfs",
"value": "mks"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -365,6 +387,10 @@
{
"id": "tftfs",
"value": "mks"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -373,7 +399,10 @@
"type": "boolean",
"label": "S189",
"value": false,
"depend": [{ "id": "tftfs", "notvalue": "none"}]
"depend": [{ "id": "tftfs", "notvalue": "none"}, {
"id": "showfilespanel",
"value": true
}]
},
{
"id": "tftbttusblistcmd",
Expand All @@ -389,6 +418,10 @@
{
"id": "tftfs",
"value": "btt"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -406,6 +439,10 @@
{
"id": "tftfs",
"value": "mks"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -423,6 +460,10 @@
{
"id": "tftfs",
"value": "btt"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -440,6 +481,10 @@
{
"id": "tftfs",
"value": "btt"
},
{
"id": "showfilespanel",
"value": true
}
]
},
Expand All @@ -457,6 +502,10 @@
{
"id": "tftfs",
"value": "mks"
},
{
"id": "showfilespanel",
"value": true
}
]
}
Expand Down
46 changes: 28 additions & 18 deletions src/targets/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,33 @@
"label": "S63",
"value": true
},
{
"id": "openterminalonstart",
"type": "boolean",
"label": "S93",
"value": true
},
{
"id": "verbose",
"type": "boolean",
"label": "S76",
"value": true
},
{
"id": "autoscroll",
"type": "boolean",
"label": "S77",
"value": true
{"id": "terminalsettings",
"type": "group",
"label": "",
"depend":[{"id":"showterminalpanel", "value":true}],
"value": [
{
"id": "openterminalonstart",
"type": "boolean",
"label": "S93",
"value": true
},
{
"id": "verbose",
"type": "boolean",
"label": "S76",
"value": true
},
{
"id": "autoscroll",
"type": "boolean",
"label": "S77",
"value": true
}
]

}

],
"files": [
{
Expand All @@ -154,7 +163,8 @@
"id": "openfilesonstart",
"type": "boolean",
"label": "S93",
"value": true
"value": true,
"depend":[{"id":"showfilespanel", "value":true}]
}
],
"jog": [
Expand Down

0 comments on commit 4afcf88

Please sign in to comment.