Add BxIconRaw tyoe

This commit is contained in:
redphx
2024-12-23 06:26:16 +07:00
parent 03b7c7358e
commit fc5219705c
8 changed files with 35 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ import { BxEvent } from "@utils/bx-event";
import { CE, createSvgIcon, humanFileSize } from "@utils/html";
import { STATES } from "@utils/global";
import { BxLogger } from "@/utils/bx-logger";
import { BxIcon } from "@/utils/bx-icon";
import { BxIcon, type BxIconRaw } from "@/utils/bx-icon";
import { GuideMenuTab } from "../ui/guide-menu";
import { StreamStatsCollector } from "@/utils/stream-stats-collector";
import { StreamStat } from "@/enums/pref-values";
@@ -14,7 +14,7 @@ import { StreamStat } from "@/enums/pref-values";
type StreamBadgeInfo = {
name: string,
$element?: HTMLElement,
icon: typeof BxIcon,
icon: BxIconRaw,
color: string,
};

View File

@@ -1,6 +1,6 @@
import { STATES } from "@utils/global.ts";
import { createSvgIcon } from "@utils/html.ts";
import { BxIcon } from "@utils/bx-icon";
import { BxIcon, type BxIconRaw } from "@utils/bx-icon";
import { t } from "@utils/translation.ts";
import { StreamBadges } from "./stream-badges.ts";
import { StreamStats } from "./stream-stats.ts";
@@ -15,7 +15,7 @@ export class StreamUiHandler {
private static $btnHome: HTMLElement | null | undefined;
private static observer: MutationObserver | undefined;
private static cloneStreamHudButton($btnOrg: HTMLElement, label: string, svgIcon: typeof BxIcon): HTMLElement | null {
private static cloneStreamHudButton($btnOrg: HTMLElement, label: string, svgIcon: BxIconRaw): HTMLElement | null {
if (!$btnOrg) {
return null;
}
@@ -78,7 +78,7 @@ export class StreamUiHandler {
return $container;
}
private static cloneCloseButton($btnOrg: HTMLElement, icon: typeof BxIcon, className: string, onChange: any): HTMLElement | null {
private static cloneCloseButton($btnOrg: HTMLElement, icon: BxIconRaw, className: string, onChange: any): HTMLElement | null {
if (!$btnOrg) {
return null;
}

View File

@@ -7,7 +7,7 @@ import { SoundShortcut } from "@/modules/shortcuts/sound-shortcut";
import { StreamStats } from "@/modules/stream/stream-stats";
import { TouchController } from "@/modules/touch-controller";
import { BxEvent } from "@/utils/bx-event";
import { BxIcon } from "@/utils/bx-icon";
import { BxIcon, type BxIconRaw } from "@/utils/bx-icon";
import { STATES, AppInterface, deepClone, SCRIPT_VERSION, STORAGE, SCRIPT_VARIANT } from "@/utils/global";
import { t, Translations } from "@/utils/translation";
import { BxSelectElement } from "@/web-components/bx-select";
@@ -65,7 +65,7 @@ type SettingTabSection = {
};
type SettingTab = {
icon: SVGElement;
icon: BxIconRaw;
group: SettingTabGroup,
items: Array<SettingTabSection | HTMLElement | false> | (() => Array<SettingTabSection | false>);
requiredVariants?: BuildVariant | Array<BuildVariant>;