mirror of
https://github.com/hex248/sprint.git
synced 2026-02-07 18:23:03 +00:00
made "pixel" the default icon style
This commit is contained in:
@@ -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} />
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user