[fix] Avoid char conflict with bind properties

This commit is contained in:
ljf 2023-09-02 22:47:02 +02:00
parent dcafac1913
commit 6f3b194944
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -172,7 +172,7 @@ for panel_name, panel in loaded_toml.items():
if bind == "settings" and param.get('type', 'string') == 'file': if bind == "settings" and param.get('type', 'string') == 'file':
bind = 'null' bind = 'null'
print(';'.join([ print('|'.join([
name, name,
param.get('type', 'string'), param.get('type', 'string'),
bind bind
@ -181,7 +181,7 @@ EOL
) )
for line in $lines; do for line in $lines; do
# Split line into short_setting, type and bind # Split line into short_setting, type and bind
IFS=';' read short_setting type bind <<<"$line" IFS='|' read short_setting type bind <<<"$line"
binds[${short_setting}]="$bind" binds[${short_setting}]="$bind"
types[${short_setting}]="$type" types[${short_setting}]="$type"
file_hash[${short_setting}]="" file_hash[${short_setting}]=""

View file

@ -345,14 +345,14 @@ class ConfigPanel:
"defaults": {"version": 1.0}, "defaults": {"version": 1.0},
}, },
"panels": { "panels": {
"properties": ["name", "services", "actions", "help"], "properties": ["name", "services", "actions", "help", "bind"],
"defaults": { "defaults": {
"services": [], "services": [],
"actions": {"apply": {"en": "Apply"}}, "actions": {"apply": {"en": "Apply"}},
}, },
}, },
"sections": { "sections": {
"properties": ["name", "services", "optional", "help", "visible"], "properties": ["name", "services", "optional", "help", "visible", "bind"],
"defaults": { "defaults": {
"name": "", "name": "",
"services": [], "services": [],