diff --git a/web_interface/templates/v3/partials/plugin_config.html b/web_interface/templates/v3/partials/plugin_config.html index 52fa4727..8264645d 100644 --- a/web_interface/templates/v3/partials/plugin_config.html +++ b/web_interface/templates/v3/partials/plugin_config.html @@ -58,10 +58,115 @@ {% if field_type == 'integer' %}step="1"{% else %}step="any"{% endif %} class="form-input w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 bg-white text-black placeholder:text-gray-500"> - {# Array - check if it's a file upload widget #} + {# Array - check if it's an array of objects first, then file upload widget #} {% elif field_type == 'array' %} - {% set x_widget = prop.get('x-widget') or prop.get('x_widget') %} - {% if x_widget == 'file-upload' %} + {% set items_schema = prop.get('items') or {} %} + {% set is_array_of_objects = items_schema.get('type') == 'object' and items_schema.get('properties') %} + {% if is_array_of_objects %} + {# Array of objects widget (like custom_feeds with name, url, enabled, logo) #} + {% set item_properties = items_schema.get('properties', {}) %} + {% set max_items = prop.get('maxItems', 50) %} + {% set array_value = value if value is not none and value is iterable and value is not string else (prop.default if prop.default is defined and prop.default is iterable and prop.default is not string else []) %} + +
{{ prop_description }}
+ {% endif %} + + + {% elif prop_schema.get('type') == 'boolean' %} + {# Boolean checkbox #} + + {% else %} + {# Regular text/string input #} + + {% if prop_description %} +{{ prop_description }}
+ {% endif %} + + {% endif %} +