Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
496 changes: 496 additions & 0 deletions com.woltlab.wcf/fileDelete.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions extra/update-font-awesome-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ switch (outputFormat) {
${JSON.stringify(values)}
);

window.getFontAwesome6Metadata = () => {
window.getFontAwesome7Metadata = () => {
return new Map(metadata);
};

window.getFontAwesome6IconMetadata = (name) => {
window.getFontAwesome7IconMetadata = (name) => {
return metadata.get(aliases.get(name) || name);
};
})();\n`;
Expand Down
2 changes: 1 addition & 1 deletion ts/WoltLabSuite/Core/Ui/Style/FontAwesome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class UiStyleFontAwesome implements DialogCallbackObject {
this.iconList = document.getElementById("fontAwesomeIcons") as HTMLElement;

const icons: string[] = [];
window.getFontAwesome6Metadata().forEach(([, hasRegular], name) => {
window.getFontAwesome7Metadata().forEach(([, hasRegular], name) => {
if (hasRegular) {
icons.push(`<li><fa-icon size="48" name="${name}" solid></fa-icon><small>${name}</small></li>`);
}
Expand Down
24 changes: 12 additions & 12 deletions ts/WoltLabSuite/WebComponent/fa-icon.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
(() => {
let isFA6Free: boolean;
function isFontAwesome6Free(): boolean {
if (isFA6Free === undefined) {
isFA6Free = true;
let isFA7Free: boolean;
function isFontAwesome7Free(): boolean {
if (isFA7Free === undefined) {
isFA7Free = true;

const iconFont = window.getComputedStyle(document.documentElement).getPropertyValue("--fa-font-family");
if (iconFont === "Font Awesome 6 Pro") {
isFA6Free = false;
if (iconFont === "Font Awesome 7 Pro") {
isFA7Free = false;
}
}

return isFA6Free;
return isFA7Free;
}

type IconSize = number;
Expand Down Expand Up @@ -83,14 +83,14 @@
}

private isValidIconName(name: string | null): boolean {
return name !== null && window.getFontAwesome6IconMetadata(name) !== undefined;
return name !== null && window.getFontAwesome7IconMetadata(name) !== undefined;
}

private hasNonSolidStyle(name: string): boolean {
if (isFontAwesome6Free()) {
const [, hasRegularVariant] = window.getFontAwesome6IconMetadata(name)!;
if (isFontAwesome7Free()) {
const [, hasRegularVariant] = window.getFontAwesome7IconMetadata(name)!;
if (!hasRegularVariant) {
// Font Awesome 6 Free only includes solid icons with the
// Font Awesome 7 Free only includes solid icons with the
// the exception to some special icons that use the weight
// to differentiate two related icons. One such example is
// the `bell` icon that comes in `solid` and `regular` flavor.
Expand All @@ -116,7 +116,7 @@
if (this.name === "spinner") {
root.append(this.createSpinner());
} else {
const [codepoint] = window.getFontAwesome6IconMetadata(this.name)!;
const [codepoint] = window.getFontAwesome7IconMetadata(this.name)!;
root.append(codepoint);
}
}
Expand Down
8 changes: 4 additions & 4 deletions ts/WoltLabSuite/WebComponent/fa-metadata.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ts/WoltLabSuite/WebComponent/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare global {
};
TIME_NOW: number;

getFontAwesome6IconMetadata: (name: string) => IconMetadata | undefined;
getFontAwesome7IconMetadata: (name: string) => IconMetadata | undefined;

HTMLParsedElement: HTMLParsedElement;
WoltLabLanguage: typeof Language;
Expand Down
4 changes: 2 additions & 2 deletions ts/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ declare global {
WSC_API_URL: string;
WSC_RPC_API_URL: string;

getFontAwesome6Metadata: () => Map<string, IconMetadata>;
getFontAwesome6IconMetadata: (name: string) => IconMetadata | undefined;
getFontAwesome7Metadata: () => Map<string, IconMetadata>;
getFontAwesome7IconMetadata: (name: string) => IconMetadata | undefined;

jQuery: JQueryStatic;
WCF: any;
Expand Down
Binary file modified wcfsetup/install/files/font/fa-regular-400.woff2
Binary file not shown.
Binary file modified wcfsetup/install/files/font/fa-solid-900.woff2
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion wcfsetup/install/files/icon/font-awesome/v6/brands/adn.svg

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading