{# Saved views bar, drawn above a resource table. vars: items (ViewItem list), active, all_active, all_url, all_match, can_share, default, full, resource (slug), replace_url, redirect_url, csrf_token, action(*parts) -> url #} {% import "tungsten/components/ui.html" as ui %} {% set chip = 'inline-flex shrink-0 items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium ring-1 transition' %} {% set chip_on = 'bg-white text-primary-600 ring-primary-500 dark:bg-white/5 dark:text-primary-400' %} {% set chip_off = 'bg-white text-gray-600 ring-gray-950/10 hover:text-gray-950 dark:bg-white/5 dark:text-gray-300 dark:ring-white/10 dark:hover:text-white' %} {% if redirect_url %}{% endif %}
{{ icon('bookmark', 'h-4 w-4') }}{{ __('Saved views') }} {{ icon('list', 'h-4 w-4') }}{{ __('All') }} {% for v in items %}
{% if v.icon %}{{ icon(v.icon, 'h-4 w-4') }}{% elif v.color != 'gray' %}{% endif %} {{ v.name }} {% if v.shared %}{{ icon('users', 'h-3.5 w-3.5 text-gray-400') }}{% endif %} {% if v.is_default %}{{ icon('star', 'h-3.5 w-3.5 text-warning-500') }}{% endif %} {% call(part) ui.dropdown(width='w-64') %} {% if part == 'trigger' %} {% else %}
{% if v.editable %}
{% if can_share %} {% elif v.shared %}{% endif %}
{% elif v.preset %}

{{ __('A ready view from the app.') }}

{% else %}

{{ __('Shared by a teammate.') }}

{% endif %} {% endif %} {% endcall %}
{% endfor %} {% if not full %} {% endif %} {# ------------------------------------------------------------ save dialog #}