rDrama/files/templates/chat.html

146 lines
6.6 KiB
HTML
Raw Normal View History

[DO NOT MERGE] titlesssssssssss (#468) * titles * testing * self * Revert "self" This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5. * Revert "testing" This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0. * testing on devrama * rewrite the html head * reference error or smth idk * tempalte debug * template debug redux * default2 * rename default2 -> root, page title * fix settings2 * include the set_variables block * root scope variables 2 * test 3 * remove unnecessary set * add pagetitles to all settings2 pages * add pagetitle to casino * remove bloat * remove duplicate site name thingy * page titles 2 * page titles 3 * remove duplicate imports and add page titles everywhere iirc * ok but actually this time * remove unnecessary newlines * fix title lol * > * fsdfsfsfsfsfs * fsfs * template configurations * fix 500 * reduce login template bloat * move files and add status codes where needful * move authfroms to login * remove 2fa bloat * verification code * sign up fixes * readability * fssfsfsfs * move forgot password to login/ * readability * don't emit comments * add page titles where needful * gsgsgs * modals: move to respective pages * testing on devrama * get home garbage out of title * remove insane amount of icon duplication * sign up text * add votes pagetitle * fix blank lines * Revert "fix blank lines" This reverts commit b2c54339970725d00b6fc82bb458c1757909952c. * Fix blank lines on sign_up.html. * title: votes.html more meaningful identifier. * titles: Lottery, Directory, Notifications * head final in submission.html * fix missing comma * > * test * title: /comments * fsfsfsfsf * titles: user_cards * head: only load video and audio meta attributes if they actually exist * titlessssss: /admin/lottery/participants * titlessssssss: extra quote in search.html * titlessssss: userpage voters. * titties: /h/<sub>/{followers,blockers,exilees[sic]} * test banner * Revert "test banner" This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826. * make submit.html inherit from default.html Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 08:52:22 +00:00
{%- extends 'root.html' -%}
{% block pagetitle -%}Chat{%- endblock %}
[DO NOT MERGE] titlesssssssssss (#468) * titles * testing * self * Revert "self" This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5. * Revert "testing" This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0. * testing on devrama * rewrite the html head * reference error or smth idk * tempalte debug * template debug redux * default2 * rename default2 -> root, page title * fix settings2 * include the set_variables block * root scope variables 2 * test 3 * remove unnecessary set * add pagetitles to all settings2 pages * add pagetitle to casino * remove bloat * remove duplicate site name thingy * page titles 2 * page titles 3 * remove duplicate imports and add page titles everywhere iirc * ok but actually this time * remove unnecessary newlines * fix title lol * > * fsdfsfsfsfsfs * fsfs * template configurations * fix 500 * reduce login template bloat * move files and add status codes where needful * move authfroms to login * remove 2fa bloat * verification code * sign up fixes * readability * fssfsfsfs * move forgot password to login/ * readability * don't emit comments * add page titles where needful * gsgsgs * modals: move to respective pages * testing on devrama * get home garbage out of title * remove insane amount of icon duplication * sign up text * add votes pagetitle * fix blank lines * Revert "fix blank lines" This reverts commit b2c54339970725d00b6fc82bb458c1757909952c. * Fix blank lines on sign_up.html. * title: votes.html more meaningful identifier. * titles: Lottery, Directory, Notifications * head final in submission.html * fix missing comma * > * test * title: /comments * fsfsfsfsf * titles: user_cards * head: only load video and audio meta attributes if they actually exist * titlessssss: /admin/lottery/participants * titlessssssss: extra quote in search.html * titlessssss: userpage voters. * titties: /h/<sub>/{followers,blockers,exilees[sic]} * test banner * Revert "test banner" This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826. * make submit.html inherit from default.html Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 08:52:22 +00:00
{% block pagetype %}chat{% endblock %}
{% block body_attributes %}class="has_header"{% endblock %}
[DO NOT MERGE] titlesssssssssss (#468) * titles * testing * self * Revert "self" This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5. * Revert "testing" This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0. * testing on devrama * rewrite the html head * reference error or smth idk * tempalte debug * template debug redux * default2 * rename default2 -> root, page title * fix settings2 * include the set_variables block * root scope variables 2 * test 3 * remove unnecessary set * add pagetitles to all settings2 pages * add pagetitle to casino * remove bloat * remove duplicate site name thingy * page titles 2 * page titles 3 * remove duplicate imports and add page titles everywhere iirc * ok but actually this time * remove unnecessary newlines * fix title lol * > * fsdfsfsfsfsfs * fsfs * template configurations * fix 500 * reduce login template bloat * move files and add status codes where needful * move authfroms to login * remove 2fa bloat * verification code * sign up fixes * readability * fssfsfsfs * move forgot password to login/ * readability * don't emit comments * add page titles where needful * gsgsgs * modals: move to respective pages * testing on devrama * get home garbage out of title * remove insane amount of icon duplication * sign up text * add votes pagetitle * fix blank lines * Revert "fix blank lines" This reverts commit b2c54339970725d00b6fc82bb458c1757909952c. * Fix blank lines on sign_up.html. * title: votes.html more meaningful identifier. * titles: Lottery, Directory, Notifications * head final in submission.html * fix missing comma * > * test * title: /comments * fsfsfsfsf * titles: user_cards * head: only load video and audio meta attributes if they actually exist * titlessssss: /admin/lottery/participants * titlessssssss: extra quote in search.html * titlessssss: userpage voters. * titties: /h/<sub>/{followers,blockers,exilees[sic]} * test banner * Revert "test banner" This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826. * make submit.html inherit from default.html Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 08:52:22 +00:00
{% block body %}
2022-03-24 19:44:12 +00:00
{% include "header.html" %}
{% include "modals/expanded_image.html" %}
{% include "modals/emoji.html" %}
2023-01-22 03:17:14 +00:00
{% set vlink = '<a href="/id/' ~ v.id ~ '">' %}
2023-01-21 10:36:21 +00:00
<div class="container pb-4">
<div class="row justify-content-around" id="main-content-row">
2023-03-16 06:51:10 +00:00
<div class="col h-100 {% block customPadding %}custom-gutters{% endblock %}" id="main-content-col">
2023-01-21 10:36:21 +00:00
2023-03-13 06:12:49 +00:00
<div class="border-right pb-1 px-3">
2023-01-21 10:36:21 +00:00
<span id="online2" data-bs-html="true" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users Online" class="text-muted">
<i class="far fa-user fa-sm mr-1"></i>
<span class="board-chat-count">0</span>
</span>
</div>
2023-01-22 02:43:28 +00:00
{% macro chat_group_template(id, m) %}
<div class="chat-group">
2023-01-27 18:15:31 +00:00
<a class="font-weight-bold userlink" target="_blank" {% if m %}style="color:#{{m['namecolor']}}" href="/@{{m['username']}}" {% endif %}><div class="avatar profile-pic-20-wrapper mr-1"><img loading="lazy" class="avatar-pic pp20 mr-1" {% if m %}src="/pp/{{m['user_id']}}"{% endif %}><img class="avatar-hat profile-pic-20-hat hat" loading="lazy" {% if m %}src="{{m['hat']}}"{% endif %}></div>{% if m %}{{m['username']}}{% else %}NULL{% endif %}</a>
2023-01-22 02:43:28 +00:00
<span class="text-black time ml-1 mb-3 text-center">{% if m %}{{m['time'] | timestamp}}{% else %}just now{% endif %}</span>
2023-01-22 05:30:57 +00:00
<input hidden class="user_id" {% if m %}value="{{m['user_id']}}"{% endif %}>
2023-01-22 02:43:28 +00:00
{% endmacro %}
{% macro chat_line_template(id, m) %}
2023-01-22 05:49:24 +00:00
{% set quote_exists = m and m['quotes'] and messages.get(m['quotes']) %}
{% set mentioned = m and vlink in m['text_html'] or (quote_exists and messages[m['quotes']]['user_id'] == v.id) %}
<div class="chat-line {% if mentioned %}chat-mention{% endif %}" {% if m %}id="{{id}}"{% endif %}>
2023-01-21 10:36:21 +00:00
<div class="d-flex align-items-center">
2023-02-10 13:44:47 +00:00
<div class="text-muted chat-line-content">
2023-01-22 02:43:28 +00:00
<div class="{% if not (m and m['quotes']) %}d-none{% endif %} quotes" style="font-size:12px">
<a class="QuotedMessageLink" {% if m and m['quotes'] %}href="#{{m['quotes']}}"{% endif %}>
<i class="fas fa-reply"></i>
2023-01-22 05:49:24 +00:00
<span class="text-primary">@<span class="QuotedUser">
{%- if quote_exists -%}
{{messages[m['quotes']]['username']}}
{%- endif -%}
</span></span>:
<em class="QuotedMessage text-break">
2023-01-22 05:49:24 +00:00
{%- if quote_exists -%}
{{messages[m['quotes']]['text']}}
{%- endif -%}
2023-01-22 02:43:28 +00:00
</em>
</a>
2023-01-21 10:36:21 +00:00
</div>
2023-02-10 13:44:47 +00:00
<div class="d-flex">
<span class="chat-message text-black text-break">
{% if m %}
{% if v.slurreplacer %}
{{m['text_censored'] | safe}}
{% else %}
{{m['text_html'] | safe}}
{% endif %}
2023-01-22 02:43:28 +00:00
{% endif %}
2023-02-10 13:44:47 +00:00
</span>
<span class="text d-none">{% if m %}{{m['text']}}{% endif %}</span>
<i class="quote btn fas fa-reply ml-auto" data-nonce="{{g.nonce}}" data-onclick="quote(this)"></i>
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
2023-02-18 16:02:19 +00:00
<i class="btn del delconfirm fas fa-trash-alt"></i>
2023-02-10 13:44:47 +00:00
<i class="btn d-none del delmsg fas fa-trash-alt text-danger" data-nonce="{{g.nonce}}" data-onclick="del(this)"></i>
2023-01-21 10:36:21 +00:00
{% endif %}
2023-02-10 13:44:47 +00:00
</div>
2023-01-21 10:36:21 +00:00
</div>
</div>
</div>
2023-01-22 02:43:28 +00:00
{% endmacro %}
<div id="chat-group-template" class="d-none">
{{chat_group_template()}}
</div>
</div>
<div id="chat-line-template" class="d-none">
{{chat_line_template()}}
2023-01-21 10:36:21 +00:00
</div>
2023-01-22 02:43:28 +00:00
2023-01-21 10:36:21 +00:00
<div id="shrink">
2023-02-10 10:04:45 +00:00
<div id="chat-window" class="container p-0">
2023-01-22 03:16:37 +00:00
{% set messages_list = messages.items()|list %}
{% for id, m in messages_list %}
{% set same = loop.index > 1 and m['user_id'] == messages_list[loop.index-2][1]['user_id'] %}
{% if not same %}
2023-01-22 02:43:28 +00:00
{% if loop.index > 1 %}
</div>
{% endif %}
{{chat_group_template(id, m)}}
{% endif %}
{{chat_line_template(id, m)}}
{% endfor %}
</div>
2023-01-21 10:36:21 +00:00
</div>
<div class="mt-3"></div>
<div id="quotes" class="mt-3 ml-3 mb-2 d-none" style="font-size:12px">
2023-01-21 10:36:21 +00:00
<a id="QuotedMessageLink">
<i class="fas fa-reply"></i> <span class="text-primary">@<span id="QuotedUser"></span></span>: <em id="QuotedMessage"></em>
<button type="button" id="cancel" class="btn btn-secondary">Cancel</button>
<input hidden id="quotes_id">
</a>
</div>
<div id='message' class="d-none position-relative form-group d-flex">
<div class="position-absolute text-muted text-small ml-1" style="bottom: -1.5rem; line-height: 1;">
<span id="typing-indicator"></span>
<span id="loading-indicator" class="d-none"></span>
</div>
2023-01-22 00:14:45 +00:00
<span class="my-auto">
2023-01-21 11:39:42 +00:00
<i class="btn btn-secondary fas fa-smile-beam" style="font-size:1.3rem!important" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('input-text')" data-bs-toggle="modal" data-bs-target="#emojiModal"></i>
</span>
2023-02-22 17:27:33 +00:00
2023-01-22 00:14:45 +00:00
<span class="my-auto ml-1">
2023-01-21 11:39:42 +00:00
<label class="btn btn-secondary format mb-0">
2023-03-06 18:02:12 +00:00
<div class="mr-3" style="font-size:12px"><i class="fas fa-image" style="font-size:1.3rem!important"></i></div>
2023-02-27 15:02:35 +00:00
<input autocomplete="off" id="file" accept="image/*" type="file" name="file" {% if g.is_tor %}disabled{% endif %} hidden>
2023-01-21 11:39:42 +00:00
</label>
2023-02-27 15:02:35 +00:00
<button type="button" class="text-danger text-lg font-weight-bold ml-2 remove-files d-none" data-bs-toggle="tooltip" title="Remove Files">X</button>
2023-01-21 11:39:42 +00:00
</span>
2023-01-21 10:36:21 +00:00
2023-02-27 15:02:35 +00:00
<textarea id="input-text" minlength="1" maxlength="{% if SITE == 'rdrama.net' %}200{% else %}1000{% endif %}" {% if g.browser == "apple" %}style="font-size:16px!important"{% endif %} class="file-ta form-control" placeholder="Message" autocomplete="off" autofocus rows="1"></textarea>
2023-01-21 10:36:21 +00:00
2023-03-12 14:11:45 +00:00
<i id="chatsend" data-nonce="{{g.nonce}}" data-onclick="send()" class="btn btn-secondary fas fa-reply ml-3 my-auto" style="transform:rotateY(180deg);font-size:1.3rem!important"></i>
2023-01-21 10:36:21 +00:00
</div>
</div>
</div>
<div class="col text-left d-none d-lg-block pt-3" style="max-width:300px">
<h5>Users Online</h5>
<div id="online" class="mt-3"></div>
</div>
2022-03-22 02:35:12 +00:00
</div>
2023-01-21 10:36:21 +00:00
2023-01-24 05:10:16 +00:00
<input id="vid" hidden value="{{v.id}}">
<input id="site_name" hidden value="{{SITE_NAME}}">
<input id="slurreplacer" hidden value="{{v.slurreplacer}}">
2023-01-24 05:28:56 +00:00
<input id="admin_level" hidden value="{{v.admin_level}}">
2023-01-21 10:36:21 +00:00
<script defer src="{{'js/vendor/socketio.js' | asset}}"></script>
<script defer src="{{'js/chat.js' | asset}}"></script>
<script defer src="{{'js/vendor/lozad.js' | asset}}"></script>
<script defer src="{{'js/vendor/lite-youtube.js' | asset}}"></script>
[DO NOT MERGE] titlesssssssssss (#468) * titles * testing * self * Revert "self" This reverts commit d6c12d5a5ba125feb44673f55e1fdac75f151cb5. * Revert "testing" This reverts commit 86d800f9fd552196b31f0e0b3891d4fc072a9bc0. * testing on devrama * rewrite the html head * reference error or smth idk * tempalte debug * template debug redux * default2 * rename default2 -> root, page title * fix settings2 * include the set_variables block * root scope variables 2 * test 3 * remove unnecessary set * add pagetitles to all settings2 pages * add pagetitle to casino * remove bloat * remove duplicate site name thingy * page titles 2 * page titles 3 * remove duplicate imports and add page titles everywhere iirc * ok but actually this time * remove unnecessary newlines * fix title lol * > * fsdfsfsfsfsfs * fsfs * template configurations * fix 500 * reduce login template bloat * move files and add status codes where needful * move authfroms to login * remove 2fa bloat * verification code * sign up fixes * readability * fssfsfsfs * move forgot password to login/ * readability * don't emit comments * add page titles where needful * gsgsgs * modals: move to respective pages * testing on devrama * get home garbage out of title * remove insane amount of icon duplication * sign up text * add votes pagetitle * fix blank lines * Revert "fix blank lines" This reverts commit b2c54339970725d00b6fc82bb458c1757909952c. * Fix blank lines on sign_up.html. * title: votes.html more meaningful identifier. * titles: Lottery, Directory, Notifications * head final in submission.html * fix missing comma * > * test * title: /comments * fsfsfsfsf * titles: user_cards * head: only load video and audio meta attributes if they actually exist * titlessssss: /admin/lottery/participants * titlessssssss: extra quote in search.html * titlessssss: userpage voters. * titties: /h/<sub>/{followers,blockers,exilees[sic]} * test banner * Revert "test banner" This reverts commit c3d875d03f3e60d72a60dab7d28bf108554a5826. * make submit.html inherit from default.html Co-authored-by: TLSM <duolsm@outlook.com>
2022-11-21 08:52:22 +00:00
{% endblock %}