2025-06-01 12:25:33 -04:00
|
|
|
(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
|
2025-06-12 13:53:23 -04:00
|
|
|
("class" "w-full justify-start button {% if selected_channel == channel.id -%}lowered{% else %}camo{%- endif %}")
|
2025-06-01 12:25:33 -04:00
|
|
|
("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
|
2025-06-12 13:53:23 -04:00
|
|
|
("class" "big_icon {% if selected_channel == channel.id -%}lowered{% else %}camo{%- endif %}")
|
2025-06-01 12:25:33 -04:00
|
|
|
("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
|
2025-06-12 13:53:23 -04:00
|
|
|
("class" "lowered small")
|
2025-06-01 12:25:33 -04:00
|
|
|
("onclick" "add_member('{{ channel.id }}')")
|
|
|
|
(text "{{ icon \"user-plus\" }}")
|
|
|
|
(span
|
|
|
|
(text "{{ text \"chats:action.add_someone\" }}")))
|
|
|
|
(text "{%- endif %}")
|
|
|
|
(button
|
2025-06-12 13:53:23 -04:00
|
|
|
("class" "lowered small")
|
2025-06-01 12:25:33 -04:00
|
|
|
("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\" }}")))
|
2025-06-13 22:07:36 -04:00
|
|
|
(text "{% elif selected_community == 0 %}")
|
2025-06-01 12:25:33 -04:00
|
|
|
(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 %}"))
|