(text "{%- import \"components.html\" as components -%}") (turbo-frame ("id" "channels_list_frame") (div ("class" "channels_list_half flex flex-col gap-2 {% if selected_community != 0 or selected_channel == 0%}no_members{%- endif -%}") (text "{% for channel in channels %}") (div ("class" "flex flex-row gap-1") (a ("class" "w-full justify-start button {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}") ("href" "/chats/{{ selected_community }}/{{ channel.id }}") ("data-turbo" "{{ selected_community == '0' }}") (text "{{ icon \"rss\" }}") (b ("class" "name shortest") (text "{{ channel.title }}"))) (div ("class" "dropdown") (button ("class" "big_icon {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}") ("onclick" "trigger('atto::hooks::dropdown', [event])") ("exclude" "dropdown") ("style" "width: 32px") (text "{{ icon \"ellipsis\" }}")) (div ("class" "inner") (text "{% if user.id == channel.owner -%} {% if selected_community == 0 %}") (button ("class" "quaternary small") ("onclick" "add_member('{{ channel.id }}')") (text "{{ icon \"user-plus\" }}") (span (text "{{ text \"chats:action.add_someone\" }}"))) (text "{%- endif %}") (button ("class" "quaternary small") ("onclick" "update_channel_title('{{ channel.id }}')") (text "{{ icon \"pencil\" }}") (span (text "{{ text \"chats:action.rename\" }}"))) (button ("onclick" "delete_channel('{{ channel.id }}')") ("class" "red") (text "{{ icon \"trash\" }}") (span (text "{{ text \"general:action.delete\" }}"))) (text "{% else %}") (button ("onclick" "kick_member('{{ channel.id }}', '{{ user.id }}')") ("class" "red") (text "{{ icon \"door-open\" }}") (span (text "{{ text \"chats:action.leave\" }}"))) (text "{%- endif %}")))) (text "{% endfor %}")) (text "{% if selected_community == 0 and selected_channel -%}") (div ("class" "members_list_half flex flex-col gap-2") (text "{% for member in members %} {{ components::user_plate(user=member, show_kick=user.id == channel.owner) }} {% endfor %}")) (text "{%- endif %}"))