style: format code and apply clippy lint fixes

This commit is contained in:
YoVinchen
2026-02-04 10:44:45 +08:00
parent e65360e68a
commit 4b18c232f4
24 changed files with 131 additions and 122 deletions
+4 -1
View File
@@ -8,7 +8,10 @@ interface AppCountBarProps {
counts: Record<AppId, number>;
}
export const AppCountBar: React.FC<AppCountBarProps> = ({ totalLabel, counts }) => {
export const AppCountBar: React.FC<AppCountBarProps> = ({
totalLabel,
counts,
}) => {
return (
<div className="flex-shrink-0 py-4 glass rounded-xl border border-white/10 mb-4 px-6 flex items-center justify-between gap-4">
<Badge variant="outline" className="bg-background/50 h-7 px-3">
+9 -5
View File
@@ -12,7 +12,10 @@ interface AppToggleGroupProps {
onToggle: (app: AppId, enabled: boolean) => void;
}
export const AppToggleGroup: React.FC<AppToggleGroupProps> = ({ apps, onToggle }) => {
export const AppToggleGroup: React.FC<AppToggleGroupProps> = ({
apps,
onToggle,
}) => {
return (
<div className="flex items-center gap-1.5 flex-shrink-0">
{APP_IDS.map((app) => {
@@ -25,16 +28,17 @@ export const AppToggleGroup: React.FC<AppToggleGroupProps> = ({ apps, onToggle }
type="button"
onClick={() => onToggle(app, !enabled)}
className={`w-7 h-7 rounded-lg flex items-center justify-center transition-all ${
enabled
? activeClass
: "opacity-35 hover:opacity-70"
enabled ? activeClass : "opacity-35 hover:opacity-70"
}`}
>
{icon}
</button>
</TooltipTrigger>
<TooltipContent side="bottom">
<p>{label}{enabled ? " ✓" : ""}</p>
<p>
{label}
{enabled ? " ✓" : ""}
</p>
</TooltipContent>
</Tooltip>
);
+4 -1
View File
@@ -5,7 +5,10 @@ interface ListItemRowProps {
children: React.ReactNode;
}
export const ListItemRow: React.FC<ListItemRowProps> = ({ isLast, children }) => {
export const ListItemRow: React.FC<ListItemRowProps> = ({
isLast,
children,
}) => {
return (
<div
className={`group flex items-center gap-3 px-4 py-2.5 hover:bg-muted/50 transition-colors ${