chore: de-bdify
This commit is contained in:
parent
06f2239b1a
commit
a79fb2718b
|
@ -106,7 +106,7 @@ function Validators({ themeLinks }: { themeLinks: string[]; }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BDThemeCardProps {
|
interface OtherThemeCardProps {
|
||||||
theme: UserThemeHeader;
|
theme: UserThemeHeader;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
onChange: (enabled: boolean) => void;
|
onChange: (enabled: boolean) => void;
|
||||||
|
@ -156,7 +156,7 @@ function UserCSSThemeCard({ theme, enabled, onChange, onDelete }: UserCSSCardPro
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BDThemeCard({ theme, enabled, onChange, onDelete }: BDThemeCardProps) {
|
function OtherThemeCard({ theme, enabled, onChange, onDelete }: OtherThemeCardProps) {
|
||||||
return (
|
return (
|
||||||
<AddonCard
|
<AddonCard
|
||||||
name={theme.name}
|
name={theme.name}
|
||||||
|
@ -264,7 +264,7 @@ function ThemesTab() {
|
||||||
} else {
|
} else {
|
||||||
// presumably BD but could also be plain css
|
// presumably BD but could also be plain css
|
||||||
themeInfo.push({
|
themeInfo.push({
|
||||||
type: "bd",
|
type: "other",
|
||||||
header: getThemeInfo(stripBOM(content), fileName)
|
header: getThemeInfo(stripBOM(content), fileName)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -365,8 +365,8 @@ function ThemesTab() {
|
||||||
|
|
||||||
<div className={cl("grid")}>
|
<div className={cl("grid")}>
|
||||||
{userThemes?.map(({ type, header: theme }: ThemeHeader) => (
|
{userThemes?.map(({ type, header: theme }: ThemeHeader) => (
|
||||||
type === "bd" ? (
|
type === "other" ? (
|
||||||
<BDThemeCard
|
<OtherThemeCard
|
||||||
key={theme.fileName}
|
key={theme.fileName}
|
||||||
enabled={settings.enabledThemes.includes(theme.fileName)}
|
enabled={settings.enabledThemes.includes(theme.fileName)}
|
||||||
onChange={enabled => onLocalThemeChange(theme.fileName, enabled)}
|
onChange={enabled => onLocalThemeChange(theme.fileName, enabled)}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import type { UserstyleHeader } from "usercss-meta";
|
||||||
import type { UserThemeHeader } from "./bd";
|
import type { UserThemeHeader } from "./bd";
|
||||||
|
|
||||||
export type ThemeHeader = {
|
export type ThemeHeader = {
|
||||||
type: "bd";
|
type: "other";
|
||||||
header: UserThemeHeader;
|
header: UserThemeHeader;
|
||||||
} | {
|
} | {
|
||||||
type: "usercss";
|
type: "usercss";
|
||||||
|
|
Loading…
Reference in a new issue