<div class="codeBoxHeadline">{$title}{if $filename}: {$filename}{/if}</div>
{if !$isAmp && $lines > 10}
- <span class="toggleButton icon icon24 fa-expand jsTooltip pointer" title="{lang}wcf.bbcode.button.showAll{/lang}" data-title-collapse="{lang}wcf.bbcode.button.collapse{/lang}" data-title-expand="{lang}wcf.bbcode.button.showAll{/lang}" role="button" tabindex="0"></span>
+ <span class="toggleButton jsTooltip pointer" title="{lang}wcf.bbcode.button.showAll{/lang}" data-title-collapse="{lang}wcf.bbcode.button.collapse{/lang}" data-title-expand="{lang}wcf.bbcode.button.showAll{/lang}" role="button" tabindex="0">
+ {icon size=24 name='up-right-and-down-left-from-center' type='solid'}
+ </span>
{/if}
</div>
<div id="workerContainer">
<header class="box48 contentHeader">
- {icon size=48 name='spinner' type='solid'}
+ <span class="workerStatusIcon">
+ {icon size=48 name='spinner' type='solid'}
+ </span>
<div>
<h1 class="contentTitle">{lang}wcf.global.worker.executing{/lang}</h1>
private showCompletedDialog(): void {
const content = UiDialog.getDialog(this)!.content;
content.querySelector("h1")!.textContent = Language.get("wcf.acp.dataImport.completed");
- const spinner = content.querySelector(".fa-spinner") as HTMLSpanElement;
- spinner.classList.remove("fa-spinner");
- spinner.classList.add("fa-check", "green");
+ const spinner = content.querySelector("fa-icon")!;
+ spinner.setIcon("check", true);
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
// set icon
previewIcon.className = previewIcon.className.replace(/\b(fa-[a-z0-9-]+)\b/, "");
+ // TODO: FA6
previewIcon.classList.add("fa-" + icon);
previewIcon.style.setProperty("color", iconColor, "");
previewIcon.style.setProperty("background-color", badgeColor, "");
UiDialog.setCallback(this, "onClose", () => this.onClose());
});
- const spinner = content.querySelector(".fa-spinner") as HTMLSpanElement;
- spinner.classList.remove("fa-spinner");
- spinner.classList.add("fa-check", "green");
+ const spinner = content.querySelector("fa-icon")!;
+ spinner.setIcon("check", true);
+ spinner.parentElement!.dataset.status = "success";
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
_ajaxFailure(): boolean {
const dialog = UiDialog.getDialog(this);
if (dialog !== undefined) {
- const spinner = dialog.content.querySelector(".fa-spinner") as HTMLSpanElement;
- spinner.classList.remove("fa-spinner");
- spinner.classList.add("fa-times", "red");
+ const spinner = dialog.content.querySelector("fa-icon")!;
+ spinner.setIcon("xmark", true);
+ spinner.parentElement!.dataset.status = "error";
}
return true;
if (container.classList.toggle("collapsed")) {
toggleButtons.forEach((toggleButton) => {
const title = toggleButton.dataset.titleExpand!;
- if (toggleButton.classList.contains("icon")) {
- toggleButton.classList.remove("fa-compress");
- toggleButton.classList.add("fa-expand");
+ const icon = toggleButton.querySelector("fa-icon");
+ if (icon) {
+ icon.setIcon("up-right-and-down-left-from-center", true);
toggleButton.title = title;
} else {
toggleButton.textContent = title;
} else {
toggleButtons.forEach((toggleButton) => {
const title = toggleButton.dataset.titleCollapse!;
- if (toggleButton.classList.contains("icon")) {
- toggleButton.classList.add("fa-compress");
- toggleButton.classList.remove("fa-expand");
+ const icon = toggleButton.querySelector("fa-icon");
+ if (icon) {
+ icon.setIcon("down-left-and-up-right-to-center", true);
toggleButton.title = title;
} else {
toggleButton.textContent = title;
<div class="codeBoxHeadline">{$title}{if $filename}: {$filename}{/if}</div>
{if !$isAmp && $lines > 10}
- <span class="toggleButton icon icon24 fa-expand jsTooltip pointer" title="{lang}wcf.bbcode.button.showAll{/lang}" data-title-collapse="{lang}wcf.bbcode.button.collapse{/lang}" data-title-expand="{lang}wcf.bbcode.button.showAll{/lang}" role="button" tabindex="0"></span>
+ <span class="toggleButton jsTooltip pointer" title="{lang}wcf.bbcode.button.showAll{/lang}" data-title-collapse="{lang}wcf.bbcode.button.collapse{/lang}" data-title-expand="{lang}wcf.bbcode.button.showAll{/lang}" role="button" tabindex="0">
+ {icon size=24 name='up-right-and-down-left-from-center' type='solid'}
+ </span>
{/if}
</div>
{* Unlike the frontend, this option must be defined in the ACP at all times. *}
var COMPILER_TARGET_DEFAULT = true;
</script>
+
+ <script src="{$__wcf->getPath()}js/WoltLabSuite/WebComponent/fa-brand.js"></script>
+ <script src="{$__wcf->getPath()}js/WoltLabSuite/WebComponent/fa-metadata.js"></script>
+ <script src="{$__wcf->getPath()}js/WoltLabSuite/WebComponent/fa-icon.js"></script>
{js application='wcf' file='require' bundle='WoltLabSuite.Core' core='true'}
{js application='wcf' file='require.config' bundle='WoltLabSuite.Core' core='true'}
<div id="workerContainer">
<header class="box48 contentHeader">
- {icon size=48 name='spinner' type='solid'}
+ <span class="workerStatusIcon">
+ {icon size=48 name='spinner' type='solid'}
+ </span>
<div>
<h1 class="contentTitle">{lang}wcf.global.worker.executing{/lang}</h1>
showCompletedDialog() {
const content = Dialog_1.default.getDialog(this).content;
content.querySelector("h1").textContent = Language.get("wcf.acp.dataImport.completed");
- const spinner = content.querySelector(".fa-spinner");
- spinner.classList.remove("fa-spinner");
- spinner.classList.add("fa-check", "green");
+ const spinner = content.querySelector("fa-icon");
+ spinner.setIcon("check", true);
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
formSubmit.innerHTML = `<button class="button buttonPrimary">${Language.get("wcf.global.button.next")}</button>`;
const previewIcon = badgeContainer.querySelector(".jsTrophyIcon");
// set icon
previewIcon.className = previewIcon.className.replace(/\b(fa-[a-z0-9-]+)\b/, "");
+ // TODO: FA6
previewIcon.classList.add("fa-" + icon);
previewIcon.style.setProperty("color", iconColor, "");
previewIcon.style.setProperty("background-color", badgeColor, "");
Dialog_1.default.setCallback(this, "onClose", () => {
Dialog_1.default.setCallback(this, "onClose", () => this.onClose());
});
- const spinner = content.querySelector(".fa-spinner");
- spinner.classList.remove("fa-spinner");
- spinner.classList.add("fa-check", "green");
+ const spinner = content.querySelector("fa-icon");
+ spinner.setIcon("check", true);
+ spinner.parentElement.dataset.status = "success";
const formSubmit = document.createElement("div");
formSubmit.className = "formSubmit";
formSubmit.innerHTML =
_ajaxFailure() {
const dialog = Dialog_1.default.getDialog(this);
if (dialog !== undefined) {
- const spinner = dialog.content.querySelector(".fa-spinner");
- spinner.classList.remove("fa-spinner");
- spinner.classList.add("fa-times", "red");
+ const spinner = dialog.content.querySelector("fa-icon");
+ spinner.setIcon("xmark", true);
+ spinner.parentElement.dataset.status = "error";
}
return true;
}
if (container.classList.toggle("collapsed")) {
toggleButtons.forEach((toggleButton) => {
const title = toggleButton.dataset.titleExpand;
- if (toggleButton.classList.contains("icon")) {
- toggleButton.classList.remove("fa-compress");
- toggleButton.classList.add("fa-expand");
+ const icon = toggleButton.querySelector("fa-icon");
+ if (icon) {
+ icon.setIcon("up-right-and-down-left-from-center", true);
toggleButton.title = title;
}
else {
else {
toggleButtons.forEach((toggleButton) => {
const title = toggleButton.dataset.titleCollapse;
- if (toggleButton.classList.contains("icon")) {
- toggleButton.classList.add("fa-compress");
- toggleButton.classList.remove("fa-expand");
+ const icon = toggleButton.querySelector("fa-icon");
+ if (icon) {
+ icon.setIcon("down-left-and-up-right-to-center", true);
toggleButton.title = title;
}
else {
font-style: normal;
font-weight: 400;
font-display: block !important;
- src: url("../font/fa-regular-400.woff2") format("woff2");
+ src: url("../font/fa-regular-400.woff2?v=6.1.2") format("woff2");
}
/* Font Awesome 6 Free: Solid */
font-style: normal;
font-weight: 900;
font-display: block !important;
- src: url("../font/fa-solid-900.woff2") format("woff2");
+ src: url("../font/fa-solid-900.woff2?v=6.1.2") format("woff2");
}
.icon {
fa-brand,
fa-icon {
align-items: center;
- display: flex;
+ display: inline-flex;
height: var(--icon-size);
justify-content: center;
width: calc(var(--icon-size) * 1.25);
}
}
-/* TODO: Default icon colors */
.icon {
&.green {
color: rgba(0, 153, 0, 1);
--- /dev/null
+.workerStatusIcon[data-status="error"] {
+ color: rgba(204, 0, 0, 1);
+}
+
+.workerStatusIcon[data-status="success"] {
+ color: rgba(0, 153, 0, 1);
+}