add: forum posts ui
This commit is contained in:
parent
ef029c59b3
commit
2be87c397d
90 changed files with 1459 additions and 1299 deletions
|
@ -45,30 +45,30 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(article
|
||||
(div
|
||||
("class" "content_container flex flex-col gap-4")
|
||||
("class" "content_container flex flex_col gap_4")
|
||||
(text "{{ components::community_banner(id=community.id, community=community) }}")
|
||||
(div
|
||||
("class" "w-full flex gap-4 flex-collapse")
|
||||
("class" "w_full flex gap_4 flex_collapse")
|
||||
(div
|
||||
("class" "lhs flex flex-col gap-2 sm:w-full")
|
||||
("class" "lhs flex flex_col gap_2 sm:w_full")
|
||||
("style" "width: 22rem; min-width: 22rem")
|
||||
(div
|
||||
("class" "card-nest w-full")
|
||||
("class" "card_nest w_full")
|
||||
(div
|
||||
("class" "card flex gap-2")
|
||||
("class" "card flex gap_2")
|
||||
("id" "community_avatar_and_name")
|
||||
(text "{{ components::community_avatar(id=community.id, community=community, size=\"72px\") }}")
|
||||
(div
|
||||
("class" "flex flex-col")
|
||||
("class" "flex flex_col")
|
||||
(div
|
||||
("class" "flex gap-2 items-center")
|
||||
("class" "flex gap_2 items_center")
|
||||
(h3
|
||||
("id" "title")
|
||||
("class" "title name shorter flex gap-2")
|
||||
("class" "title name shorter flex gap_2")
|
||||
(text "{% if community.context.display_name -%} {{ community.context.display_name }} {% else %} {{ community.title }} {%- endif %} {% if community.context.is_nsfw -%}")
|
||||
(span
|
||||
("title" "NSFW community")
|
||||
("class" "flex items-center")
|
||||
("class" "flex items_center")
|
||||
("style" "color: var(--color-primary)")
|
||||
(text "{{ icon \"square-asterisk\" }}"))
|
||||
(text "{%- endif %}")))
|
||||
|
@ -78,12 +78,12 @@
|
|||
(text "{{ components::community_actions(community=community) }}"))
|
||||
(text "{{ components::community_info(community=community) }}"))
|
||||
(div
|
||||
("class" "rhs w-full")
|
||||
("class" "rhs w_full")
|
||||
(text "{% if can_read -%} {% block content %}{% endblock %} {% else %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"frown\" }}")
|
||||
(b
|
||||
(text "{{ text \"communities:label.not_allowed_to_read\" }}")))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
("class" "flex flex_col gap_2")
|
||||
(text "{% if drafts|length > 0 -%}")
|
||||
(div
|
||||
("class" "pillmenu")
|
||||
|
@ -23,12 +23,12 @@
|
|||
(text "{{ text \"communities:label.drafts\" }}"))))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("data-tab" "create")
|
||||
(div
|
||||
("class" "card small flex items-center justify-between gap-2")
|
||||
("class" "card small flex items_center justify_between gap_2")
|
||||
(span
|
||||
("class" "flex items-center gap-2")
|
||||
("class" "flex items_center gap_2")
|
||||
(text "{{ icon \"pen\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.create_post\" }}")))
|
||||
|
@ -39,19 +39,19 @@
|
|||
(span
|
||||
(text "{{ text \"dialog:action.cancel\" }}"))))
|
||||
(div
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
("class" "card lowered flex flex_col gap_2")
|
||||
(text "{% if draft -%}")
|
||||
(div
|
||||
("class" "card secondary w-full flex items-center justify-between gap-2 small")
|
||||
("class" "card secondary w_full flex items_center justify_between gap_2 small")
|
||||
(a
|
||||
("class" "flex items-center gap-2 flush")
|
||||
("class" "flex items_center gap_2 flush")
|
||||
("href" "#/drafts")
|
||||
(text "{{ icon \"notepad-text-dashed\" }}")
|
||||
(span
|
||||
("class" "date")
|
||||
(text "{{ draft.created }}")))
|
||||
(div
|
||||
("class" "flex gap-2")
|
||||
("class" "flex gap_2")
|
||||
(a
|
||||
("href" "?")
|
||||
("class" "button lowered small")
|
||||
|
@ -66,9 +66,9 @@
|
|||
(text "{{ text \"general:action.delete\" }}")))))
|
||||
(text "{%- endif %} {% if quoting -%}")
|
||||
(div
|
||||
("class" "card secondary w-full flex items-center justify-between gap-2 small")
|
||||
("class" "card secondary w_full flex items_center justify_between gap_2 small")
|
||||
(a
|
||||
("class" "flex items-center gap-2 flush")
|
||||
("class" "flex items_center gap_2 flush")
|
||||
("href" "/post/{{ quoting[1].id }}")
|
||||
(text "{{ icon \"quote\" }}")
|
||||
(span
|
||||
|
@ -81,9 +81,9 @@
|
|||
(text "{{ text \"dialog:action.cancel\" }}"))))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex flex-row gap-2 items-center")
|
||||
("class" "card small flex flex_row gap_2 items_center")
|
||||
(text "{{ components::avatar(username=user.id, size=\"32px\", selector_type=\"id\") }}")
|
||||
(select
|
||||
("id" "community_to_post_to")
|
||||
|
@ -106,11 +106,11 @@
|
|||
(text "{{ stack.name }} (circle)"))
|
||||
(text "{% endfor %}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("id" "create_form")
|
||||
("onsubmit" "create_post_from_form(event)")
|
||||
(div
|
||||
("class" "flex flex-col gap-1 hidden")
|
||||
("class" "flex flex_col gap_1 hidden")
|
||||
("id" "title_field")
|
||||
(label
|
||||
("for" "content")
|
||||
|
@ -123,7 +123,7 @@
|
|||
("minlength" "2")
|
||||
("maxlength" "128")))
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "content")
|
||||
(text "{{ text \"communities:label.content\" }}"))
|
||||
|
@ -137,12 +137,12 @@
|
|||
(text "{% if draft -%}{{ draft.content }}{%- endif %}")))
|
||||
(div
|
||||
("id" "files_list")
|
||||
("class" "flex gap-2 flex-wrap"))
|
||||
("class" "flex gap_2 flex_wrap"))
|
||||
(div
|
||||
("class" "flex justify-between flex-collapse gap-2")
|
||||
("class" "flex justify_between flex_collapse gap_2")
|
||||
(text "{{ components::create_post_options() }}")
|
||||
(div
|
||||
("class" "flex gap-2")
|
||||
("class" "flex gap_2")
|
||||
(text "{% if not quoting -%} {% if draft -%}")
|
||||
(button
|
||||
("class" "secondary small square")
|
||||
|
@ -351,20 +351,20 @@
|
|||
(text "{%- endif %}")))
|
||||
(text "{% if drafts|length > 0 -%}")
|
||||
(div
|
||||
("class" "card-nest lowered hidden")
|
||||
("class" "card_nest lowered hidden")
|
||||
("data-tab" "drafts")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"notepad-text-dashed\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.drafts\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
(text "{{ components::supporter_ad(body=\"Become a supporter to save infinite post drafts!\") }} {% for draft in drafts %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex flex-col gap-2")
|
||||
("class" "card small flex flex_col gap_2")
|
||||
(span
|
||||
("class" "no_p_margin")
|
||||
(text "{{ draft.content|markdown|safe }}"))
|
||||
|
@ -372,7 +372,7 @@
|
|||
("class" "fade date")
|
||||
(text "{{ draft.created }}")))
|
||||
(div
|
||||
("class" "card flex gap-2 secondary")
|
||||
("class" "card flex gap_2 secondary")
|
||||
(a
|
||||
("href" "?from_draft={{ draft.id }}")
|
||||
("class" "button small")
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
(text "{% import \"components.html\" as components %} {% extends \"communities/base.html\" %} {% block content %}")
|
||||
(div
|
||||
("class" "flex flex-col gap-4 w-full")
|
||||
("class" "flex flex_col gap_4 w_full")
|
||||
(text "{{ macros::community_nav(community=community, selected=\"posts\") }} {% if pinned|length != 0 %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex gap-2 items-center")
|
||||
("class" "card small flex gap_2 items_center")
|
||||
(text "{{ icon \"pin\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.pinned\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(text "{% for post in pinned %} {% if post[0].context.repost and post[0].context.repost.reposting -%} {{ components::repost(repost=post[2], post=post[0], owner=post[1], secondary=true, show_community=false, can_manage_post=can_manage_posts) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false, can_manage_post=can_manage_posts, poll=post[4]) }} {%- endif %} {% endfor %}")))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex gap-2 items-center")
|
||||
("class" "card small flex gap_2 items_center")
|
||||
(text "{{ icon \"newspaper\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.posts\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(text "{% for post in feed %} {% if post[0].context.repost and post[0].context.repost.reposting -%} {{ components::repost(repost=post[2], post=post[0], owner=post[1], secondary=true, show_community=false, can_manage_post=can_manage_posts) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[3], secondary=true, show_community=false, can_manage_post=can_manage_posts, poll=post[4]) }} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=feed|length) }}"))))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"communities\") }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
("class" "flex flex_col gap_2")
|
||||
(text "{% if user -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ text \"communities:label.create_new\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("onsubmit" "create_community_from_form(event)")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "title")
|
||||
(text "{{ text \"communities:label.name\" }}"))
|
||||
|
@ -28,21 +28,31 @@
|
|||
("required" "")
|
||||
("minlength" "2")
|
||||
("maxlength" "32")))
|
||||
(label
|
||||
("for" "is_forum")
|
||||
("class" "flex items_center gap_2")
|
||||
(input
|
||||
("type" "checkbox")
|
||||
("id" "is_forum")
|
||||
("name" "is_forum")
|
||||
("class" "w_content"))
|
||||
(span
|
||||
(text "Is forum")))
|
||||
(button
|
||||
(text "{{ text \"communities:action.create\" }}"))))
|
||||
(text "{% if list|length >= 4 -%} {{ components::supporter_ad(body=\"Become a supporter to create up to 10 communities!\") }} {%- endif %} {%- endif %}")
|
||||
(div
|
||||
("class" "card-nest w-full")
|
||||
("class" "card_nest w_full")
|
||||
(div
|
||||
("class" "card small flex items-center justify-between gap-2")
|
||||
("class" "card small flex items_center justify_between gap_2")
|
||||
(div
|
||||
("class" "flex items-center gap-2")
|
||||
("class" "flex items_center gap_2")
|
||||
(text "{{ icon \"award\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.my_communities\" }}")))
|
||||
|
||||
(div
|
||||
("class" "flex items-center gap-2")
|
||||
("class" "flex items_center gap_2")
|
||||
(a
|
||||
("href" "/forges")
|
||||
("class" "button lowered small")
|
||||
|
@ -58,17 +68,17 @@
|
|||
("class" "desktop")
|
||||
(text "{{ text \"communities:label.join_new\" }}")))))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
(text "{% for item in list %} {{ components::community_listing_card(community=item) }} {% endfor %}")))
|
||||
(div
|
||||
("class" "card-nest w-full")
|
||||
("class" "card_nest w_full")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"trending-up\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.popular_communities\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
(text "{% for item in popular_list %} {{ components::community_listing_card(community=item) }} {% endfor %}"))))
|
||||
|
||||
(script
|
||||
|
@ -83,6 +93,7 @@
|
|||
},
|
||||
body: JSON.stringify({
|
||||
title: e.target.title.value,
|
||||
forum: e.target.is_forum.checked,
|
||||
}),
|
||||
})
|
||||
.then((res) => res.json())
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
(text "{% import \"components.html\" as components %} {% extends \"communities/base.html\" %} {% block content %}")
|
||||
(div
|
||||
("class" "flex flex-col gap-4 w-full")
|
||||
("class" "flex flex_col gap_4 w_full")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex gap-2 items-center")
|
||||
("class" "card small flex gap_2 items_center")
|
||||
(text "{{ icon \"users-round\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:tab.members\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(text "{% if page == 0 -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"crown\" }}")
|
||||
(span
|
||||
(text "Owner")))
|
||||
|
@ -22,9 +22,9 @@
|
|||
(text "{%- endif %}")
|
||||
(text "{% for item in list %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2 justify-between")
|
||||
("class" "card small flex items_center gap_2 justify_between")
|
||||
(span
|
||||
(text "Since ")
|
||||
(span
|
||||
|
|
|
@ -4,23 +4,23 @@
|
|||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
("class" "flex flex_col gap_2")
|
||||
(div
|
||||
("style" "display: contents")
|
||||
(text "{{ components::question(question=question, owner=owner) }}"))
|
||||
(text "{% if user and (user.id == question.receiver or question.is_global) and not has_answered %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"square-pen\" }}")
|
||||
(b
|
||||
(text "{{ text \"requests:label.answer\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("onsubmit" "answer_question_from_form(event, '{{ question.id }}')")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "content")
|
||||
(text "{{ text \"communities:label.content\" }}"))
|
||||
|
@ -34,23 +34,23 @@
|
|||
("maxlength" "4096")))
|
||||
(div
|
||||
("id" "files_list")
|
||||
("class" "flex gap-2 flex-wrap"))
|
||||
("class" "flex gap_2 flex_wrap"))
|
||||
(div
|
||||
("class" "flex gap-2")
|
||||
("class" "flex gap_2")
|
||||
(text "{{ components::emoji_picker(element_id=\"content\", render_dialog=true) }} {% if is_supporter -%} {{ components::file_picker(files_list_id=\"files_list\") }} {% endif %}")
|
||||
(button
|
||||
(text "{{ text \"requests:label.answer\" }}")))))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "card-nest w-full")
|
||||
("class" "card_nest w_full")
|
||||
("data-tab" "replies")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"newspaper\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.replies\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(text "{% for post in replies %} {{ components::post(post=post[0], owner=post[1], question=false, secondary=true, show_community=false) }} {% endfor %} {{ components::pagination(page=page, items=replies|length) }}"))))
|
||||
|
||||
(script
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(text "{% import \"components.html\" as components %} {% extends \"communities/base.html\" %} {% block content %}")
|
||||
(div
|
||||
("class" "flex flex-col gap-4 w-full")
|
||||
("class" "flex flex_col gap_4 w_full")
|
||||
(text "{{ macros::community_nav(community=community, selected=\"questions\") }}")
|
||||
(text "{% if user and can_post -%}")
|
||||
(div
|
||||
|
@ -8,14 +8,14 @@
|
|||
(text "{{ components::create_question_form(community=community.id, is_global=true) }}"))
|
||||
(text "{%- endif %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex gap-2 items-center")
|
||||
("class" "card small flex gap_2 items_center")
|
||||
(text "{{ icon \"newspaper\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.questions\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(text "{% for question in feed %} {{ components::global_question(question=question, can_manage_questions=can_manage_questions, show_community=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=feed|length) }}"))))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"communities\") }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
("class" "flex flex_col gap_2")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"search\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:link.search\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "text")
|
||||
(text "{{ text \"communities:label.query\" }}"))
|
||||
|
@ -30,14 +30,14 @@
|
|||
(button
|
||||
(text "{{ text \"dialog:action.continue\" }}"))))
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"book-marked\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.search_results\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-col gap-4")
|
||||
("class" "card flex flex_col gap_4")
|
||||
(text "{% for item in list %} {{ components::community_listing_card(community=item) }} {% endfor %} {{ components::pagination(page=page, items=list|length, key=\"&text=\", value=text) }}"))))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
("class" "flex flex_col gap_2")
|
||||
(div
|
||||
("class" "pillmenu")
|
||||
(a
|
||||
|
@ -42,13 +42,13 @@
|
|||
(text "{{ text \"communities:tab.emojis\" }}")))
|
||||
(text "{%- endif %}"))
|
||||
(div
|
||||
("class" "w-full flex flex-col gap-2")
|
||||
("class" "w_full flex flex_col gap_2")
|
||||
("data-tab" "general")
|
||||
(div
|
||||
("id" "manage_fields")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
("class" "card lowered flex flex_col gap_2")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "read_access")
|
||||
(div
|
||||
("class" "card small")
|
||||
|
@ -67,7 +67,7 @@
|
|||
("selected" "{% if community.read_access == 'Joined' -%}true{% else %}false{%- endif %}")
|
||||
(text "Joined")))))
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "join_access")
|
||||
(div
|
||||
("class" "card small")
|
||||
|
@ -90,7 +90,7 @@
|
|||
("selected" "{% if community.join_access == 'Nobody' -%}true{% else %}false{%- endif %}")
|
||||
(text "Nobody")))))
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "write_access")
|
||||
(div
|
||||
("class" "card small")
|
||||
|
@ -113,17 +113,17 @@
|
|||
("selected" "{% if community.write_access == 'Owner' -%}true{% else %}false{%- endif %}")
|
||||
(text "Owner only")))))
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "change_title")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ text \"communities:label.change_title\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("onsubmit" "change_title(event)")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "new_title")
|
||||
(text "{{ text \"communities:label.new_title\" }}"))
|
||||
|
@ -139,15 +139,15 @@
|
|||
(span
|
||||
(text "{{ text \"general:action.save\" }}"))))))
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "danger_zone")
|
||||
(div
|
||||
("class" "card small flex gap-1 items-center red")
|
||||
("class" "card small flex gap_1 items_center red")
|
||||
(text "{{ icon \"skull\" }}")
|
||||
(b
|
||||
(text "{{ text \"communities:label.danger_zone\" }}")))
|
||||
(div
|
||||
("class" "card flex flex-wrap gap-2")
|
||||
("class" "card flex flex_wrap gap_2")
|
||||
(button
|
||||
("class" "red lowered")
|
||||
("onclick" "delete_community()")
|
||||
|
@ -155,7 +155,7 @@
|
|||
(span
|
||||
(text "{{ text \"communities:label.delete_community\" }}")))))
|
||||
(div
|
||||
("class" "flex gap-2 flex-wrap")
|
||||
("class" "flex gap_2 flex_wrap")
|
||||
(button
|
||||
("onclick" "save_context()")
|
||||
(text "{{ icon \"check\" }}")
|
||||
|
@ -168,17 +168,17 @@
|
|||
(span
|
||||
(text "{{ text \"general:action.back\" }}")))))
|
||||
(div
|
||||
("class" "card lowered w-full hidden flex flex-col gap-2")
|
||||
("class" "card lowered w_full hidden flex flex_col gap_2")
|
||||
("data-tab" "images")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "change_avatar")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ text \"settings:label.change_avatar\" }}")))
|
||||
(form
|
||||
("class" "card flex gap-2 flex-row flex-wrap items-center")
|
||||
("class" "card flex gap_2 flex_row flex_wrap items_center")
|
||||
("method" "post")
|
||||
("enctype" "multipart/form-data")
|
||||
("onsubmit" "upload_avatar(event)")
|
||||
|
@ -187,50 +187,50 @@
|
|||
("name" "file")
|
||||
("type" "file")
|
||||
("accept" "image/png,image/jpeg,image/avif,image/webp,image/gif")
|
||||
("class" "w-content"))
|
||||
("class" "w_content"))
|
||||
(button
|
||||
(text "{{ icon \"check\" }}"))))
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "change_banner")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ text \"settings:label.change_banner\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("method" "post")
|
||||
("enctype" "multipart/form-data")
|
||||
("onsubmit" "upload_banner(event)")
|
||||
(div
|
||||
("class" "flex gap-2 flex-row flex-wrap items-center")
|
||||
("class" "flex gap_2 flex_row flex_wrap items_center")
|
||||
(input
|
||||
("id" "banner_file")
|
||||
("name" "file")
|
||||
("type" "file")
|
||||
("accept" "image/png,image/jpeg,image/avif,image/webp")
|
||||
("class" "w-content"))
|
||||
("class" "w_content"))
|
||||
(button
|
||||
(text "{{ icon \"check\" }}")))
|
||||
(span
|
||||
("class" "fade")
|
||||
(text "Use an image of 1100x350px for the best results.")))))
|
||||
(div
|
||||
("class" "card lowered w-full hidden flex flex-col gap-2")
|
||||
("class" "card lowered w_full hidden flex flex_col gap_2")
|
||||
("data-tab" "members")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ text \"communities:label.select_member\" }}")))
|
||||
(form
|
||||
("class" "card flex-col gap-2")
|
||||
("class" "card flex_col gap_2")
|
||||
("onsubmit" "select_user_from_form(event)")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "uid")
|
||||
(text "{{ text \"communities:label.user_id\" }}"))
|
||||
|
@ -244,15 +244,15 @@
|
|||
(button
|
||||
(text "{{ text \"communities:action.select\" }}")))))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2 w-full")
|
||||
("class" "card flex flex_col gap_2 w_full")
|
||||
("id" "membership_info"))
|
||||
|
||||
(div
|
||||
("class" "card-nest w-full")
|
||||
("class" "card_nest w_full")
|
||||
(div
|
||||
("class" "card small flex items-center justify-between gap-2")
|
||||
("class" "card small flex items_center justify_between gap_2")
|
||||
(div
|
||||
("class" "flex items-center gap-2")
|
||||
("class" "flex items_center gap_2")
|
||||
(text "{{ icon \"blocks\" }}")
|
||||
(span
|
||||
(text "{{ text \"mod_panel:label.permissions_level_builder\" }}")))
|
||||
|
@ -263,23 +263,23 @@
|
|||
(span
|
||||
(text "{{ text \"general:action.save\" }}"))))
|
||||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("id" "permission_builder"))))
|
||||
(text "{% if can_manage_channels -%}")
|
||||
(div
|
||||
("class" "card lowered w-full hidden flex flex-col gap-2")
|
||||
("class" "card lowered w_full hidden flex flex_col gap_2")
|
||||
("data-tab" "channels")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ text \"communities:action.create_channel\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("onsubmit" "create_channel_from_form(event)")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "title")
|
||||
(text "{{ text \"communities:label.name\" }}"))
|
||||
|
@ -295,14 +295,14 @@
|
|||
(text "{{ text \"communities:action.create\" }}"))))
|
||||
(text "{% for channel in channels %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small")
|
||||
(b
|
||||
(text "{{ channel.position }} "))
|
||||
(text "{{ channel.title }}"))
|
||||
(div
|
||||
("class" "card flex gap-2")
|
||||
("class" "card flex gap_2")
|
||||
(button
|
||||
("class" "red lowered small")
|
||||
("onclick" "delete_channel('{{ channel.id }}')")
|
||||
|
@ -423,22 +423,22 @@
|
|||
}"))
|
||||
(text "{%- endif %} {% if can_manage_emojis -%}")
|
||||
(div
|
||||
("class" "card lowered w-full hidden flex flex-col gap-2")
|
||||
("class" "card lowered w_full hidden flex flex_col gap_2")
|
||||
("data-tab" "emojis")
|
||||
(text "{{ components::supporter_ad(body=\"Become a supporter to upload GIF animated emojis!\") }}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("class" "card_nest")
|
||||
("ui_ident" "change_banner")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
("class" "card small flex items_center gap_2")
|
||||
(text "{{ icon \"upload\" }}")
|
||||
(b
|
||||
(text "{{ text \"communities:label.upload\" }}")))
|
||||
(form
|
||||
("class" "card flex flex-col gap-2")
|
||||
("class" "card flex flex_col gap_2")
|
||||
("onsubmit" "upload_emoji(event)")
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "name")
|
||||
(text "{{ text \"communities:label.name\" }}"))
|
||||
|
@ -451,7 +451,7 @@
|
|||
("minlength" "2")
|
||||
("maxlength" "32")))
|
||||
(div
|
||||
("class" "flex flex-col gap-1")
|
||||
("class" "flex flex_col gap_1")
|
||||
(label
|
||||
("for" "file")
|
||||
(text "{{ text \"communities:label.file\" }}"))
|
||||
|
@ -460,7 +460,7 @@
|
|||
("name" "file")
|
||||
("type" "file")
|
||||
("accept" "image/png,image/jpeg,image/avif,image/webp")
|
||||
("class" "w-full")))
|
||||
("class" "w_full")))
|
||||
(button
|
||||
(text "{{ text \"communities:action.create\" }}"))
|
||||
(span
|
||||
|
@ -469,9 +469,9 @@
|
|||
height)."))))
|
||||
(text "{% for emoji in emojis %}")
|
||||
(div
|
||||
("class" "card secondary flex flex-wrap gap-2 items-center justify-between")
|
||||
("class" "card secondary flex flex_wrap gap_2 items_center justify_between")
|
||||
(div
|
||||
("class" "flex gap-2 items-center")
|
||||
("class" "flex gap_2 items_center")
|
||||
(img
|
||||
("src" "/api/v1/communities/{{ community.id }}/emojis/{{ emoji.name }}")
|
||||
("alt" "{{ emoji.name }}")
|
||||
|
@ -480,7 +480,7 @@
|
|||
(b
|
||||
(text "{{ emoji.name }}")))
|
||||
(div
|
||||
("class" "flex gap-2")
|
||||
("class" "flex gap_2")
|
||||
(button
|
||||
("class" "lowered small")
|
||||
("onclick" "rename_emoji('{{ emoji.id }}')")
|
||||
|
@ -694,7 +694,7 @@
|
|||
);
|
||||
|
||||
// ...
|
||||
element.innerHTML = `<div class=\"flex gap-2 flex-wrap\" ui_ident=\"actions\">
|
||||
element.innerHTML = `<div class=\"flex gap_2 flex_wrap\" ui_ident=\"actions\">
|
||||
<a target=\"_blank\" class=\"button\" href=\"/api/v1/auth/user/find/${e.target.uid.value}\">Open user profile</a>
|
||||
${res.payload.role !== 33 ? `<button class=\"red lowered\" onclick=\"update_user_role('${e.target.uid.value}', 33)\">Ban</button>` : `<button class=\"lowered\" onclick=\"update_user_role('${e.target.uid.value}', 5)\">Unban</button>`}
|
||||
${res.payload.role !== 65 ? `<button class=\"red lowered\" onclick=\"update_user_role('${e.target.uid.value}', 65)\">Send to review</button>` : `<button class=\"green lowered\" onclick=\"update_user_role('${e.target.uid.value}', 5)\">Accept join request</button>`}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue