Files
Mangarr/templates/components/Toolbar.html.twig
Jérémy Guillot 586ebdb126 Added:
- AdditionnalData for buttons
- refresh manga metadata and chapters
2024-07-05 19:03:16 +02:00

49 lines
2.0 KiB
Twig

{# templates/components/Toolbar.html.twig #}
<div class="bg-gray-800 p-3 min-h-14" {{ stimulus_controller('toolbar') }}>
<div class="flex flex-row items-center justify-between">
<div class="flex mr-2 items-center">
{% for element in toolbar.leftGroup %}
{% if element.type == 'button' %}
<twig:ToolBarButton
icon="{{ element.icon }}"
text="{{ element.text }}"
action="{{ element.action }}"
data="{{ element.additionalProperties.data }}"
/>
{% elseif element.type == 'divider' %}
<twig:Divider/>
{% elseif element.type == 'dropdown' %}
<twig:DropdownMenu
icon="{{ element.icon }}"
text="{{ element.text }}"
action="{{ element.action }}"
items="{{ element.additionalProperties.items }}"
/>
{% endif %}
{% endfor %}
</div>
<div class="flex mr-2 items-center">
{% for element in toolbar.rightGroup %}
{% if element.type == 'button' %}
<twig:ToolBarButton
icon="{{ element.icon }}"
text="{{ element.text }}"
action="{{ element.action }}"
data="{{ element.additionalProperties.data }}"
/>
{% elseif element.type == 'divider' %}
<twig:Divider/>
{% elseif element.type == 'dropdown' %}
<twig:DropdownMenu
icon="{{ element.icon }}"
text="{{ element.text }}"
action="{{ element.action }}"
items="{{ element.additionalProperties.items }}"
/>
{% endif %}
{% endfor %}
</div>
</div>
</div>