2024-12-23 22:38:49 -05:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
<link rel="stylesheet" href="/static/css/messages.css">
|
2024-12-24 12:14:38 -05:00
|
|
|
<script>let url = "/api/messages/?unread";</script>
|
2024-12-23 22:38:49 -05:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1>Your messages</h1>
|
2024-12-24 11:34:10 -05:00
|
|
|
<p>Logged in as <a href="/u/{{ username }}">{{ username }}</a></p>
|
2024-12-23 22:38:49 -05:00
|
|
|
<hr>
|
2024-12-24 11:34:10 -05:00
|
|
|
<p>
|
|
|
|
<div>Your message link: <code class="cursor-pointer" id="message-link">{{ config.services.message.url.pub }}/m/{{ username }}/</code></div>
|
|
|
|
<div><small>(click to copy)</small></div>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p><button id="refresh" onclick="fetchMessages(true);">Refresh</button></p>
|
2024-12-23 22:38:49 -05:00
|
|
|
<p id="switch">
|
2024-12-24 12:14:38 -05:00
|
|
|
<a data-url="/api/messages/" data-id="all" class="not-bold" href="javascript:(() => { updateURL('all'); })()">All messages</a> -
|
|
|
|
<b data-url="/api/messages/?unread" data-id="unread" href="javascript:(() => { updateURL('unread'); })()">Not responded</b>
|
2024-12-23 22:38:49 -05:00
|
|
|
</p>
|
2024-12-24 10:22:37 -05:00
|
|
|
<div id="messages"><i class="delete-if-more-messages">Loading...</i></div>
|
2024-12-24 12:14:38 -05:00
|
|
|
<p><button hidden id="more-button" onclick="fetchMessages(false);">Load more</button><p>
|
2024-12-24 11:34:10 -05:00
|
|
|
<script src="{{ config.services.common.url.pub }}/static/js/base.js?v={{ config.version_str }}"></script>
|
2024-12-23 22:38:49 -05:00
|
|
|
<script src="/static/js/messages.js?v={{ config.version_str }}"></script>
|
2024-12-24 11:34:10 -05:00
|
|
|
<script>
|
|
|
|
document.getElementById("message-link").addEventListener("click", function() {
|
|
|
|
navigator.clipboard.writeText(this.innerText);
|
|
|
|
this.classList.remove("success-anim");
|
|
|
|
setTimeout(() => { this.classList.add("success-anim"); }, 10);
|
|
|
|
});
|
|
|
|
</script>
|
2024-12-23 22:38:49 -05:00
|
|
|
{% endblock %}
|