File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/features/instance/applications/components Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 11import { RestartButton } from '@/components/RestartButton' ;
22import { Button } from '@/components/ui/button' ;
3+ import { Tooltip , TooltipContent , TooltipTrigger } from '@/components/ui/tooltip' ;
34import { useInstanceClientIdParams } from '@/config/useInstanceClient' ;
45import { newApplication } from '@/features/instance/applications/components/ApplicationsSidebar/specialItems' ;
56import { useEditorFileContent } from '@/features/instance/applications/context/editorFileContent' ;
@@ -12,6 +13,7 @@ import {
1213 DownloadIcon ,
1314 FileIcon ,
1415 FolderIcon ,
16+ LockIcon ,
1517 PackageIcon ,
1618 PanelRightCloseIcon ,
1719 PanelRightOpenIcon ,
@@ -62,6 +64,28 @@ export function ContentActions({ toggledSidebar, toggleSidebar }: {
6264
6365 { openedEntry && openedEntry ?. path !== newApplication && ( < >
6466
67+ { openedEntry . package && < Tooltip >
68+ < TooltipTrigger asChild >
69+ < Button variant = "ghost" type = "button" className = "cursor-help" >
70+ < LockIcon width = { 16 } height = { 16 } />
71+ < span className = "hidden md:inline-block" >
72+ Imported applications are read-only
73+ </ span >
74+ </ Button >
75+ </ TooltipTrigger >
76+ < TooltipContent >
77+ { restrictPackageModification
78+ ? < >
79+ This application is read-only, and cannot be modified.< br />
80+ It helps govern clustering amongst your instances.
81+ </ >
82+ : < >
83+ This application is read-only, and cannot be directly modified. But you can re-deploy or remove it.
84+ </ >
85+ }
86+ </ TooltipContent >
87+ </ Tooltip > }
88+
6589 { ! isDirectory ( openedEntry ) && ! openedEntry . package && canManageBrowseInstance && < Button
6690 variant = "default"
6791 className = "rounded-none"
You can’t perform that action at this time.
0 commit comments