Update static/js/02-chat.js
This commit is contained in:
parent
0f0698f443
commit
de82a88091
@ -593,15 +593,9 @@ Glow.buildAttachments = attachments => {
|
|||||||
link.download = attachment.original_name;
|
link.download = attachment.original_name;
|
||||||
link.textContent = `Attachment: ${attachment.original_name} (${Glow.formatBytes(attachment.size_bytes)})`;
|
link.textContent = `Attachment: ${attachment.original_name} (${Glow.formatBytes(attachment.size_bytes)})`;
|
||||||
|
|
||||||
const share = document.createElement("button");
|
|
||||||
share.className = "small-button";
|
|
||||||
share.type = "button";
|
|
||||||
share.textContent = "Share file";
|
|
||||||
share.addEventListener("click", () => {
|
|
||||||
Glow.shareAttachment(attachment);
|
|
||||||
});
|
|
||||||
|
|
||||||
list.append(link, share);
|
|
||||||
|
list.append(link);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
};
|
};
|
||||||
@ -706,20 +700,6 @@ Glow.buildMessage = (message, grouped = false) => {
|
|||||||
bookmark.addEventListener("click", () => Glow.toggleBookmark(message));
|
bookmark.addEventListener("click", () => Glow.toggleBookmark(message));
|
||||||
actions.append(bookmark);
|
actions.append(bookmark);
|
||||||
|
|
||||||
const pin = document.createElement("button");
|
|
||||||
pin.className = "message-action";
|
|
||||||
pin.type = "button";
|
|
||||||
pin.textContent = message.is_pinned ? "Unpin" : "Pin";
|
|
||||||
pin.addEventListener("click", () => Glow.togglePin(message));
|
|
||||||
actions.append(pin);
|
|
||||||
|
|
||||||
const share = document.createElement("button");
|
|
||||||
share.className = "message-action";
|
|
||||||
share.type = "button";
|
|
||||||
share.textContent = "Share";
|
|
||||||
share.addEventListener("click", () => Glow.shareMessage(message));
|
|
||||||
actions.append(share);
|
|
||||||
|
|
||||||
const urls = Glow.extractUrls(message.text);
|
const urls = Glow.extractUrls(message.text);
|
||||||
if (urls.length) {
|
if (urls.length) {
|
||||||
const copyUrl = document.createElement("button");
|
const copyUrl = document.createElement("button");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user