Added image reply.
This commit is contained in:
parent
27de7a8b4e
commit
c087832b74
3
Makefile
3
Makefile
@ -21,6 +21,9 @@ serve: run
|
|||||||
run:
|
run:
|
||||||
.venv/bin/snek serve
|
.venv/bin/snek serve
|
||||||
|
|
||||||
|
maintenance:
|
||||||
|
.venv/bin/snek maintenance
|
||||||
|
|
||||||
install: ubuntu
|
install: ubuntu
|
||||||
python3.12 -m venv .venv
|
python3.12 -m venv .venv
|
||||||
$(PIP) install -e .
|
$(PIP) install -e .
|
||||||
|
@ -99,9 +99,15 @@ function updateTimes() {
|
|||||||
const rect = container.getBoundingClientRect();
|
const rect = container.getBoundingClientRect();
|
||||||
if (rect.top >= 0 && rect.bottom <= viewportHeight) {
|
if (rect.top >= 0 && rect.bottom <= viewportHeight) {
|
||||||
const messageDiv = container.closest('.message');
|
const messageDiv = container.closest('.message');
|
||||||
const text = messageDiv.querySelector(".text").innerText;
|
let text = messageDiv.querySelector(".text").innerText;
|
||||||
const time = document.createElement("span");
|
const time = document.createElement("span");
|
||||||
time.innerText = app.timeDescription(container.dataset.created_at);
|
time.innerText = app.timeDescription(container.dataset.created_at);
|
||||||
|
messageDiv.querySelectorAll("img").forEach(img => {
|
||||||
|
text += " " + '';
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
container.replaceChildren(time);
|
container.replaceChildren(time);
|
||||||
const reply = document.createElement("a");
|
const reply = document.createElement("a");
|
||||||
reply.innerText = " reply";
|
reply.innerText = " reply";
|
||||||
|
Loading…
Reference in New Issue
Block a user