1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-12-22 00:19:19 +02:00

Chore: Refactor JS functions and remove unused parameters

This commit is contained in:
Ralph Slooten
2025-07-24 17:27:11 +12:00
parent 33fe814c34
commit cce21854b9
13 changed files with 28 additions and 23 deletions

View File

@@ -143,12 +143,12 @@ export default {
window.addEventListener("resize", this.resizeIFrames);
const headersTab = document.getElementById("nav-headers-tab");
headersTab.addEventListener("shown.bs.tab", (event) => {
headersTab.addEventListener("shown.bs.tab", () => {
this.loadHeaders = true;
});
const rawTab = document.getElementById("nav-raw-tab");
rawTab.addEventListener("shown.bs.tab", (event) => {
rawTab.addEventListener("shown.bs.tab", () => {
this.srcURI = this.resolve("/api/v1/message/" + this.message.ID + "/raw");
this.resizeIFrames();
});
@@ -180,7 +180,7 @@ export default {
this.isHTMLTabSelected();
document.querySelectorAll('button[data-bs-toggle="tab"]').forEach((listObj) => {
listObj.addEventListener("shown.bs.tab", (event) => {
listObj.addEventListener("shown.bs.tab", () => {
this.isHTMLTabSelected();
});
});
@@ -203,7 +203,9 @@ export default {
anchorEl.setAttribute("target", "_blank");
}
}
} catch (error) {}
} catch {
// ignore errors when accessing the iframe content
}
this.resizeIFrames();
}
}, 500);
@@ -280,7 +282,7 @@ export default {
Tags: this.messageTags,
};
this.put(this.resolve("/api/v1/tags"), data, (response) => {
this.put(this.resolve("/api/v1/tags"), data, () => {
window.scrollInPlace = true;
this.$emit("loadMessages");
});