fix: resolve lint warnings/errors and apply formatting (#1024)
* fix: resolve lint warnings/errors and apply formatting Fix 10 oxlint issues (2 errors, 8 warnings): - Remove unused catch parameters in Security.tsx and ImportDialog.tsx - Remove stray expression in Generator.tsx - Add eslint-disable for debounced useCallback in FilterControl.tsx - Remove unnecessary deps (resolveDB, store) in bindStoreToDevice.ts - Prefix unused variant param in AppSidebar.tsx - Memoize tabs arrays in DeviceConfig, RadioConfig, ModuleConfig - Fix channels type in RadioConfig TabItem Also applies oxfmt formatting across all files. * updating lock file * update protobuf package * fix: regenerate pnpm-lock.yaml and exclude jsr protobufs from minimumReleaseAge * prevented http card from always being polled * updated pnpm config fiile * updated actions * removed biome config and lint system leftovers * updating protobuf package
This commit is contained in:
@@ -2,11 +2,7 @@ import type { LucideIcon } from "lucide-react";
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import type * as React from "react";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
Collapsible,
|
||||
CollapsibleContent,
|
||||
CollapsibleTrigger,
|
||||
} from "@/components/ui/collapsible";
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
@@ -60,7 +56,7 @@ const AppSidebar = ({
|
||||
navigationLabel,
|
||||
items,
|
||||
footer,
|
||||
variant,
|
||||
variant: _variant,
|
||||
...props
|
||||
}: SidebarSectionProps & AppSidebarProps) => {
|
||||
const { state } = useSidebar();
|
||||
@@ -69,17 +65,11 @@ const AppSidebar = ({
|
||||
return (
|
||||
<Sidebar collapsible="icon" variant="sidebar" {...props}>
|
||||
<SidebarHeader
|
||||
className={cn(
|
||||
"h-14 mt-2 flex-shrink-0 transition-all duration-300 ease-in-out",
|
||||
)}
|
||||
className={cn("h-14 mt-2 flex-shrink-0 transition-all duration-300 ease-in-out")}
|
||||
>
|
||||
<div className="flex items-center">
|
||||
{logo && (
|
||||
<img
|
||||
src={logo.src}
|
||||
alt={logo.alt}
|
||||
className="size-10 flex-shrink-0 rounded-xl"
|
||||
/>
|
||||
<img src={logo.src} alt={logo.alt} className="size-10 flex-shrink-0 rounded-xl" />
|
||||
)}
|
||||
{title && (
|
||||
<h2
|
||||
@@ -150,19 +140,16 @@ const AppSidebar = ({
|
||||
onClick={subLink.onClick}
|
||||
isActive={subLink.active}
|
||||
>
|
||||
{subLink.icon && (
|
||||
<subLink.icon className="size-4" />
|
||||
)}
|
||||
{subLink.icon && <subLink.icon className="size-4" />}
|
||||
<span>{subLink.name}</span>
|
||||
{subLink.count !== undefined &&
|
||||
subLink.count > 0 && (
|
||||
<Badge
|
||||
variant="default"
|
||||
className="ml-auto bg-blue-500 text-white text-xs"
|
||||
>
|
||||
{subLink.count}
|
||||
</Badge>
|
||||
)}
|
||||
{subLink.count !== undefined && subLink.count > 0 && (
|
||||
<Badge
|
||||
variant="default"
|
||||
className="ml-auto bg-blue-500 text-white text-xs"
|
||||
>
|
||||
{subLink.count}
|
||||
</Badge>
|
||||
)}
|
||||
</SidebarMenuSubButton>
|
||||
</SidebarMenuSubItem>
|
||||
))}
|
||||
@@ -184,10 +171,7 @@ const AppSidebar = ({
|
||||
{link.icon && <link.icon className="size-5" />}
|
||||
<span>{link.name}</span>
|
||||
{link.count !== undefined && link.count > 0 && (
|
||||
<Badge
|
||||
variant="default"
|
||||
className="ml-auto bg-blue-500 text-white text-xs"
|
||||
>
|
||||
<Badge variant="default" className="ml-auto bg-blue-500 text-white text-xs">
|
||||
{link.count}
|
||||
</Badge>
|
||||
)}
|
||||
@@ -200,11 +184,7 @@ const AppSidebar = ({
|
||||
</SidebarGroup>
|
||||
|
||||
{children && (
|
||||
<div
|
||||
className={cn("flex-1 min-h-0", isCollapsed && "overflow-hidden")}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
<div className={cn("flex-1 min-h-0", isCollapsed && "overflow-hidden")}>{children}</div>
|
||||
)}
|
||||
</SidebarContent>
|
||||
|
||||
|
||||
@@ -21,15 +21,9 @@ export function ThemeToggle() {
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem onClick={() => setTheme("light")}>
|
||||
Light
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => setTheme("dark")}>
|
||||
Dark
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => setTheme("system")}>
|
||||
System
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => setTheme("light")}>Light</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => setTheme("dark")}>Dark</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => setTheme("system")}>System</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user