function trackUploadProgress(element: HTMLElement, file: WoltlabCoreFileElement): void {
const progress = document.createElement("progress");
- progress.classList.add("attachment__item__progress__bar");
+ progress.classList.add("fileList__item__progress__bar");
progress.max = 100;
const readout = document.createElement("span");
- readout.classList.add("attachment__item__progress__readout");
+ readout.classList.add("fileList__item__progress__readout");
file.addEventListener("uploadProgress", (event: CustomEvent<number>) => {
progress.value = event.detail;
element.classList.add("attachment__item--uploading");
const wrapper = document.createElement("div");
- wrapper.classList.add("attachment__item__progress");
+ wrapper.classList.add("fileList__item__progress");
wrapper.append(progress, readout);
element.append(wrapper);
}
element.classList.remove("attachment__item--uploading");
- element.querySelector(".attachment__item__progress")?.remove();
+ element.querySelector(".fileList__item__progress")?.remove();
}
export function createAttachmentFromFile(file: WoltlabCoreFileElement, editor: HTMLElement) {
}
function trackUploadProgress(element, file) {
const progress = document.createElement("progress");
- progress.classList.add("attachment__item__progress__bar");
+ progress.classList.add("fileList__item__progress__bar");
progress.max = 100;
const readout = document.createElement("span");
- readout.classList.add("attachment__item__progress__readout");
+ readout.classList.add("fileList__item__progress__readout");
file.addEventListener("uploadProgress", (event) => {
progress.value = event.detail;
readout.textContent = `${event.detail}%`;
if (progress.parentNode === null) {
element.classList.add("attachment__item--uploading");
const wrapper = document.createElement("div");
- wrapper.classList.add("attachment__item__progress");
+ wrapper.classList.add("fileList__item__progress");
wrapper.append(progress, readout);
element.append(wrapper);
}
return;
}
element.classList.remove("attachment__item--uploading");
- element.querySelector(".attachment__item__progress")?.remove();
+ element.querySelector(".fileList__item__progress")?.remove();
}
function createAttachmentFromFile(file, editor) {
const element = document.createElement("li");
}
/* attachments tab in editor */
-.attachment__item__progress {
- align-items: center;
- column-gap: 10px;
- display: flex;
- grid-area: buttons;
-}
-
-.attachment__item__progress__readout {
- @include wcfFontSmall;
-}
-
.formAttachmentContent {
.formAttachmentList {
display: flex;
grid-area: buttons;
justify-content: end;
}
+
+.fileList__item__progress {
+ align-items: center;
+ column-gap: 10px;
+ display: flex;
+ grid-area: buttons;
+}
+
+.fileList__item__progress__readout {
+ @include wcfFontSmall;
+}