made "pixel" the default icon style

This commit is contained in:
2026-01-27 21:38:42 +00:00
parent 5a8f7a8f40
commit a4a9775779
6 changed files with 950 additions and 12 deletions

View File

@@ -24,7 +24,7 @@ function Account({ trigger }: { trigger?: ReactNode }) {
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const [avatarURL, setAvatarUrl] = useState<string | null>(null);
const [iconPreference, setIconPreference] = useState<IconStyle>("lucide");
const [iconPreference, setIconPreference] = useState<IconStyle>("pixel");
const [error, setError] = useState("");
const [submitAttempted, setSubmitAttempted] = useState(false);
@@ -34,7 +34,7 @@ function Account({ trigger }: { trigger?: ReactNode }) {
setName(currentUser.name);
setUsername(currentUser.username);
setAvatarUrl(currentUser.avatarURL || null);
setIconPreference((currentUser.iconPreference as IconStyle) ?? "lucide");
setIconPreference((currentUser.iconPreference as IconStyle) ?? "pixel");
setPassword("");
setError("");
@@ -136,18 +136,18 @@ function Account({ trigger }: { trigger?: ReactNode }) {
<SelectValue />
</SelectTrigger>
<SelectContent position="popper" side="bottom" align="start">
<SelectItem value="lucide">
<div className="flex items-center gap-2">
<Icon icon="sun" iconStyle="lucide" size={16} />
Lucide
</div>
</SelectItem>
<SelectItem value="pixel">
<div className="flex items-center gap-2">
<Icon icon="sun" iconStyle="pixel" size={16} />
Pixel
</div>
</SelectItem>
<SelectItem value="lucide">
<div className="flex items-center gap-2">
<Icon icon="sun" iconStyle="lucide" size={16} />
Lucide
</div>
</SelectItem>
<SelectItem value="phosphor">
<div className="flex items-center gap-2">
<Icon icon="sun" iconStyle="phosphor" size={16} />

View File

@@ -208,7 +208,7 @@ const icons = {
export type IconName = keyof typeof icons;
export const iconNames = Object.keys(icons) as IconName[];
export const iconStyles = ["lucide", "pixel", "phosphor"] as const;
export const iconStyles = ["pixel", "lucide", "phosphor"] as const;
export type { IconStyle };
export default function Icon({
@@ -227,7 +227,7 @@ export default function Icon({
const resolvedStyle = (iconStyle ??
session?.user?.iconPreference ??
localStorage.getItem("iconPreference") ??
"lucide") as IconStyle;
"pixel") as IconStyle;
const IconComponent = icons[icon]?.[resolvedStyle];
if (localStorage.getItem("iconPreference") !== resolvedStyle)