add: better mobile ui for timeline pages
add: rename button classes (quaternary->lowered, tertiary->raised)
This commit is contained in:
parent
7bfb113b1f
commit
0dede99682
42 changed files with 272 additions and 177 deletions
|
@ -189,7 +189,7 @@ table ol {
|
|||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.card.tertiary {
|
||||
.card.lowered {
|
||||
background: var(--color-lowered);
|
||||
}
|
||||
|
||||
|
@ -308,25 +308,25 @@ button.secondary:hover,
|
|||
background: var(--color-secondary-lowered);
|
||||
}
|
||||
|
||||
button.tertiary,
|
||||
.button.tertiary {
|
||||
button.raised,
|
||||
.button.raised {
|
||||
background: var(--color-raised);
|
||||
color: var(--color-text-raised);
|
||||
}
|
||||
|
||||
button.tertiary:hover,
|
||||
.button.tertiary:hover {
|
||||
button.raised:hover,
|
||||
.button.raised:hover {
|
||||
background: var(--color-super-raised);
|
||||
}
|
||||
|
||||
button.quaternary,
|
||||
.button.quaternary {
|
||||
button.lowered,
|
||||
.button.lowered {
|
||||
background: var(--color-lowered);
|
||||
color: var(--color-text-lowered);
|
||||
}
|
||||
|
||||
button.quaternary:hover,
|
||||
.button.quaternary:hover {
|
||||
button.lowered:hover,
|
||||
.button.lowered:hover {
|
||||
background: var(--color-super-lowered);
|
||||
}
|
||||
|
||||
|
@ -520,6 +520,11 @@ select:focus {
|
|||
.pillmenu.rows .row:last-of-type a:last-child {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.pillmenu:is(.dropdown .inner *),
|
||||
.pillmenu:is(.dropdown .inner *).rows {
|
||||
display: contents;
|
||||
}
|
||||
}
|
||||
|
||||
/* notification */
|
||||
|
@ -627,7 +632,7 @@ nav .button:not(.title):not(.active):hover {
|
|||
}
|
||||
|
||||
#page {
|
||||
padding-bottom: 72px;
|
||||
padding-bottom: 12dvh;
|
||||
}
|
||||
|
||||
nav button:not(.dropdown *),
|
||||
|
@ -669,6 +674,43 @@ nav .button:not(.title):not(.active):hover {
|
|||
}
|
||||
}
|
||||
|
||||
.mobile_nav {
|
||||
width: 100dvw;
|
||||
border-bottom: solid 1px var(--color-super-lowered);
|
||||
background-color: var(--color-lowered);
|
||||
padding: var(--pad-2) var(--pad-4);
|
||||
display: flex;
|
||||
gap: var(--pad-2);
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* mobile nav chip nav */
|
||||
.mobile_nav .pillmenu {
|
||||
flex-direction: row !important;
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
.mobile_nav .pillmenu a {
|
||||
border-radius: 0;
|
||||
padding: var(--pad-1) var(--pad-3);
|
||||
}
|
||||
|
||||
.mobile_nav .pillmenu a span {
|
||||
/* show icons only */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile_nav .pillmenu a:first-of-type {
|
||||
border-top-left-radius: var(--radius) !important;
|
||||
border-bottom-left-radius: var(--radius) !important;
|
||||
}
|
||||
|
||||
.mobile_nav .pillmenu a:last-of-type {
|
||||
border-top-right-radius: var(--radius) !important;
|
||||
border-bottom-right-radius: var(--radius) !important;
|
||||
}
|
||||
|
||||
/* dialog */
|
||||
dialog {
|
||||
padding: 0;
|
||||
|
@ -795,7 +837,8 @@ dialog::backdrop {
|
|||
}
|
||||
|
||||
.dropdown .inner a:hover,
|
||||
.dropdown .inner button:hover {
|
||||
.dropdown .inner button:hover,
|
||||
.dropdown .inner .active {
|
||||
background-color: var(--color-lowered);
|
||||
}
|
||||
|
||||
|
@ -804,8 +847,19 @@ dialog::backdrop {
|
|||
outline: none;
|
||||
}
|
||||
|
||||
.dropdown .inner .active::after {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 5px;
|
||||
content: "";
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background: var(--color-primary);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.dropdown:not(nav *):has(.inner.open) button:not(.inner button) {
|
||||
color: var(--color-text) !important;
|
||||
color: var(--color-text-lowered) !important;
|
||||
background: var(--color-lowered) !important;
|
||||
}
|
||||
|
||||
|
@ -814,6 +868,11 @@ dialog::backdrop {
|
|||
background: var(--color-primary-lowered) !important;
|
||||
}
|
||||
|
||||
.dropdown:not(nav *):has(.inner.open) button.raised:not(.inner button) {
|
||||
color: var(--color-text-raised) !important;
|
||||
background: var(--color-raised) !important;
|
||||
}
|
||||
|
||||
.dropdown button .icon {
|
||||
transition: transform 0.15s;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
("class" "lightbox hidden")
|
||||
("id" "lightbox")
|
||||
(button
|
||||
("class" "lightbox_exit small square quaternary red")
|
||||
("class" "lightbox_exit small square lowered red")
|
||||
("onclick" "trigger('ui::lightbox_close')")
|
||||
(icon (text "x")))
|
||||
|
||||
|
@ -209,7 +209,7 @@
|
|||
(span (str (text "general:action.add_account"))))
|
||||
|
||||
(button
|
||||
("class" "quaternary")
|
||||
("class" "lowered")
|
||||
("onclick" "document.getElementById('tokens_dialog').close()")
|
||||
("type" "button")
|
||||
(icon (text "check")))))))
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
("style" "width: var(--list-bar-width)")
|
||||
(a
|
||||
("href" "/chats/0/0")
|
||||
("class" "button quaternary channel_icon {% if selected_community == 0 -%}selected{%- endif %}")
|
||||
("class" "button lowered channel_icon {% if selected_community == 0 -%}selected{%- endif %}")
|
||||
("data-turbo" "false")
|
||||
(text "{{ icon \"message-circle\" }}"))
|
||||
(text "{% for community in communities %} {% if community.id != 0 -%}")
|
||||
(a
|
||||
("href" "/chats/{{ community.id }}/0")
|
||||
("class" "button quaternary channel_icon {% if selected_community == community.id -%}selected{%- endif %}")
|
||||
("class" "button lowered channel_icon {% if selected_community == community.id -%}selected{%- endif %}")
|
||||
("data-turbo" "false")
|
||||
(text "{{ components::community_avatar(id=community.id, community=community, size=\"48px\") }}"))
|
||||
(text "{%- endif %} {% endfor %}"))
|
||||
|
@ -74,7 +74,7 @@
|
|||
(text "{%- endif %}"))
|
||||
(text "{% if can_manage_channels -%}")
|
||||
(a
|
||||
("class" "button w-full justify-start quaternary")
|
||||
("class" "button w-full justify-start lowered")
|
||||
("href" "/community/{{ selected_community }}/manage#/channels")
|
||||
(text "{{ icon \"plus\" }}")
|
||||
(span
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
(div
|
||||
("class" "flex flex-row gap-1")
|
||||
(a
|
||||
("class" "w-full justify-start button {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}")
|
||||
("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\" }}")
|
||||
|
@ -17,7 +17,7 @@
|
|||
(div
|
||||
("class" "dropdown")
|
||||
(button
|
||||
("class" "big_icon {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}")
|
||||
("class" "big_icon {% if selected_channel == channel.id -%}lowered{% else %}camo{%- endif %}")
|
||||
("onclick" "trigger('atto::hooks::dropdown', [event])")
|
||||
("exclude" "dropdown")
|
||||
("style" "width: 32px")
|
||||
|
@ -26,14 +26,14 @@
|
|||
("class" "inner")
|
||||
(text "{% if user.id == channel.owner -%} {% if selected_community == 0 %}")
|
||||
(button
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
("onclick" "add_member('{{ channel.id }}')")
|
||||
(text "{{ icon \"user-plus\" }}")
|
||||
(span
|
||||
(text "{{ text \"chats:action.add_someone\" }}")))
|
||||
(text "{%- endif %}")
|
||||
(button
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
("onclick" "update_channel_title('{{ channel.id }}')")
|
||||
(text "{{ icon \"pencil\" }}")
|
||||
(span
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
("id" "stream_body")
|
||||
(text "{% if page != 0 -%}")
|
||||
(div
|
||||
("class" "card flex gap-2 small tertiary flex-wrap")
|
||||
("class" "card flex gap-2 small lowered flex-wrap")
|
||||
(b
|
||||
(text "{{ text \"chats:label.viewing_old_messages\" }}"))
|
||||
(a
|
||||
|
@ -16,7 +16,7 @@
|
|||
(text "{{ text \"chats:label.go_back\" }}")))
|
||||
(text "{%- endif %} {% if message -%}")
|
||||
(div
|
||||
("class" "card flex gap-2 small tertiary flex-wrap")
|
||||
("class" "card flex gap-2 small lowered flex-wrap")
|
||||
(b
|
||||
(text "{{ text \"chats:label.viewing_single_message\" }}"))
|
||||
(a
|
||||
|
@ -37,7 +37,7 @@
|
|||
(text "{{ text \"chats:label.view_older\" }}")))
|
||||
(text "{% if page != 0 -%}")
|
||||
(a
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
("href" "/chats/{{ community }}/{{ channel }}/_stream?page={{ page - 1 }}")
|
||||
("onclick" "window.CURRENT_PAGE -= 1")
|
||||
(text "{{ icon \"rewind\" }}")
|
||||
|
|
|
@ -34,12 +34,12 @@
|
|||
(text "{{ text \"communities:label.create_post\" }}")))
|
||||
(button
|
||||
("onclick" "cancel_create_post()")
|
||||
("class" "quaternary small red")
|
||||
("class" "lowered small red")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"dialog:action.cancel\" }}"))))
|
||||
(div
|
||||
("class" "card tertiary 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")
|
||||
|
@ -54,12 +54,12 @@
|
|||
("class" "flex gap-2")
|
||||
(a
|
||||
("href" "?")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"dialog:action.cancel\" }}")))
|
||||
(button
|
||||
("class" "button quaternary red small")
|
||||
("class" "button lowered red small")
|
||||
("onclick" "remove_draft('{{ draft.id }}')")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
@ -75,7 +75,7 @@
|
|||
(text "{{ quoting[0].username }}'s post")))
|
||||
(a
|
||||
("href" "?")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"dialog:action.cancel\" }}"))))
|
||||
|
@ -335,7 +335,7 @@
|
|||
(text "{%- endif %}")))
|
||||
(text "{% if drafts|length > 0 -%}")
|
||||
(div
|
||||
("class" "card-nest tertiary hidden")
|
||||
("class" "card-nest lowered hidden")
|
||||
("data-tab" "drafts")
|
||||
(div
|
||||
("class" "card small flex items-center gap-2")
|
||||
|
@ -364,7 +364,7 @@
|
|||
(span
|
||||
(text "{{ text \"communities:label.load\" }}")))
|
||||
(button
|
||||
("class" "button quaternary red small")
|
||||
("class" "button lowered red small")
|
||||
("onclick" "remove_draft('{{ draft.id }}')")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
|
|
@ -46,14 +46,14 @@
|
|||
("class" "flex items-center gap-2")
|
||||
(a
|
||||
("href" "/forges")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"anvil\" }}")
|
||||
(span
|
||||
("class" "desktop")
|
||||
(text "{{ text \"forge:label.my_forges\" }}")))
|
||||
(a
|
||||
("href" "/communities/search")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"search\" }}")
|
||||
(span
|
||||
("class" "desktop")
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(text "{% if can_manage_roles -%}")
|
||||
(a
|
||||
("href" "/community/{{ community.id }}/manage?uid={{ item[1].id }}#/members")
|
||||
("class" "button small quaternary")
|
||||
("class" "button small lowered")
|
||||
(text "{{ icon \"pencil\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.manage\" }}")))
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
("data-tab" "general")
|
||||
(div
|
||||
("id" "manage_fields")
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("ui_ident" "read_access")
|
||||
|
@ -150,7 +150,7 @@
|
|||
(div
|
||||
("class" "card flex flex-wrap gap-2")
|
||||
(button
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
("onclick" "delete_community()")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
@ -169,7 +169,7 @@
|
|||
(span
|
||||
(text "{{ text \"general:action.back\" }}")))))
|
||||
(div
|
||||
("class" "card tertiary 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")
|
||||
|
@ -219,7 +219,7 @@
|
|||
("class" "fade")
|
||||
(text "Use an image of 1100x350px for the best results.")))))
|
||||
(div
|
||||
("class" "card tertiary 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")
|
||||
|
@ -261,7 +261,7 @@
|
|||
(span
|
||||
(text "{{ text \"mod_panel:label.permissions_level_builder\" }}")))
|
||||
(button
|
||||
("class" "small quaternary")
|
||||
("class" "small lowered")
|
||||
("onclick" "update_user_role(document.getElementById('uid').value, document.getElementById('role').value)")
|
||||
(text "{{ icon \"check\" }}")
|
||||
(span
|
||||
|
@ -271,7 +271,7 @@
|
|||
("id" "permission_builder"))))
|
||||
(text "{% if can_manage_channels -%}")
|
||||
(div
|
||||
("class" "card tertiary 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")
|
||||
|
@ -309,15 +309,15 @@
|
|||
(div
|
||||
("class" "card flex gap-2")
|
||||
(button
|
||||
("class" "red quaternary small")
|
||||
("class" "red lowered small")
|
||||
("onclick" "delete_channel('{{ channel.id }}')")
|
||||
(text "{{ text \"general:action.delete\" }}"))
|
||||
(button
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
("onclick" "update_channel_position('{{ channel.id }}')")
|
||||
(text "{{ text \"chats:action.move\" }}"))
|
||||
(button
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
("onclick" "update_channel_title('{{ channel.id }}')")
|
||||
(text "{{ text \"chats:action.rename\" }}"))))
|
||||
(text "{% endfor %}"))
|
||||
|
@ -428,7 +428,7 @@
|
|||
}"))
|
||||
(text "{%- endif %} {% if can_manage_emojis -%}")
|
||||
(div
|
||||
("class" "card tertiary 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
|
||||
|
@ -487,13 +487,13 @@
|
|||
(div
|
||||
("class" "flex gap-2")
|
||||
(button
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
("onclick" "rename_emoji('{{ emoji.id }}')")
|
||||
(text "{{ icon \"pencil\" }}")
|
||||
(span
|
||||
(text "{{ text \"chats:action.rename\" }}")))
|
||||
(button
|
||||
("class" "quaternary small red")
|
||||
("class" "lowered small red")
|
||||
("onclick" "remove_emoji('{{ emoji.id }}')")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
|
@ -701,10 +701,10 @@
|
|||
// ...
|
||||
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 quaternary\" onclick=\"update_user_role('${e.target.uid.value}', 33)\">Ban</button>` : `<button class=\"quaternary\" onclick=\"update_user_role('${e.target.uid.value}', 5)\">Unban</button>`}
|
||||
${res.payload.role !== 65 ? `<button class=\"red quaternary\" onclick=\"update_user_role('${e.target.uid.value}', 65)\">Send to review</button>` : `<button class=\"green quaternary\" onclick=\"update_user_role('${e.target.uid.value}', 5)\">Accept join request</button>`}
|
||||
<button class=\"red quaternary\" onclick=\"kick_user('${e.target.uid.value}')\">Kick</button>
|
||||
<button class=\"red quaternary\" onclick=\"transfer_ownership('${e.target.uid.value}')\">Transfer ownership</button>
|
||||
${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>`}
|
||||
<button class=\"red lowered\" onclick=\"kick_user('${e.target.uid.value}')\">Kick</button>
|
||||
<button class=\"red lowered\" onclick=\"transfer_ownership('${e.target.uid.value}')\">Transfer ownership</button>
|
||||
</div>`;
|
||||
|
||||
document.getElementById(\"permission_builder\").innerHTML =
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
(text "{%- endmacro %} {% macro likes(id, asset_type, likes=0, dislikes=0, secondary=false) -%}")
|
||||
(button
|
||||
("title" "Like")
|
||||
("class" "{% if secondary -%}quaternary{% else %}camo{%- endif %} small")
|
||||
("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small")
|
||||
("hook_element" "reaction.like")
|
||||
("onclick" "trigger('me::react', [event.target, '{{ id }}', '{{ asset_type }}', true])")
|
||||
(text "{{ icon \"heart\" }} {% if likes > 0 -%}")
|
||||
|
@ -86,7 +86,7 @@
|
|||
(text "{% if not user or not user.settings.hide_dislikes -%}")
|
||||
(button
|
||||
("title" "Dislike")
|
||||
("class" "{% if secondary -%}quaternary{% else %}camo{%- endif %} small")
|
||||
("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small")
|
||||
("hook_element" "reaction.dislike")
|
||||
("onclick" "trigger('me::react', [event.target, '{{ id }}', '{{ asset_type }}', false])")
|
||||
(text "{{ icon \"heart-crack\" }} {% if dislikes > 0 -%}")
|
||||
|
@ -215,7 +215,7 @@
|
|||
("hook" "long")
|
||||
(text "{{ post.title }}"))
|
||||
|
||||
(button ("class" "small quaternary") (icon (text "ellipsis"))))
|
||||
(button ("class" "small lowered") (icon (text "ellipsis"))))
|
||||
(text "{% else %}")
|
||||
(text "{% if not post.context.content_warning -%}")
|
||||
(span
|
||||
|
@ -232,14 +232,14 @@
|
|||
; content
|
||||
(text "{{ post.content|markdown|safe }} {% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}")
|
||||
(div
|
||||
("class" "card tertiary red flex items-center gap-2")
|
||||
("class" "card lowered red flex items-center gap-2")
|
||||
(text "{{ icon \"frown\" }}")
|
||||
(span
|
||||
(text "Could not find original post...")))
|
||||
(text "{%- endif %} {%- endif %}"))
|
||||
(text "{{ self::post_media(upload_ids=post.uploads) }} {% else %}")
|
||||
(details
|
||||
("class" "card tiny tertiary w-full")
|
||||
("class" "card tiny lowered w-full")
|
||||
(summary
|
||||
("class" "red w-full")
|
||||
(b
|
||||
|
@ -259,7 +259,7 @@
|
|||
; content
|
||||
(text "{{ post.content|markdown|safe }} {% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}")
|
||||
(div
|
||||
("class" "card tertiary red flex items-center gap-2")
|
||||
("class" "card lowered red flex items-center gap-2")
|
||||
(text "{{ icon \"frown\" }}")
|
||||
(span
|
||||
(text "Could not find original post...")))
|
||||
|
@ -438,21 +438,21 @@
|
|||
("class" "card secondary w-full flex flex-wrap gap-2")
|
||||
(text "{% if notification.read -%}")
|
||||
(button
|
||||
("class" "tertiary")
|
||||
("class" "raised")
|
||||
("onclick" "trigger('me::update_notification_read_status', ['{{ notification.id }}', false])")
|
||||
(text "{{ icon \"undo\" }}")
|
||||
(span
|
||||
(text "{{ text \"notifs:action.mark_as_unread\" }}")))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("class" "green tertiary")
|
||||
("class" "green raised")
|
||||
("onclick" "trigger('me::update_notification_read_status', ['{{ notification.id }}', true])")
|
||||
(text "{{ icon \"check\" }}")
|
||||
(span
|
||||
(text "{{ text \"notifs:action.mark_as_read\" }}")))
|
||||
(text "{%- endif %}")
|
||||
(button
|
||||
("class" "red tertiary")
|
||||
("class" "red raised")
|
||||
("onclick" "trigger('me::remove_notification', ['{{ notification.id }}'])")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
@ -480,7 +480,7 @@
|
|||
("class" "flex justify-between gap-2 w-full")
|
||||
(text "{% if page > 0 -%}")
|
||||
(a
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
("href" "?page={{ page - 1 }}{{ key }}{{ value }}")
|
||||
(text "{{ icon \"arrow-left\" }}")
|
||||
(span
|
||||
|
@ -489,7 +489,7 @@
|
|||
(div)
|
||||
(text "{%- endif %} {% if items != 0 -%}")
|
||||
(a
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
("href" "?page={{ page + 1 }}{{ key }}{{ value }}")
|
||||
(span
|
||||
(text "{{ text \"general:link.next\" }}"))
|
||||
|
@ -676,7 +676,7 @@
|
|||
; this is only shown if the post author is anonymous AND we are a helper
|
||||
(text "{% if is_helper and owner.id == 0 %}")
|
||||
(details
|
||||
("class" "card tiny tertiary w-full")
|
||||
("class" "card tiny lowered w-full")
|
||||
(summary
|
||||
("class" "w-full flex gap-2 flex-wrap items-center")
|
||||
(icon (text "shield"))
|
||||
|
@ -1096,7 +1096,7 @@
|
|||
|
||||
(text "{%- endmacro %} {% macro emoji_picker(element_id, render_dialog=false) -%}")
|
||||
(button
|
||||
("class" "button small square quaternary")
|
||||
("class" "button small square lowered")
|
||||
("onclick" "window.EMOJI_PICKER_TEXT_ID = '{{ element_id }}'; document.getElementById('emoji_dialog').showModal()")
|
||||
("title" "Emojis")
|
||||
("type" "button")
|
||||
|
@ -1168,14 +1168,14 @@
|
|||
(div
|
||||
("class" "flex gap-2")
|
||||
(button
|
||||
("class" "bold red quaternary")
|
||||
("class" "bold red lowered")
|
||||
("onclick" "document.getElementById('emoji_dialog').close()")
|
||||
("type" "button")
|
||||
(text "{{ icon \"x\" }} {{ text \"dialog:action.close\" }}"))))))
|
||||
|
||||
(text "{%- endif %} {%- endmacro %} {% macro file_picker(files_list_id) -%}")
|
||||
(button
|
||||
("class" "button small square quaternary")
|
||||
("class" "button small square lowered")
|
||||
("onclick" "pick_file()")
|
||||
("title" "Images")
|
||||
("type" "button")
|
||||
|
@ -1270,14 +1270,14 @@
|
|||
(text "{{ components::emoji_picker(element_id=\"content\", render_dialog=true) }} {% if not quoting -%} {% if is_supporter -%} {{ components::file_picker(files_list_id=\"files_list\") }} {%- endif %} {%- endif %}")
|
||||
|
||||
(button
|
||||
("class" "small square quaternary")
|
||||
("class" "small square lowered")
|
||||
("title" "Add poll")
|
||||
("onclick" "document.getElementById('poll_options_dialog').showModal()")
|
||||
("type" "button")
|
||||
(text "{{ icon \"list-todo\" }}"))
|
||||
|
||||
(button
|
||||
("class" "small square quaternary")
|
||||
("class" "small square lowered")
|
||||
("title" "More options")
|
||||
("onclick" "document.getElementById('post_options_dialog').showModal()")
|
||||
("type" "button")
|
||||
|
@ -1297,7 +1297,7 @@
|
|||
(div
|
||||
("class" "flex gap-2")
|
||||
(button
|
||||
("class" "bold red quaternary")
|
||||
("class" "bold red lowered")
|
||||
("onclick" "document.getElementById('post_options_dialog').close()")
|
||||
("type" "button")
|
||||
(text "{{ icon \"x\" }} {{ text \"dialog:action.close\" }}"))))
|
||||
|
@ -1474,7 +1474,7 @@
|
|||
(div
|
||||
("class" "flex gap-2")
|
||||
(button
|
||||
("class" "bold red quaternary")
|
||||
("class" "bold red lowered")
|
||||
("onclick" "document.getElementById('poll_options_dialog').close()")
|
||||
("type" "button")
|
||||
(text "{{ icon \"x\" }} {{ text \"dialog:action.close\" }}"))))))
|
||||
|
@ -1482,7 +1482,7 @@
|
|||
(text "{%- endmacro %}")
|
||||
(text "{% macro poll(post, poll) -%}")
|
||||
(div
|
||||
("class" "card tertiary w-full flex flex-col gap-2")
|
||||
("class" "card lowered w-full flex flex-col gap-2")
|
||||
(text "{% set total = poll[0].votes_a + poll[0].votes_b + poll[0].votes_c + poll[0].votes_d %}")
|
||||
|
||||
(text "{% if poll[1] or poll[2] or user and user.id == poll[0].owner -%}")
|
||||
|
@ -1525,14 +1525,14 @@
|
|||
|
||||
; option a
|
||||
(button
|
||||
("class" "hover_left_bar tertiary justify-start w-full poll_option")
|
||||
("class" "hover_left_bar raised justify-start w-full poll_option")
|
||||
("onclick" "trigger('me::vote', ['{{ post.id }}', 'A'])")
|
||||
(icon (text "tally-1"))
|
||||
(text "{{ poll[0].option_a }}"))
|
||||
|
||||
; option b
|
||||
(button
|
||||
("class" "hover_left_bar tertiary justify-start w-full poll_option")
|
||||
("class" "hover_left_bar raised justify-start w-full poll_option")
|
||||
("onclick" "trigger('me::vote', ['{{ post.id }}', 'B'])")
|
||||
(icon (text "tally-2"))
|
||||
(text "{{ poll[0].option_b }}"))
|
||||
|
@ -1540,7 +1540,7 @@
|
|||
; option c
|
||||
(text "{% if poll[0].option_c -%}")
|
||||
(button
|
||||
("class" "hover_left_bar tertiary justify-start w-full poll_option")
|
||||
("class" "hover_left_bar raised justify-start w-full poll_option")
|
||||
("onclick" "trigger('me::vote', ['{{ post.id }}', 'C'])")
|
||||
(icon (text "tally-3"))
|
||||
(text "{{ poll[0].option_c }}"))
|
||||
|
@ -1549,7 +1549,7 @@
|
|||
; option d
|
||||
(text "{% if poll[0].option_d -%}")
|
||||
(button
|
||||
("class" "hover_left_bar tertiary justify-start w-full poll_option")
|
||||
("class" "hover_left_bar raised justify-start w-full poll_option")
|
||||
("onclick" "trigger('me::vote', ['{{ post.id }}', 'D'])")
|
||||
(icon (text "tally-4"))
|
||||
(text "{{ poll[0].option_d }}"))
|
||||
|
@ -1666,7 +1666,7 @@
|
|||
};"))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "cancel_request()")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
|
@ -1701,21 +1701,21 @@
|
|||
};"))
|
||||
(text "{%- endif %} {% else %}")
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "leave_community()")
|
||||
(text "{{ icon \"circle-minus\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:action.leave\" }}")))
|
||||
(a
|
||||
("href" "/chats/{{ community.id }}/0")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"message-circle\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.chats\" }}")))
|
||||
(text "{% if user and can_post -%}")
|
||||
(a
|
||||
("href" "/communities/intents/post?community={{ community.id }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
("data-turbo" "false")
|
||||
(text "{{ icon \"plus\" }}")
|
||||
(span
|
||||
|
@ -1752,13 +1752,13 @@
|
|||
(text "{%- endif %} {% else %}")
|
||||
(a
|
||||
("href" "/chats/{{ community.id }}/0")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"message-circle\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:label.chats\" }}")))
|
||||
(a
|
||||
("href" "/communities/intents/post?community={{ community.id }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
("data-turbo" "false")
|
||||
(text "{{ icon \"plus\" }}")
|
||||
(span
|
||||
|
|
|
@ -109,7 +109,38 @@
|
|||
(text "{%- endif %}")))
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro timelines_nav(selected=\"\") -%}")
|
||||
(text "{% macro timelines_nav(selected=\"\", posts=\"\", questions=\"\", secondary_selected=\"posts\") -%}")
|
||||
(div
|
||||
("class" "mobile_nav mobile")
|
||||
; primary nav
|
||||
(div
|
||||
("class" "dropdown")
|
||||
("style" "width: max-content")
|
||||
(button
|
||||
("class" "camo raised small")
|
||||
("onclick" "trigger('atto::hooks::dropdown', [event])")
|
||||
("exclude" "dropdown")
|
||||
(icon (text "sliders-horizontal"))
|
||||
(text "{{ selected }}"))
|
||||
(div
|
||||
("class" "inner left")
|
||||
(text "{{ macros::timelines_nav_options(selected=selected) }}")))
|
||||
|
||||
(text "{% if posts and questions -%}")
|
||||
; secondary nav
|
||||
(text "{{ macros::timelines_secondary_nav(posts=posts, questions=questions, selected=secondary_selected) }}")
|
||||
(text "{%- endif %}"))
|
||||
|
||||
(div
|
||||
("class" "desktop flex flex-col gap-2")
|
||||
; primary nav desktop only
|
||||
(text "{{ macros::timelines_nav_options(selected=selected) }}")
|
||||
|
||||
; secondary nav desktop only
|
||||
(text "{{ macros::timelines_secondary_nav(posts=posts, questions=questions, selected=secondary_selected) }}"))
|
||||
(text "{%- endmacro %}")
|
||||
|
||||
(text "{% macro timelines_nav_options(selected=\"\") -%}")
|
||||
(div
|
||||
("class" "pillmenu {% if user -%}rows{% endif %} w-full")
|
||||
(div
|
||||
|
@ -170,13 +201,13 @@
|
|||
("href" "{{ posts }}")
|
||||
("class" "{% if selected == 'posts' -%}active{%- endif %}")
|
||||
(icon (text "newspaper"))
|
||||
(str (text "communities:label.posts")))
|
||||
(span (str (text "communities:label.posts"))))
|
||||
|
||||
(a
|
||||
("href" "{{ questions }}")
|
||||
("class" "{% if selected == 'questions' -%}active{%- endif %}")
|
||||
(icon (text "message-circle-heart"))
|
||||
(str (text "communities:label.questions"))))
|
||||
(span (str (text "communities:label.questions")))))
|
||||
(text "{%- endif %} {%- endmacro %}")
|
||||
|
||||
(text "{% macro community_nav(community, selected=\"\") -%} {% if community.context.enable_questions -%}")
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
("class" "flex gap-2")
|
||||
(button
|
||||
("onclick" "trigger('me::clear_notifs')")
|
||||
("class" "small red quaternary")
|
||||
("class" "small red lowered")
|
||||
(text "{{ icon \"bomb\" }}")
|
||||
(span
|
||||
(text "{{ text \"notifs:action.clear\" }}")))
|
||||
(div
|
||||
("class" "dropdown")
|
||||
(button
|
||||
("class" "small quaternary")
|
||||
("class" "small lowered")
|
||||
("onclick" "trigger('atto::hooks::dropdown', [event])")
|
||||
("exclude" "dropdown")
|
||||
(text "{{ icon \"ellipsis\" }}"))
|
||||
|
@ -53,7 +53,7 @@
|
|||
(span
|
||||
(text "{{ text \"notifs:label.mark_all_as_unread\" }}")))))))
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-4")
|
||||
("class" "card lowered flex flex-col gap-4")
|
||||
(text "{% for notification in notifications %} {{ components::notification(notification=notification) }} {% endfor %}")))
|
||||
|
||||
(text "{{ components::pagination(page=page, items=notifications|length, key=\"&id=\", value=profile.id) }}"))
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
(text "{% if profile.id == user.id -%}")
|
||||
(button
|
||||
("onclick" "clear_requests()")
|
||||
("class" "small red quaternary")
|
||||
("class" "small red lowered")
|
||||
(text "{{ icon \"bomb\" }}")
|
||||
(span
|
||||
(text "{{ text \"notifs:action.clear\" }}")))
|
||||
(text "{% endif %}"))
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-4")
|
||||
("class" "card lowered flex flex-col gap-4")
|
||||
(text "{% for request in requests %} {% if request.action_type == \"CommunityJoin\" %}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
|
@ -52,7 +52,7 @@
|
|||
(span
|
||||
(text "{{ text \"requests:label.review\" }}")))
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "remove_request('{{ request.id }}', '{{ request.linked_asset }}')")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
@ -78,13 +78,13 @@
|
|||
(span
|
||||
(text "{{ text \"requests:action.view_profile\" }}")))
|
||||
(button
|
||||
("class" "quaternary green")
|
||||
("class" "lowered green")
|
||||
("onclick" "accept_follow_request(event, '{{ request.id }}')")
|
||||
(text "{{ icon \"check\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.accept\" }}")))
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "remove_request('{{ request.id }}', '{{ request.linked_asset }}')")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
@ -120,12 +120,12 @@
|
|||
(text "{{ text \"requests:label.answer\" }}"))
|
||||
(button
|
||||
("type" "button")
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
("onclick" "trigger('me::remove_question', ['{{ question[0].id }}'])")
|
||||
(text "{{ text \"general:action.delete\" }}"))
|
||||
(button
|
||||
("type" "button")
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
("onclick" "trigger('me::ip_block_question', ['{{ question[0].id }}'])")
|
||||
(text "{{ text \"auth:action.ip_block\" }}")))))
|
||||
(text "{% endfor %}")))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
(text "{{ text \"general:link.ip_bans\" }}")))
|
||||
(button
|
||||
("onclick" "prompt_ban_ip()")
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
(text "{{ icon \"plus\" }}")
|
||||
(span
|
||||
(text "{{ text \"communities:action.create\" }}"))))
|
||||
|
@ -44,7 +44,7 @@
|
|||
("class" "card w-full flex flex-wrap gap-2")
|
||||
(button
|
||||
("onclick" "remove_ipban('{{ item.ip }}')")
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.delete\" }}"))))))
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
(span
|
||||
(text "{{ text \"mod_panel:label.manage_profile\" }}")))
|
||||
(div
|
||||
("class" "card tertiary")
|
||||
("class" "card lowered")
|
||||
(div
|
||||
("class" "flex flex-col gap-2")
|
||||
("id" "mod_options")
|
||||
|
@ -22,19 +22,19 @@
|
|||
("ui_ident" "actions")
|
||||
(a
|
||||
("href" "/settings?username={{ profile.username }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"settings\" }}")
|
||||
(span
|
||||
(text "View settings")))
|
||||
(a
|
||||
("href" "/mod_panel/profile/{{ profile.id }}/warnings")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"shield-alert\" }}")
|
||||
(span
|
||||
(text "View warnings")))
|
||||
(a
|
||||
("href" "/notifs?id={{ profile.id }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"bell\" }}")
|
||||
(span
|
||||
(text "Notifications"))
|
||||
|
@ -43,7 +43,7 @@
|
|||
(text "{{ profile.notification_count }}")))
|
||||
(a
|
||||
("href" "/requests?id={{ profile.id }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"inbox\" }}")
|
||||
(span
|
||||
(text "Requests"))
|
||||
|
@ -51,19 +51,19 @@
|
|||
("class" "notification")
|
||||
(text "{{ profile.request_count }}")))
|
||||
(button
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
("onclick" "delete_account(event)")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
(text "{{ text \"settings:label.delete_account\" }}")))
|
||||
(text "{% if profile.permissions != 131073 -%}")
|
||||
(button
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
("onclick" "update_user_role(131073)")
|
||||
(text "Ban"))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("class" "quaternary")
|
||||
("class" "lowered")
|
||||
("onclick" "update_user_role(1)")
|
||||
(text "Unban"))
|
||||
(text "{%- endif %}")))
|
||||
|
@ -198,7 +198,7 @@
|
|||
(span
|
||||
(text "{{ text \"mod_panel:label.associations\" }}"))))
|
||||
(div
|
||||
("class" "card tertiary flex flex-wrap gap-2")
|
||||
("class" "card lowered flex flex-wrap gap-2")
|
||||
(text "{% for user in associations -%}")
|
||||
(text "{{ components::user_plate(user=user, show_menu=false) }}")
|
||||
(text "{%- endfor %}")))
|
||||
|
@ -212,13 +212,13 @@
|
|||
(span
|
||||
(text "{{ text \"mod_panel:label.permissions_level_builder\" }}")))
|
||||
(button
|
||||
("class" "small quaternary")
|
||||
("class" "small lowered")
|
||||
("onclick" "update_user_role(Number.parseInt(document.getElementById('role').value))")
|
||||
(text "{{ icon \"check\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.save\" }}"))))
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
("id" "permission_builder")))
|
||||
(script
|
||||
(text "setTimeout(() => {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
(text "{{ text \"mod_panel:label.open_reported_content\" }}")))
|
||||
(button
|
||||
("onclick" "remove_report('{{ item.id }}')")
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.delete\" }}"))))))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
(text "{{ text \"mod_panel:label.create_warning\" }}")))
|
||||
(a
|
||||
("href" "/mod_panel/profile/{{ profile.id }}")
|
||||
("class" "button quaternary small red")
|
||||
("class" "button lowered small red")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"dialog:action.cancel\" }}"))))
|
||||
|
@ -66,7 +66,7 @@
|
|||
("class" "fade date")
|
||||
(text "{{ item.created }}")))
|
||||
(button
|
||||
("class" "small quaternary red")
|
||||
("class" "small lowered red")
|
||||
("onclick" "remove_warning('{{ item.id }}')")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
(span
|
||||
(text "{{ text \"communities:action.configure\" }}")))
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-4")
|
||||
("class" "card lowered flex flex-col gap-4")
|
||||
("id" "post_context")))
|
||||
(button
|
||||
("onclick" "save_context()")
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
("class" "card flex items-center gap-2 flex-wrap secondary")
|
||||
(a
|
||||
("href" "/post/{{ post[0].id }}")
|
||||
("class" "quaternary small button")
|
||||
("class" "lowered small button")
|
||||
(text "{{ icon \"external-link\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.open\" }}")))))
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
("class" "card w-full secondary flex gap-2")
|
||||
(a
|
||||
("href" "/")
|
||||
("class" "button red quaternary")
|
||||
("class" "button red lowered")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.back\" }}")))))))
|
||||
|
|
|
@ -212,35 +212,35 @@
|
|||
(text "{{ text \"auth:action.follow\" }}")))
|
||||
(button
|
||||
("onclick" "toggle_follow_user(event)")
|
||||
("class" "quaternary red{% if not is_following %} hidden{% endif %}")
|
||||
("class" "lowered red{% if not is_following %} hidden{% endif %}")
|
||||
("atto_tag" "user.unfollow")
|
||||
(text "{{ icon \"user-minus\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.unfollow\" }}")))
|
||||
(button
|
||||
("onclick" "toggle_block_user()")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
(text "{{ icon \"shield\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.block\" }}")))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("onclick" "toggle_block_user()")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
(text "{{ icon \"shield-off\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.unblock\" }}")))
|
||||
(text "{%- endif %} {% if not user.settings.private_chats or is_following_you %}")
|
||||
(button
|
||||
("onclick" "create_group_chat()")
|
||||
("class" "quaternary")
|
||||
("class" "lowered")
|
||||
(text "{{ icon \"message-circle\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.message\" }}")))
|
||||
(text "{%- endif %} {% if is_helper -%}")
|
||||
(a
|
||||
("href" "/mod_panel/profile/{{ profile.id }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
(text "{{ icon \"shield\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.manage\" }}")))
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
(text "{% if user -%} {% if not is_blocking -%}")
|
||||
(button
|
||||
("onclick" "toggle_block_user()")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
(text "{{ icon \"shield\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.block\" }}")))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("onclick" "toggle_block_user()")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
(text "{{ icon \"shield-off\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.unblock\" }}")))
|
||||
|
@ -62,7 +62,7 @@
|
|||
(text "{%- endif %}")
|
||||
(a
|
||||
("href" "/")
|
||||
("class" "button red quaternary")
|
||||
("class" "button red lowered")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.back\" }}")))))))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
(text "{% if user -%}")
|
||||
(a
|
||||
("href" "/search?profile={{ profile.id }}")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"search\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:link.search\" }}")))
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
; show button to delete question
|
||||
(button
|
||||
("class" "quaternary small red")
|
||||
("class" "lowered small red")
|
||||
("onclick" "trigger('me::remove_question', ['{{ question[0].id }}'])")
|
||||
(icon (text "trash"))
|
||||
(str (text "general:action.delete")))))
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
(text "{% if user -%}")
|
||||
(a
|
||||
("href" "/search?profile={{ profile.id }}")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"search\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:link.search\" }}")))
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(text "{{ text \"auth:action.request_to_follow\" }}")))
|
||||
(button
|
||||
("onclick" "cancel_follow_user(event)")
|
||||
("class" "quaternary red{% if not follow_requested -%} hidden{%- endif %}")
|
||||
("class" "lowered red{% if not follow_requested -%} hidden{%- endif %}")
|
||||
("atto_tag" "user.cancel_request")
|
||||
(text "{{ icon \"user-minus\" }}")
|
||||
(span
|
||||
|
@ -41,7 +41,7 @@
|
|||
(text "{% else %}")
|
||||
(button
|
||||
("onclick" "toggle_follow_user(event)")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("atto_tag" "user.unfollow")
|
||||
(text "{{ icon \"user-minus\" }}")
|
||||
(span
|
||||
|
@ -49,14 +49,14 @@
|
|||
(text "{%- endif %} {% if not is_blocking -%}")
|
||||
(button
|
||||
("onclick" "toggle_block_user()")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
(text "{{ icon \"shield\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.block\" }}")))
|
||||
(text "{% else %}")
|
||||
(button
|
||||
("onclick" "toggle_block_user()")
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
(text "{{ icon \"shield-off\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.unblock\" }}")))
|
||||
|
@ -155,7 +155,7 @@
|
|||
(text "{%- endif %}")
|
||||
(a
|
||||
("href" "/")
|
||||
("class" "button red quaternary")
|
||||
("class" "button red lowered")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.back\" }}")))))))
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
(text "{% if user -%}")
|
||||
(a
|
||||
("href" "/search?profile={{ profile.id }}")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"search\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:link.search\" }}")))
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
("class" "w-full flex flex-col gap-2")
|
||||
("data-tab" "account")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
("id" "account_settings")
|
||||
(div
|
||||
("class" "pillmenu")
|
||||
|
@ -96,7 +96,7 @@
|
|||
(div
|
||||
("class" "card")
|
||||
(select
|
||||
("onchange" "set_setting_field('default_timeline', event.target.selectedOptions[0].value.startsWith('{') ? JSON.parse(event.target.selectedOptions[0].value) : event.target.selectedOptions[0].value)")
|
||||
("onchange" "window.SETTING_SET_FUNCTIONS[0]('default_timeline', event.target.selectedOptions[0].value.startsWith('{') ? JSON.parse(event.target.selectedOptions[0].value) : event.target.selectedOptions[0].value)")
|
||||
(option
|
||||
("value" "MyCommunities")
|
||||
("selected" "{% if home == '/' -%}true{% else %}false{%- endif %}")
|
||||
|
@ -227,7 +227,7 @@
|
|||
("class" "w-full flex flex-col gap-2 hidden")
|
||||
("data-tab" "account/security")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(a
|
||||
("href" "#/account")
|
||||
("class" "button secondary")
|
||||
|
@ -272,7 +272,7 @@
|
|||
(pre
|
||||
("id" "totp_recovery_codes")))
|
||||
(button
|
||||
("class" "quaternary green")
|
||||
("class" "lowered green")
|
||||
("onclick" "enable_totp(event)")
|
||||
(text "Enable TOTP 2FA"))
|
||||
(text "{% else %}")
|
||||
|
@ -282,11 +282,11 @@
|
|||
(div
|
||||
("class" "flex gap-2 flex-wrap")
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "refresh_totp_codes(event)")
|
||||
(text "Refresh recovery codes"))
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "disable_totp(event)")
|
||||
(text "Disable TOTP 2FA")))
|
||||
(text "{%- endif %}")))
|
||||
|
@ -335,7 +335,7 @@
|
|||
("class" "w-full flex flex-col gap-2 hidden")
|
||||
("data-tab" "account/following")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(a
|
||||
("href" "#/account")
|
||||
("class" "button secondary")
|
||||
|
@ -360,14 +360,14 @@
|
|||
(div
|
||||
("class" "flex gap-2")
|
||||
(button
|
||||
("class" "quaternary red small")
|
||||
("class" "lowered red small")
|
||||
("onclick" "toggle_follow_user('{{ user.id }}')")
|
||||
(text "{{ icon \"user-minus\" }}")
|
||||
(span
|
||||
(text "{{ text \"auth:action.unfollow\" }}")))
|
||||
(a
|
||||
("href" "/@{{ user.username }}")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"external-link\" }}")
|
||||
(span
|
||||
(text "{{ text \"requests:action.view_profile\" }}")))))
|
||||
|
@ -391,7 +391,7 @@
|
|||
("class" "w-full flex flex-col gap-2 hidden")
|
||||
("data-tab" "account/blocks")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(a
|
||||
("href" "#/account")
|
||||
("class" "button secondary")
|
||||
|
@ -415,7 +415,7 @@
|
|||
(text "{{ components::avatar(username=user.username) }} {{ components::full_username(user=user) }}"))
|
||||
(a
|
||||
("href" "/@{{ user.username }}")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"external-link\" }}")
|
||||
(span
|
||||
(text "{{ text \"requests:action.view_profile\" }}"))))
|
||||
|
@ -424,7 +424,7 @@
|
|||
("class" "w-full flex flex-col gap-2 hidden")
|
||||
("data-tab" "account/uploads")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(a
|
||||
("href" "#/account")
|
||||
("class" "button secondary")
|
||||
|
@ -456,13 +456,13 @@
|
|||
(div
|
||||
("class" "flex gap-2")
|
||||
(button
|
||||
("class" "quaternary small")
|
||||
("class" "lowered small")
|
||||
("onclick" "trigger('ui::lightbox_open', ['/api/v1/uploads/{{ upload.id }}'])")
|
||||
(text "{{ icon \"view\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.view\" }}")))
|
||||
(button
|
||||
("class" "quaternary small red")
|
||||
("class" "lowered small red")
|
||||
("onclick" "remove_upload('{{ upload.id }}')")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
|
@ -493,7 +493,7 @@
|
|||
("class" "w-full flex flex-col gap-2 hidden")
|
||||
("data-tab" "account/billing")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(a
|
||||
("href" "#/account")
|
||||
("class" "button secondary")
|
||||
|
@ -534,7 +534,7 @@
|
|||
portal.")))
|
||||
(a
|
||||
("href" "{{ config.stripe.billing_portal_url }}")
|
||||
("class" "button quaternary")
|
||||
("class" "button lowered")
|
||||
("target" "_blank")
|
||||
(text "Manage billing"))
|
||||
(text "{% else %}")
|
||||
|
@ -591,7 +591,7 @@
|
|||
("class" "w-full hidden flex flex-col gap-2")
|
||||
("data-tab" "profile")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
("id" "profile_settings")
|
||||
(text "{{ components::supporter_ad(body=\"Become a supporter to upload GIF images!\") }}")
|
||||
(div
|
||||
|
@ -655,7 +655,7 @@
|
|||
(span
|
||||
(text "{{ text \"general:action.save\" }}"))))
|
||||
(div
|
||||
("class" "card w-full tertiary hidden flex flex-col gap-2")
|
||||
("class" "card w-full lowered hidden flex flex-col gap-2")
|
||||
("data-tab" "sessions")
|
||||
(text "{% for token in profile.tokens %}")
|
||||
(div
|
||||
|
@ -688,7 +688,7 @@
|
|||
("class" "fade date")
|
||||
(text "{{ token[2] }}")))
|
||||
(button
|
||||
("class" "quaternary red")
|
||||
("class" "lowered red")
|
||||
("onclick" "remove_token('{{ token[1] }}')")
|
||||
(text "{{ text \"general:action.delete\" }}")))
|
||||
(text "{% endfor %}"))
|
||||
|
@ -696,7 +696,7 @@
|
|||
("class" "w-full hidden flex flex-col gap-2")
|
||||
("data-tab" "theme")
|
||||
(div
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
("id" "theme_settings")
|
||||
(text "{% if failing_color_keys|length > 0 -%}")
|
||||
(div
|
||||
|
@ -714,7 +714,7 @@
|
|||
(ul
|
||||
(text "{% for key in failing_color_keys %}")
|
||||
(li
|
||||
(text "{{ key[0] }}")
|
||||
(text "{{ key[0] }} ")
|
||||
(b
|
||||
(text "{{ key[1] }} < 4.5")))
|
||||
(text "{% endfor %}")))
|
||||
|
@ -745,7 +745,7 @@
|
|||
(div
|
||||
("class" "card")
|
||||
(select
|
||||
("onchange" "set_setting_field('theme_preference', event.target.selectedOptions[0].value)")
|
||||
("onchange" "window.SETTING_SET_FUNCTIONS[0]('theme_preference', event.target.selectedOptions[0].value)")
|
||||
(option
|
||||
("value" "Auto")
|
||||
("selected" "{% if user.settings.theme_preference == 'Auto' -%}true{% else %}false{%- endif %}")
|
||||
|
@ -771,7 +771,7 @@
|
|||
(div
|
||||
("class" "card")
|
||||
(select
|
||||
("onchange" "set_setting_field('profile_theme', event.target.selectedOptions[0].value)")
|
||||
("onchange" "window.SETTING_SET_FUNCTIONS[0]('profile_theme', event.target.selectedOptions[0].value)")
|
||||
(option
|
||||
("value" "Auto")
|
||||
("selected" "{% if user.settings.profile_theme == 'Auto' -%}true{% else %}false{%- endif %}")
|
||||
|
@ -795,20 +795,20 @@
|
|||
(span
|
||||
(text "{{ text \"general:action.save\" }}"))))
|
||||
(div
|
||||
("class" "card w-full tertiary hidden flex flex-col gap-2")
|
||||
("class" "card w-full lowered hidden flex flex-col gap-2")
|
||||
("data-tab" "connections")
|
||||
(div
|
||||
("class" "card w-full flex flex-wrap gap-2")
|
||||
(text "{% if config.connections.spotify_client_id and not profile.connections.Spotify %}")
|
||||
(button
|
||||
("class" "quaternary")
|
||||
("class" "lowered")
|
||||
("onclick" "trigger('spotify::create_connection', ['{{ config.connections.spotify_client_id }}'])")
|
||||
(text "{{ icon \"spotify\" }}")
|
||||
(span
|
||||
(text "Spotify")))
|
||||
(text "{%- endif %} {% if config.connections.last_fm_key and not profile.connections.LastFm %}")
|
||||
(button
|
||||
("class" "quaternary")
|
||||
("class" "lowered")
|
||||
("onclick" "trigger('last_fm::create_connection', ['{{ config.connections.last_fm_key }}'])")
|
||||
(text "{{ icon \"last_fm\" }}")
|
||||
(span
|
||||
|
@ -839,7 +839,7 @@
|
|||
(div
|
||||
("class" "card flex flex-col gap-2")
|
||||
(button
|
||||
("class" "quaternary red small")
|
||||
("class" "lowered red small")
|
||||
("onclick" "trigger('connections::delete', ['{{ key }}'])")
|
||||
(text "{{ text \"general:action.delete\" }}"))
|
||||
(label
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
(text "{{ text \"dialog:action.continue\" }}")))
|
||||
(a
|
||||
("href" "/")
|
||||
("class" "button red quaternary")
|
||||
("class" "button red lowered")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.back\" }}")))))))
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
("class" "card small flex items-center justify-between gap-2")
|
||||
(div
|
||||
("class" "flex items-center gap-2")
|
||||
(text "{{ icon \"award\" }}")
|
||||
(text "{{ icon \"layers\" }}")
|
||||
(span
|
||||
(text "{{ text \"stacks:label.my_stacks\" }}"))))
|
||||
(div
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
("data-tab" "general")
|
||||
(div
|
||||
("id" "manage_fields")
|
||||
("class" "card tertiary flex flex-col gap-2")
|
||||
("class" "card lowered flex flex-col gap-2")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
("ui_ident" "privacy")
|
||||
|
@ -121,7 +121,7 @@
|
|||
(div
|
||||
("class" "card flex flex-wrap gap-2")
|
||||
(button
|
||||
("class" "red quaternary")
|
||||
("class" "red lowered")
|
||||
("onclick" "delete_stack()")
|
||||
(text "{{ icon \"trash\" }}")
|
||||
(span
|
||||
|
@ -141,7 +141,7 @@
|
|||
("class" "flex gap-2")
|
||||
(text "{{ components::avatar(username=user.username) }} {{ components::full_username(user=user) }}"))
|
||||
(button
|
||||
("class" "quaternary small red")
|
||||
("class" "lowered small red")
|
||||
("onclick" "remove_user('{{ user.username }}')")
|
||||
(text "{{ icon \"x\" }}")
|
||||
(span
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(text "{% if user and user.id == stack.owner -%}")
|
||||
(a
|
||||
("href" "/stacks/{{ stack.id }}/manage")
|
||||
("class" "button quaternary small")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"pencil\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.manage\" }}")))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"all\") }} {{ macros::timelines_secondary_nav(posts=\"/all\", questions=\"/all/questions\") }} {% if not user -%}")
|
||||
(text "{{ macros::timelines_nav(selected=\"all\", posts=\"/all\", questions=\"/all/questions\") }} {% if not user -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
(div
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"all\") }} {{ macros::timelines_secondary_nav(posts=\"/all\", questions=\"/all/questions\", selected=\"questions\") }}")
|
||||
(text "{{ macros::timelines_nav(selected=\"all\", posts=\"/all\", questions=\"/all/questions\", secondary_selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"following\") }} {{ macros::timelines_secondary_nav(posts=\"/following\", questions=\"/following/questions\") }}")
|
||||
(text "{{ macros::timelines_nav(selected=\"following\", posts=\"/following\", questions=\"/following/questions\") }} }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for post in list %} {% if post[2].read_access == \"Everybody\" -%} {% if post[0].context.repost and post[0].context.repost.reposting -%} {{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], poll=post[5]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"following\") }} {{ macros::timelines_secondary_nav(posts=\"/following\", questions=\"/following/questions\", selected=\"questions\") }}")
|
||||
(text "{{ macros::timelines_nav(selected=\"following\", posts=\"/following\", questions=\"/following/questions\", secondary_selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"home\") }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"home\") }} {{ macros::timelines_secondary_nav(posts=\"/\", questions=\"/questions\") }} {% if list|length == 0 and page == 0 -%}")
|
||||
(text "{{ macros::timelines_nav(selected=\"home\", posts=\"/\", questions=\"/questions\") }} {% if list|length == 0 and page == 0 -%}")
|
||||
(div
|
||||
("class" "card-nest")
|
||||
(div
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"home\") }} {{ macros::timelines_secondary_nav(posts=\"/\", questions=\"/questions\", selected=\"questions\") }}")
|
||||
(text "{{ macros::timelines_nav(selected=\"home\", posts=\"/\", questions=\"/questions\", secondary_selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"popular\") }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"popular\") }} {{ macros::timelines_secondary_nav(posts=\"/popular\", questions=\"/popular/questions\") }}")
|
||||
(text "{{ macros::timelines_nav(selected=\"popular\", posts=\"/popular\", questions=\"/popular/questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for post in list %} {% if post[2].read_access == \"Everybody\" -%} {% if post[0].context.repost and post[0].context.repost.reposting -%} {{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], poll=post[5]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
|
||||
(main
|
||||
("class" "flex flex-col gap-2")
|
||||
(text "{{ macros::timelines_nav(selected=\"popular\") }} {{ macros::timelines_secondary_nav(posts=\"/popular\", questions=\"/popular/questions\", selected=\"questions\") }}")
|
||||
(text "{{ macros::timelines_nav(selected=\"popular\", posts=\"/popular\", questions=\"/popular/questions\", secondary_selected=\"questions\") }}")
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}")))
|
||||
|
|
|
@ -537,7 +537,7 @@ media_theme_pref();
|
|||
if (href.pathname.startsWith("/api/v1/auth/user/find_by_ip/")) {
|
||||
const ban_button = document.createElement("button");
|
||||
ban_button.innerText = "Ban IP";
|
||||
ban_button.className = "quaternary red small";
|
||||
ban_button.className = "lowered red small";
|
||||
anchor.parentElement.parentElement.appendChild(ban_button);
|
||||
|
||||
ban_button.addEventListener("click", async (e) => {
|
||||
|
@ -840,6 +840,7 @@ media_theme_pref();
|
|||
// ui ns
|
||||
(() => {
|
||||
const self = reg_ns("ui");
|
||||
window.SETTING_SET_FUNCTIONS = [];
|
||||
|
||||
self.define("refresh_container", (_, element, keep) => {
|
||||
if (keep.length === 0) {
|
||||
|
@ -939,8 +940,8 @@ media_theme_pref();
|
|||
${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
||||
|
||||
${(option.attributes || { embed_html: "" }).embed_html}
|
||||
</div>
|
||||
</div>`;
|
||||
</div>
|
||||
</div>`;
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -977,6 +978,10 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
console.log("update", key);
|
||||
};
|
||||
|
||||
window.SETTING_SET_FUNCTIONS.push(
|
||||
window[`set_setting_field${id_key}`],
|
||||
);
|
||||
|
||||
window.preview_color = (key, value) => {
|
||||
console.log("preview_color", key);
|
||||
const stylesheet = document.getElementById(
|
||||
|
@ -1070,14 +1075,14 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
for (const match of matching) {
|
||||
permissions_html += `<div class="card w-full secondary flex justify-between gap-2">
|
||||
<span>${match} <code>${permissions[match]}</code></span>
|
||||
<button class="red quaternary" onclick="remove_permission_from_role('${match}')">Remove</button>
|
||||
<button class="red lowered" onclick="remove_permission_from_role('${match}')">Remove</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
for (const match of not_matching) {
|
||||
permissions_html += `<div class="card w-full secondary flex justify-between gap-2">
|
||||
<span>${match} <code>${permissions[match]}</code></span>
|
||||
<button class="green quaternary" onclick="add_permission_to_role('${match}')">Add</button>
|
||||
<button class="green lowered" onclick="add_permission_to_role('${match}')">Add</button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
|
|
@ -546,7 +546,7 @@
|
|||
element.innerHTML = "";
|
||||
for (const token of Object.entries($.LOGIN_ACCOUNT_TOKENS)) {
|
||||
element.innerHTML += `<div class="flex gap-2 flex-row">
|
||||
<button class="quaternary w-full justify-start" onclick="trigger('me::login', ['${token[0]}'])">
|
||||
<button class="lowered w-full justify-start" onclick="trigger('me::login', ['${token[0]}'])">
|
||||
<img
|
||||
title="${token[0]}'s avatar"
|
||||
src="/api/v1/auth/user/${token[0]}/avatar?selector_type=username"
|
||||
|
@ -558,7 +558,7 @@
|
|||
<span>${token[0]}</span>
|
||||
</button>
|
||||
|
||||
<button onclick="trigger('me::remove_token', ['${token[0]}'])" class="small square red quaternary">
|
||||
<button onclick="trigger('me::remove_token', ['${token[0]}'])" class="small square red lowered">
|
||||
-
|
||||
</button>
|
||||
</div>`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue