Fix some compose panel bugs and reload workers when changed
This commit is contained in:
@@ -284,6 +284,17 @@
|
||||
{% endif %}
|
||||
<p class="compose-msg-meta">
|
||||
{{ msg.display_ts }}{% if msg.author %} · {{ msg.author }}{% endif %}
|
||||
{% if msg.read_ts %}
|
||||
<span class="compose-ticks" title="Read at {{ msg.read_display }}">
|
||||
<span class="icon is-small"><i class="fa-solid fa-check-double has-text-info"></i></span>
|
||||
<span class="compose-tick-time">{{ msg.read_display }}</span>
|
||||
</span>
|
||||
{% elif msg.delivered_ts %}
|
||||
<span class="compose-ticks" title="Delivered at {{ msg.delivered_display }}">
|
||||
<span class="icon is-small"><i class="fa-solid fa-check-double has-text-grey"></i></span>
|
||||
<span class="compose-tick-time">{{ msg.delivered_display }}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
@@ -538,6 +549,18 @@
|
||||
#{{ panel_id }} .compose-msg-meta {
|
||||
margin: 0;
|
||||
}
|
||||
#{{ panel_id }} .compose-ticks {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.22rem;
|
||||
margin-left: 0.4rem;
|
||||
color: #6b7787;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
#{{ panel_id }} .compose-tick-time {
|
||||
font-size: 0.66rem;
|
||||
color: #616161;
|
||||
}
|
||||
#{{ panel_id }} .compose-platform-switch {
|
||||
margin-top: 0.32rem;
|
||||
}
|
||||
@@ -1736,7 +1759,41 @@
|
||||
if (msg.author) {
|
||||
metaText += " · " + String(msg.author);
|
||||
}
|
||||
meta.textContent = metaText;
|
||||
meta.textContent = metaText;
|
||||
// Render delivery/read ticks and a small time label when available.
|
||||
if (msg.read_ts) {
|
||||
const tickWrap = document.createElement("span");
|
||||
tickWrap.className = "compose-ticks";
|
||||
tickWrap.title = "Read at " + String(msg.read_display || msg.read_ts || "");
|
||||
const icon = document.createElement("span");
|
||||
icon.className = "icon is-small";
|
||||
const i = document.createElement("i");
|
||||
i.className = "fa-solid fa-check-double has-text-info";
|
||||
icon.appendChild(i);
|
||||
const timeSpan = document.createElement("span");
|
||||
timeSpan.className = "compose-tick-time";
|
||||
timeSpan.textContent = String(msg.read_display || "");
|
||||
tickWrap.appendChild(icon);
|
||||
tickWrap.appendChild(timeSpan);
|
||||
meta.appendChild(document.createTextNode(" "));
|
||||
meta.appendChild(tickWrap);
|
||||
} else if (msg.delivered_ts) {
|
||||
const tickWrap = document.createElement("span");
|
||||
tickWrap.className = "compose-ticks";
|
||||
tickWrap.title = "Delivered at " + String(msg.delivered_display || msg.delivered_ts || "");
|
||||
const icon = document.createElement("span");
|
||||
icon.className = "icon is-small";
|
||||
const i = document.createElement("i");
|
||||
i.className = "fa-solid fa-check-double has-text-grey";
|
||||
icon.appendChild(i);
|
||||
const timeSpan = document.createElement("span");
|
||||
timeSpan.className = "compose-tick-time";
|
||||
timeSpan.textContent = String(msg.delivered_display || "");
|
||||
tickWrap.appendChild(icon);
|
||||
tickWrap.appendChild(timeSpan);
|
||||
meta.appendChild(document.createTextNode(" "));
|
||||
meta.appendChild(tickWrap);
|
||||
}
|
||||
bubble.appendChild(meta);
|
||||
|
||||
row.appendChild(bubble);
|
||||
|
||||
Reference in New Issue
Block a user