Skip to content

Commit b0881de

Browse files
improvement(lock): lock icon next to entity (#4401)
1 parent 9eb55e2 commit b0881de

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/folder-item/folder-item.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { generateId } from '@sim/utils/id'
66
import clsx from 'clsx'
77
import { ChevronRight, Folder, FolderOpen, MoreHorizontal } from 'lucide-react'
88
import { useParams, useRouter } from 'next/navigation'
9+
import { Lock } from '@/components/emcn/icons'
910
import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types'
1011
import { getNextWorkflowColor } from '@/lib/workflows/colors'
1112
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
@@ -550,6 +551,12 @@ export function FolderItem({
550551
>
551552
{folder.name}
552553
</span>
554+
{folder.locked && (
555+
<Lock
556+
className='h-[12px] w-[12px] flex-shrink-0 pointer-events-none text-[var(--text-icon)]'
557+
aria-label='Folder is locked'
558+
/>
559+
)}
553560
<button
554561
type='button'
555562
aria-label='Folder options'

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/workflow-item.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import clsx from 'clsx'
55
import { MoreHorizontal } from 'lucide-react'
66
import Link from 'next/link'
77
import { useParams } from 'next/navigation'
8+
import { Lock } from '@/components/emcn/icons'
89
import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types'
910
import { workflowBorderColor } from '@/lib/workspaces/colors'
1011
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
@@ -467,6 +468,12 @@ export function WorkflowItem({
467468
{workflow.name}
468469
</div>
469470
)}
471+
{!isEditing && workflow.locked && (
472+
<Lock
473+
className='h-[12px] w-[12px] flex-shrink-0 pointer-events-none text-[var(--text-icon)]'
474+
aria-label='Workflow is locked'
475+
/>
476+
)}
470477
{!isEditing && <Avatars workflowId={workflow.id} />}
471478
</div>
472479
</div>

0 commit comments

Comments
 (0)