inital audio player commits

This commit is contained in:
MathMan05
2025-03-25 12:13:40 -05:00
parent 4b67ed6a9c
commit b0c320cd0a
12 changed files with 693 additions and 39 deletions

View File

@@ -5,6 +5,7 @@ import {getapiurls, getInstances} from "./utils/utils.js";
import {Guild} from "./guild.js";
import {I18n} from "./i18n.js";
import {ImagesDisplay} from "./disimg.js";
import {File} from "./file.js";
class Embed {
type: string;
@@ -169,7 +170,9 @@ class Embed {
const img = document.createElement("img");
img.classList.add("messageimg");
img.onclick = function () {
const full = new ImagesDisplay([img.src]);
const full = new ImagesDisplay([
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image"}, null),
]);
full.show();
};
img.src = this.json.thumbnail.proxy_url;
@@ -205,7 +208,9 @@ class Embed {
if (this.json.thumbnail) {
img.classList.add("embedimg");
img.onclick = function () {
const full = new ImagesDisplay([img.src]);
const full = new ImagesDisplay([
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image"}, null),
]);
full.show();
};
img.src = this.json.thumbnail.proxy_url;
@@ -381,7 +386,9 @@ class Embed {
};
} else {
img.onclick = async () => {
const full = new ImagesDisplay([img.src]);
const full = new ImagesDisplay([
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image"}, null),
]);
full.show();
};
}