@@ -202,6 +202,13 @@ export class EditorGroupWatermark extends Disposable {
202
202
const openFolderButton = append ( container , $ ( 'button.open-folder-button' ) ) ;
203
203
openFolderButton . textContent = localize ( 'watermark.openFolder' , "Open Folder" ) ;
204
204
205
+ // Add click handler for Open Folder button
206
+ this . _register ( addDisposableListener ( openFolderButton , EventType . CLICK , ( e : MouseEvent ) => {
207
+ e . preventDefault ( ) ;
208
+ e . stopPropagation ( ) ;
209
+ this . commandService . executeCommand ( 'workbench.action.files.openFolder' ) ;
210
+ } ) ) ;
211
+
205
212
// Add recent list
206
213
const recentList = append ( container , $ ( '.recent-list' ) ) ;
207
214
@@ -235,27 +242,22 @@ export class EditorGroupWatermark extends Disposable {
235
242
windowOpenable = { workspaceUri : recent . workspace . configPath } ;
236
243
}
237
244
238
- // Split the label into name and path
239
245
const { name, parentPath } = splitRecentLabel ( fullPath ) ;
240
246
241
- // Create the item content with name and path
242
- const nameElement = append ( itemElement , $ ( '.name' ) ) ;
243
- nameElement . textContent = name ;
244
-
247
+ itemElement . textContent = name ;
245
248
if ( parentPath ) {
246
- const pathElement = append ( itemElement , $ ( '.path' ) ) ;
247
- pathElement . textContent = parentPath ;
249
+ append ( itemElement , $ ( 'span.spacer' ) ) ;
250
+ const pathSpan = append ( itemElement , $ ( 'span.path' ) ) ;
251
+ pathSpan . textContent = parentPath ;
248
252
}
249
253
250
254
itemElement . title = fullPath ;
251
-
252
- // Add click handler
253
255
itemElement . style . cursor = 'pointer' ;
256
+
254
257
this . _register ( addDisposableListener ( itemElement , EventType . CLICK , async ( e : MouseEvent ) => {
255
258
try {
256
259
e . preventDefault ( ) ;
257
260
e . stopPropagation ( ) ;
258
-
259
261
await this . hostService . openWindow ( [ windowOpenable ] , {
260
262
forceNewWindow : e . ctrlKey || e . metaKey ,
261
263
remoteAuthority : recent . remoteAuthority ?? null
@@ -267,17 +269,15 @@ export class EditorGroupWatermark extends Disposable {
267
269
} ) ;
268
270
269
271
// Add "More..." item
270
- const moreItem = append ( recentList , $ ( '.recent-item. more-item' ) ) ;
272
+ const moreItem = append ( recentList , $ ( '.more-item' ) ) ;
271
273
moreItem . textContent = localize ( 'watermark.more' , "More..." ) ;
272
- moreItem . title = localize ( 'watermark.showMoreRecents' , "Show All Recent Folders" ) ;
273
- moreItem . style . cursor = 'pointer' ;
274
274
275
- // Get keybinding for OpenRecentAction if available
276
275
const keybinding = this . keybindingService . lookupKeybinding ( 'workbench.action.openRecent' ) ?. getLabel ( ) ;
277
- if ( keybinding ) {
278
- moreItem . title += ` ( ${ keybinding } )` ;
279
- }
276
+ moreItem . title = keybinding ?
277
+ localize ( 'watermark.showMoreRecents' , "Show All Recent Folders ({0})" , keybinding ) :
278
+ localize ( 'watermark.showMoreRecents' , "Show All Recent Folders" ) ;
280
279
280
+ moreItem . style . cursor = 'pointer' ;
281
281
this . _register ( addDisposableListener ( moreItem , EventType . CLICK , ( e : MouseEvent ) => {
282
282
e . preventDefault ( ) ;
283
283
e . stopPropagation ( ) ;
0 commit comments