From: Alexander Ebert Date: Tue, 16 Aug 2022 14:21:59 +0000 (+0200) Subject: Remove the explicit `solid` flag for icons that don‘t require it X-Git-Tag: 6.0.0_Alpha_1~1024^2~2^2~46 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=072dc0423891586a9e4fc90c79d6a7bce32ad149;p=GitHub%2FWoltLab%2FWCF.git Remove the explicit `solid` flag for icons that don‘t require it --- diff --git a/ts/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.ts b/ts/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.ts index b6102c3f9c..c18519abc5 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.ts @@ -58,7 +58,7 @@ export class AcpUiDataImportManager implements AjaxCallbackObject { const content = UiDialog.getDialog(this)!.content; content.querySelector("h1")!.textContent = Language.get("wcf.acp.dataImport.completed"); const spinner = content.querySelector("fa-icon")!; - spinner.setIcon("check", true); + spinner.setIcon("check"); const formSubmit = document.createElement("div"); formSubmit.className = "formSubmit"; diff --git a/ts/WoltLabSuite/Core/Acp/Ui/Worker.ts b/ts/WoltLabSuite/Core/Acp/Ui/Worker.ts index 10a28b1990..c0d4ac0034 100644 --- a/ts/WoltLabSuite/Core/Acp/Ui/Worker.ts +++ b/ts/WoltLabSuite/Core/Acp/Ui/Worker.ts @@ -108,7 +108,7 @@ class AcpUiWorker implements AjaxCallbackObject, DialogCallbackObject { }); const spinner = content.querySelector("fa-icon")!; - spinner.setIcon("check", true); + spinner.setIcon("check"); spinner.parentElement!.dataset.status = "success"; const formSubmit = document.createElement("div"); @@ -151,7 +151,7 @@ class AcpUiWorker implements AjaxCallbackObject, DialogCallbackObject { const dialog = UiDialog.getDialog(this); if (dialog !== undefined) { const spinner = dialog.content.querySelector("fa-icon")!; - spinner.setIcon("xmark", true); + spinner.setIcon("xmark"); spinner.parentElement!.dataset.status = "error"; } diff --git a/ts/WoltLabSuite/Core/Ajax/Status.ts b/ts/WoltLabSuite/Core/Ajax/Status.ts index 80542deb57..edc77dd351 100644 --- a/ts/WoltLabSuite/Core/Ajax/Status.ts +++ b/ts/WoltLabSuite/Core/Ajax/Status.ts @@ -21,7 +21,7 @@ class AjaxStatus { const icon = document.createElement("fa-icon"); icon.size = 48; - icon.setIcon("spinner", true); + icon.setIcon("spinner"); this._overlay.appendChild(icon); const title = document.createElement("span"); diff --git a/ts/WoltLabSuite/Core/Bbcode/Collapsible.ts b/ts/WoltLabSuite/Core/Bbcode/Collapsible.ts index 7a9d03d2cd..d80cbea813 100644 --- a/ts/WoltLabSuite/Core/Bbcode/Collapsible.ts +++ b/ts/WoltLabSuite/Core/Bbcode/Collapsible.ts @@ -40,7 +40,7 @@ function toggleContainer(container: HTMLElement, toggleButtons: HTMLElement[], e const title = toggleButton.dataset.titleExpand!; const icon = toggleButton.querySelector("fa-icon"); if (icon) { - icon.setIcon("up-right-and-down-left-from-center", true); + icon.setIcon("up-right-and-down-left-from-center"); toggleButton.title = title; } else { toggleButton.textContent = title; @@ -64,7 +64,7 @@ function toggleContainer(container: HTMLElement, toggleButtons: HTMLElement[], e const title = toggleButton.dataset.titleCollapse!; const icon = toggleButton.querySelector("fa-icon"); if (icon) { - icon.setIcon("down-left-and-up-right-to-center", true); + icon.setIcon("down-left-and-up-right-to-center"); toggleButton.title = title; } else { toggleButton.textContent = title; diff --git a/ts/WoltLabSuite/Core/Controller/User/Notification/Settings.ts b/ts/WoltLabSuite/Core/Controller/User/Notification/Settings.ts index cf3c4f08ef..a91e077a3d 100644 --- a/ts/WoltLabSuite/Core/Controller/User/Notification/Settings.ts +++ b/ts/WoltLabSuite/Core/Controller/User/Notification/Settings.ts @@ -100,15 +100,15 @@ function setEmailType(event: Event): void { const icon = button.querySelector(".jsIconNotificationSettingsEmailType fa-icon") as FaIcon; switch (value) { case "daily": - icon.setIcon("clock", false); + icon.setIcon("clock"); break; case "instant": - icon.setIcon("bolt", true); + icon.setIcon("bolt"); break; case "none": - icon.setIcon("xmark", true); + icon.setIcon("xmark"); break; } diff --git a/ts/WoltLabSuite/Core/Media/Upload.ts b/ts/WoltLabSuite/Core/Media/Upload.ts index 30341baace..267200a0d5 100644 --- a/ts/WoltLabSuite/Core/Media/Upload.ts +++ b/ts/WoltLabSuite/Core/Media/Upload.ts @@ -241,7 +241,7 @@ class MediaUpload exte }); const fileIcon = file.querySelector("fa-icon")!; - fileIcon.setIcon("xmark", true); + fileIcon.setIcon("xmark"); fileIcon.insertAdjacentElement("beforebegin", deleteButton); deleteButton.append(fileIcon); @@ -282,7 +282,7 @@ class MediaUpload exte } const fileIcon = DomTraverse.childByTag(DomTraverse.childByClass(file, "mediaThumbnail")!, "FA-ICON")!; - fileIcon.setIcon("xmark", true); + fileIcon.setIcon("xmark"); file.classList.add("uploadFailed", "pointer", "jsTooltip"); file.title = Language.get("wcf.global.button.delete"); diff --git a/ts/WoltLabSuite/Core/Ui/File/Upload.ts b/ts/WoltLabSuite/Core/Ui/File/Upload.ts index 09540f68d6..1dc1a8290d 100644 --- a/ts/WoltLabSuite/Core/Ui/File/Upload.ts +++ b/ts/WoltLabSuite/Core/Ui/File/Upload.ts @@ -87,7 +87,7 @@ class FileUpload extends Upload implements FileUploadHandler const icon = document.createElement("fa-icon"); icon.size = 64; - icon.setIcon("spinner", false); + icon.setIcon("spinner"); const fileName = element.textContent; element.textContent = ""; @@ -124,7 +124,7 @@ class FileUpload extends Upload implements FileUploadHandler small.innerHTML = ""; const icon = fileElement.querySelector("fa-icon")!; - icon.setIcon("ban", true); + icon.setIcon("ban"); const innerError = document.createElement("span"); innerError.className = "innerError"; @@ -200,7 +200,7 @@ class FileUpload extends Upload implements FileUploadHandler small.innerHTML = ""; const icon = fileElement.querySelector("fa-icon")!; - icon.setIcon("ban", true); + icon.setIcon("ban"); let innerError = fileElement.querySelector(".innerError") as HTMLElement; if (innerError === null) { diff --git a/ts/WoltLabSuite/Core/Ui/ItemList/Filter.ts b/ts/WoltLabSuite/Core/Ui/ItemList/Filter.ts index 445eb28472..f1a910fa1d 100644 --- a/ts/WoltLabSuite/Core/Ui/ItemList/Filter.ts +++ b/ts/WoltLabSuite/Core/Ui/ItemList/Filter.ts @@ -368,9 +368,9 @@ class UiItemListFilter { const icon = button.querySelector("fa-icon")!; if (type === "showAll") { - icon.setIcon("eye", false); + icon.setIcon("eye"); } else { - icon.setIcon("eye-slash", false); + icon.setIcon("eye-slash"); } } } diff --git a/ts/WoltLabSuite/Core/Ui/Object/Action/Toggle.ts b/ts/WoltLabSuite/Core/Ui/Object/Action/Toggle.ts index 07834df2af..4fda91f0d2 100644 --- a/ts/WoltLabSuite/Core/Ui/Object/Action/Toggle.ts +++ b/ts/WoltLabSuite/Core/Ui/Object/Action/Toggle.ts @@ -21,12 +21,12 @@ function toggleObject(data: ObjectActionData): void { actionElement.nodeName === "FA-ICON" ? (actionElement as FaIcon) : actionElement.querySelector("fa-icon"); if (icon) { if (icon.name === "square") { - icon.setIcon("square-check", false); + icon.setIcon("square-check"); const newTitle = actionElement.dataset.disableTitle || Language.get("wcf.global.button.disable"); actionElement.title = newTitle; } else { - icon.setIcon("square", false); + icon.setIcon("square"); const newTitle = actionElement.dataset.enableTitle || Language.get("wcf.global.button.enable"); actionElement.title = newTitle; diff --git a/ts/WoltLabSuite/Core/Ui/Password.ts b/ts/WoltLabSuite/Core/Ui/Password.ts index ea47d2659a..150d4190cd 100644 --- a/ts/WoltLabSuite/Core/Ui/Password.ts +++ b/ts/WoltLabSuite/Core/Ui/Password.ts @@ -43,7 +43,7 @@ function initElement(input: HTMLInputElement): void { const icon = document.createElement("fa-icon"); icon.size = 16; - icon.setIcon("eye", false); + icon.setIcon("eye"); button.appendChild(icon); button.addEventListener("click", () => { @@ -66,11 +66,11 @@ function initElement(input: HTMLInputElement): void { function toggle(input: HTMLInputElement, button: HTMLElement, icon: FaIcon): void { if (input.type === "password") { - icon.setIcon("eye-slash", false); + icon.setIcon("eye-slash"); button.dataset.tooltip = Language.get("wcf.global.form.password.button.hide"); input.type = "text"; } else { - icon.setIcon("eye-slash", true); + icon.setIcon("eye-slash"); button.dataset.tooltip = Language.get("wcf.global.form.password.button.show"); input.type = "password"; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.js index d1639e3a88..037a1a3db6 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/DataImport/Manager.js @@ -43,7 +43,7 @@ define(["require", "exports", "tslib", "../../../Ajax", "../../../Core", "../../ const content = Dialog_1.default.getDialog(this).content; content.querySelector("h1").textContent = Language.get("wcf.acp.dataImport.completed"); const spinner = content.querySelector("fa-icon"); - spinner.setIcon("check", true); + spinner.setIcon("check"); const formSubmit = document.createElement("div"); formSubmit.className = "formSubmit"; formSubmit.innerHTML = ``; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Worker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Worker.js index d872158b19..4053b00ab5 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Worker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/Worker.js @@ -63,7 +63,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Langua Dialog_1.default.setCallback(this, "onClose", () => this.onClose()); }); const spinner = content.querySelector("fa-icon"); - spinner.setIcon("check", true); + spinner.setIcon("check"); spinner.parentElement.dataset.status = "success"; const formSubmit = document.createElement("div"); formSubmit.className = "formSubmit"; @@ -100,7 +100,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Langua const dialog = Dialog_1.default.getDialog(this); if (dialog !== undefined) { const spinner = dialog.content.querySelector("fa-icon"); - spinner.setIcon("xmark", true); + spinner.setIcon("xmark"); spinner.parentElement.dataset.status = "error"; } return true; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Status.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Status.js index 2cab0c4255..a9eb2936fe 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Status.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ajax/Status.js @@ -20,7 +20,7 @@ define(["require", "exports", "tslib", "../Language"], function (require, export this._overlay.setAttribute("role", "status"); const icon = document.createElement("fa-icon"); icon.size = 48; - icon.setIcon("spinner", true); + icon.setIcon("spinner"); this._overlay.appendChild(icon); const title = document.createElement("span"); title.textContent = Language.get("wcf.global.loading"); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js index 3e39b1dc6d..f7a3a24870 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bbcode/Collapsible.js @@ -39,7 +39,7 @@ define(["require", "exports"], function (require, exports) { const title = toggleButton.dataset.titleExpand; const icon = toggleButton.querySelector("fa-icon"); if (icon) { - icon.setIcon("up-right-and-down-left-from-center", true); + icon.setIcon("up-right-and-down-left-from-center"); toggleButton.title = title; } else { @@ -63,7 +63,7 @@ define(["require", "exports"], function (require, exports) { const title = toggleButton.dataset.titleCollapse; const icon = toggleButton.querySelector("fa-icon"); if (icon) { - icon.setIcon("down-left-and-up-right-to-center", true); + icon.setIcon("down-left-and-up-right-to-center"); toggleButton.title = title; } else { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/User/Notification/Settings.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/User/Notification/Settings.js index 0696d6c609..19ad1b23ab 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/User/Notification/Settings.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/User/Notification/Settings.js @@ -84,13 +84,13 @@ define(["require", "exports", "tslib", "../../../Language", "../../../Ui/Dropdow const icon = button.querySelector(".jsIconNotificationSettingsEmailType fa-icon"); switch (value) { case "daily": - icon.setIcon("clock", false); + icon.setIcon("clock"); break; case "instant": - icon.setIcon("bolt", true); + icon.setIcon("bolt"); break; case "none": - icon.setIcon("xmark", true); + icon.setIcon("xmark"); break; } _objectId = 0; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js index 65e796117b..d53f529b07 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Upload.js @@ -199,7 +199,7 @@ define(["require", "exports", "tslib", "../Upload", "../Core", "../Dom/Util", ". EventHandler.fire("com.woltlab.wcf.media.upload", "removedErroneousUploadRow"); }); const fileIcon = file.querySelector("fa-icon"); - fileIcon.setIcon("xmark", true); + fileIcon.setIcon("xmark"); fileIcon.insertAdjacentElement("beforebegin", deleteButton); deleteButton.append(fileIcon); file.classList.add("uploadFailed"); @@ -231,7 +231,7 @@ define(["require", "exports", "tslib", "../Upload", "../Core", "../Dom/Util", ". }; } const fileIcon = DomTraverse.childByTag(DomTraverse.childByClass(file, "mediaThumbnail"), "FA-ICON"); - fileIcon.setIcon("xmark", true); + fileIcon.setIcon("xmark"); file.classList.add("uploadFailed", "pointer", "jsTooltip"); file.title = Language.get("wcf.global.button.delete"); file.addEventListener("click", () => file.remove()); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js index 34871c0ea3..e56fab66ba 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/File/Upload.js @@ -43,7 +43,7 @@ define(["require", "exports", "tslib", "../../Core", "./Delete", "../../Dom/Util const progress = element.querySelector("progress"); const icon = document.createElement("fa-icon"); icon.size = 64; - icon.setIcon("spinner", false); + icon.setIcon("spinner"); const fileName = element.textContent; element.textContent = ""; element.append(icon); @@ -69,7 +69,7 @@ define(["require", "exports", "tslib", "../../Core", "./Delete", "../../Dom/Util const small = fileElement.querySelector("small"); small.innerHTML = ""; const icon = fileElement.querySelector("fa-icon"); - icon.setIcon("ban", true); + icon.setIcon("ban"); const innerError = document.createElement("span"); innerError.className = "innerError"; innerError.textContent = Language.get("wcf.upload.error.uploadFailed"); @@ -134,7 +134,7 @@ define(["require", "exports", "tslib", "../../Core", "./Delete", "../../Dom/Util const small = fileElement.querySelector("small"); small.innerHTML = ""; const icon = fileElement.querySelector("fa-icon"); - icon.setIcon("ban", true); + icon.setIcon("ban"); let innerError = fileElement.querySelector(".innerError"); if (innerError === null) { innerError = document.createElement("span"); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js index 8f6392d92d..491503f9bb 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/ItemList/Filter.js @@ -295,10 +295,10 @@ define(["require", "exports", "tslib", "../../Core", "../../Dom/Util", "../../La } const icon = button.querySelector("fa-icon"); if (type === "showAll") { - icon.setIcon("eye", false); + icon.setIcon("eye"); } else { - icon.setIcon("eye-slash", false); + icon.setIcon("eye-slash"); } } } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Object/Action/Toggle.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Object/Action/Toggle.js index e436e411e6..716a31f8ae 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Object/Action/Toggle.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Object/Action/Toggle.js @@ -20,12 +20,12 @@ define(["require", "exports", "tslib", "../../../Language", "./Handler"], functi const icon = actionElement.nodeName === "FA-ICON" ? actionElement : actionElement.querySelector("fa-icon"); if (icon) { if (icon.name === "square") { - icon.setIcon("square-check", false); + icon.setIcon("square-check"); const newTitle = actionElement.dataset.disableTitle || Language.get("wcf.global.button.disable"); actionElement.title = newTitle; } else { - icon.setIcon("square", false); + icon.setIcon("square"); const newTitle = actionElement.dataset.enableTitle || Language.get("wcf.global.button.enable"); actionElement.title = newTitle; } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Password.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Password.js index 3e87d79f54..9e01eca2ce 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Password.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Password.js @@ -40,7 +40,7 @@ define(["require", "exports", "tslib", "../Dom/Change/Listener", "../Language"], inputAddon.appendChild(button); const icon = document.createElement("fa-icon"); icon.size = 16; - icon.setIcon("eye", false); + icon.setIcon("eye"); button.appendChild(icon); button.addEventListener("click", () => { toggle(input, button, icon); @@ -59,12 +59,12 @@ define(["require", "exports", "tslib", "../Dom/Change/Listener", "../Language"], } function toggle(input, button, icon) { if (input.type === "password") { - icon.setIcon("eye-slash", false); + icon.setIcon("eye-slash"); button.dataset.tooltip = Language.get("wcf.global.form.password.button.hide"); input.type = "text"; } else { - icon.setIcon("eye-slash", true); + icon.setIcon("eye-slash"); button.dataset.tooltip = Language.get("wcf.global.form.password.button.show"); input.type = "password"; }