@@ -20,7 +20,7 @@ import { IEditorOpenContext, IEditorSerializer, IUntypedEditorInput } from '../.
20
20
import { EditorInput } from '../../../common/editor/editorInput.js' ;
21
21
import { IUserDataProfilesEditor } from '../common/userDataProfile.js' ;
22
22
import { IEditorGroup } from '../../../services/editor/common/editorGroupsService.js' ;
23
- import { defaultUserDataProfileIcon , IProfileTemplateInfo , IUserDataProfileService , PROFILE_FILTER } from '../../../services/userDataProfile/common/userDataProfile.js' ;
23
+ import { defaultUserDataProfileIcon , IProfileTemplateInfo , IUserDataProfileManagementService , IUserDataProfileService , PROFILE_FILTER } from '../../../services/userDataProfile/common/userDataProfile.js' ;
24
24
import { Orientation , Sizing , SplitView } from '../../../../base/browser/ui/splitview/splitview.js' ;
25
25
import { Button , ButtonBar , ButtonWithDropdown } from '../../../../base/browser/ui/button/button.js' ;
26
26
import { defaultButtonStyles , defaultCheckboxStyles , defaultInputBoxStyles , defaultSelectBoxStyles , getInputBoxStyle , getListStyles } from '../../../../platform/theme/browser/defaultStyles.js' ;
@@ -71,6 +71,7 @@ import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js'
71
71
import { DropdownMenuActionViewItem } from '../../../../base/browser/ui/dropdown/dropdownActionViewItem.js' ;
72
72
73
73
const editIcon = registerIcon ( 'profiles-editor-edit-folder' , Codicon . edit , localize ( 'editIcon' , 'Icon for the edit folder icon in the profiles editor.' ) ) ;
74
+ const removeIcon = registerIcon ( 'profiles-editor-remove-folder' , Codicon . close , localize ( 'removeIcon' , 'Icon for the remove folder icon in the profiles editor.' ) ) ;
74
75
75
76
export const profilesSashBorder = registerColor ( 'profiles.sashBorder' , PANEL_BORDER , localize ( 'profilesSashBorder' , "The color of the Profiles editor splitview sash border." ) ) ;
76
77
@@ -1569,8 +1570,8 @@ class ProfileWorkspacesRenderer extends ProfilePropertyRenderer {
1569
1570
label : '' ,
1570
1571
tooltip : '' ,
1571
1572
weight : 1 ,
1572
- minimumWidth : 60 ,
1573
- maximumWidth : 60 ,
1573
+ minimumWidth : 84 ,
1574
+ maximumWidth : 84 ,
1574
1575
templateId : WorkspaceUriActionsColumnRenderer . TEMPLATE_ID ,
1575
1576
project ( row : WorkspaceTableElement ) : WorkspaceTableElement { return row ; }
1576
1577
} ,
@@ -2138,6 +2139,7 @@ class WorkspaceUriActionsColumnRenderer implements ITableRenderer<WorkspaceTable
2138
2139
2139
2140
constructor (
2140
2141
@IUserDataProfilesService private readonly userDataProfilesService : IUserDataProfilesService ,
2142
+ @IUserDataProfileManagementService private readonly userDataProfileManagementService : IUserDataProfileManagementService ,
2141
2143
@IContextMenuService private readonly contextMenuService : IContextMenuService ,
2142
2144
@IUriIdentityService private readonly uriIdentityService : IUriIdentityService ,
2143
2145
) {
@@ -2167,6 +2169,7 @@ class WorkspaceUriActionsColumnRenderer implements ITableRenderer<WorkspaceTable
2167
2169
const actions : IAction [ ] = [ ] ;
2168
2170
actions . push ( this . createOpenAction ( item ) ) ;
2169
2171
actions . push ( new ChangeProfileAction ( item , this . userDataProfilesService ) ) ;
2172
+ actions . push ( this . createDeleteAction ( item ) ) ;
2170
2173
templateData . actionBar . push ( actions , { icon : true } ) ;
2171
2174
}
2172
2175
@@ -2181,6 +2184,17 @@ class WorkspaceUriActionsColumnRenderer implements ITableRenderer<WorkspaceTable
2181
2184
} ;
2182
2185
}
2183
2186
2187
+ private createDeleteAction ( item : WorkspaceTableElement ) : IAction {
2188
+ return {
2189
+ label : '' ,
2190
+ class : ThemeIcon . asClassName ( removeIcon ) ,
2191
+ enabled : this . userDataProfileManagementService . getDefaultProfileToUse ( ) . id !== item . profileElement . profile . id ,
2192
+ id : 'deleteTrustedUri' ,
2193
+ tooltip : localize ( 'deleteTrustedUri' , "Delete Path" ) ,
2194
+ run : ( ) => item . profileElement . updateWorkspaces ( [ ] , [ item . workspace ] )
2195
+ } ;
2196
+ }
2197
+
2184
2198
disposeTemplate ( templateData : IActionsColumnTemplateData ) : void {
2185
2199
templateData . disposables . dispose ( ) ;
2186
2200
}
0 commit comments