Skip to content

Commit

Permalink
enhance: agent delete & access control icons (#1260)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyjeong13 authored Jan 15, 2025
1 parent d4bf5cf commit 5cf53ab
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
8 changes: 6 additions & 2 deletions ui/admin/app/components/agent/AgentAccessControl.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { EyeIcon } from "lucide-react";
import useSWR from "swr";

import { Agent } from "~/lib/model/agents";
import { UserService } from "~/lib/service/api/userService";
import { assetUrl } from "~/lib/utils/assetUrl";

import { UserAuthorizationSelect } from "~/components/agent/UserAuthorizationSelect";
import { LoadingSpinner } from "~/components/ui/LoadingSpinner";
Expand Down Expand Up @@ -37,7 +37,11 @@ export function AgentAccessControl({ agent }: AgentAccessControlProps) {
<TooltipTrigger asChild>
<DialogTrigger asChild>
<Button variant="ghost" size="icon">
<EyeIcon />
<img
src={assetUrl("/assets/user_lock.svg")}
alt="User Permissions Icon"
className="h-4 w-4 dark:invert"
/>
</Button>
</DialogTrigger>
</TooltipTrigger>
Expand Down
4 changes: 2 additions & 2 deletions ui/admin/app/components/agent/AgentAlias.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ConsumptionUrl } from "~/lib/routers/baseRouter";
import { AssistantApiService } from "~/lib/service/api/assistantApiService";

import { AgentAccessControl } from "~/components/agent/AgentAccessControl";
import { AgentDropdownActions } from "~/components/agent/AgentDropdownActions";
import { DeleteAgent } from "~/components/agent/DeleteAgent";
import { Publish } from "~/components/agent/Publish";
import { CopyText } from "~/components/composed/CopyText";
import { WarningAlert } from "~/components/composed/WarningAlert";
Expand Down Expand Up @@ -73,7 +73,7 @@ export function AgentAlias({ agent, onChange }: AgentAliasProps) {

<div className="flex gap-2">
<AgentAccessControl agent={agent} />
<AgentDropdownActions agent={agent} />
<DeleteAgent id={agent.id} />
</div>
</div>
{conflictingAlias && (
Expand Down
36 changes: 36 additions & 0 deletions ui/admin/public/assets/user_lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5cf53ab

Please sign in to comment.