(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 -%}lowered{% 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 -%}lowered{% 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" "lowered small") ("onclick" "add_member('{{ channel.id }}')") (text "{{ icon \"user-plus\" }}") (span (text "{{ text \"chats:action.add_someone\" }}"))) ; mute/unmute (button ("class" "lowered small {% if channel.id in user.channel_mutes -%} hidden {%- endif %}") ("ui_ident" "channel.mute:{{ channel.id }}") ("onclick" "mute_channel('{{ channel.id }}')") (icon (text "bell-off")) (span (str (text "chats:action.mute")))) (button ("class" "lowered small {% if not channel.id in user.channel_mutes -%} hidden {%- endif %}") ("ui_ident" "channel.unmute:{{ channel.id }}") ("onclick" "mute_channel('{{ channel.id }}', false)") (icon (text "bell-ring")) (span (str (text "chats:action.unmute")))) ; ... (text "{%- endif %}") (button ("class" "lowered 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 "{% elif selected_community == 0 %}") (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 %}"))