mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-04 23:02:12 +00:00
feat(ui): swap sidebar icons to react-icons (Ionicons) (#1320)
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
This commit is contained in:
parent
32ec9b485f
commit
9f6ccd7382
3 changed files with 5213 additions and 15 deletions
|
|
@ -29,6 +29,7 @@
|
||||||
"nitro": "latest",
|
"nitro": "latest",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.4",
|
||||||
|
"react-icons": "^5.6.0",
|
||||||
"shadcn": "^4.7.0",
|
"shadcn": "^4.7.0",
|
||||||
"tailwind-merge": "^3.6.0",
|
"tailwind-merge": "^3.6.0",
|
||||||
"tailwindcss": "^4.2.1",
|
"tailwindcss": "^4.2.1",
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
import { Link, useNavigate } from "@tanstack/react-router";
|
import { Link, useNavigate } from "@tanstack/react-router";
|
||||||
import { useQueryClient } from "@tanstack/react-query";
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
import {
|
import {
|
||||||
CloudIcon,
|
IoCloudOutline,
|
||||||
GearSixIcon,
|
IoExtensionPuzzleOutline,
|
||||||
PlugsIcon,
|
IoGitPullRequestOutline,
|
||||||
ShieldCheckIcon,
|
IoLogOutOutline,
|
||||||
SignOutIcon,
|
IoOptionsOutline,
|
||||||
SlidersHorizontalIcon,
|
IoSettingsOutline,
|
||||||
} from "@phosphor-icons/react";
|
} from "react-icons/io5";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import type {ComponentType} from "react";
|
import type {ComponentType, SVGProps} from "react";
|
||||||
|
|
||||||
import type { SessionUser } from "@/lib/api";
|
import type { SessionUser } from "@/lib/api";
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||||
import { api } from "@/lib/api";
|
import { api } from "@/lib/api";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
type IconType = ComponentType<{ className?: string; weight?: "regular" | "fill" | "duotone" }>;
|
type IconType = ComponentType<SVGProps<SVGSVGElement>>;
|
||||||
|
|
||||||
interface NavItem {
|
interface NavItem {
|
||||||
to: string;
|
to: string;
|
||||||
|
|
@ -26,11 +26,11 @@ interface NavItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
const NAV: Array<NavItem> = [
|
const NAV: Array<NavItem> = [
|
||||||
{ to: "/my-settings", label: "My Settings", icon: SlidersHorizontalIcon },
|
{ to: "/my-settings", label: "My Settings", icon: IoOptionsOutline },
|
||||||
{ to: "/cloud-agents", label: "Cloud Agents", icon: CloudIcon },
|
{ to: "/cloud-agents", label: "Cloud Agents", icon: IoCloudOutline },
|
||||||
{ to: "/review", label: "Open SWE Review", icon: ShieldCheckIcon },
|
{ to: "/review", label: "Open SWE Review", icon: IoGitPullRequestOutline },
|
||||||
{ to: "/integrations", label: "Integrations", icon: PlugsIcon },
|
{ to: "/integrations", label: "Integrations", icon: IoExtensionPuzzleOutline },
|
||||||
{ to: "/admin", label: "Admin", icon: GearSixIcon, adminOnly: true },
|
{ to: "/admin", label: "Admin", icon: IoSettingsOutline, adminOnly: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
export function AppSidebar({ user }: { user: SessionUser }) {
|
export function AppSidebar({ user }: { user: SessionUser }) {
|
||||||
|
|
@ -130,7 +130,7 @@ export function AppSidebar({ user }: { user: SessionUser }) {
|
||||||
onClick={() => void onLogout()}
|
onClick={() => void onLogout()}
|
||||||
className="flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs/relaxed hover:bg-muted"
|
className="flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs/relaxed hover:bg-muted"
|
||||||
>
|
>
|
||||||
<SignOutIcon className="size-3.5" />
|
<IoLogOutOutline className="size-3.5" />
|
||||||
Sign out
|
Sign out
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
5197
ui/yarn.lock
Normal file
5197
ui/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue