File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 24
24
goto (clonePath ());
25
25
}),
26
26
shortcutService .on (' clone-window' , async () => {
27
- const currentProjectId = await projectsService .getCurrentProjectId ();
27
+ const url = new URL (window .location .href );
28
+ const currentProjectId = url .pathname .split (' /' )[1 ];
28
29
if (currentProjectId ) {
29
30
await projectsService .openProjectInNewWindow (currentProjectId );
30
31
}
31
- // If no project is available, the menu item will be ignored (as per requirements)
32
32
})
33
33
)
34
34
);
Original file line number Diff line number Diff line change @@ -73,11 +73,6 @@ export class ProjectsService {
73
73
await this . api . endpoints . openProjectInWindow . mutate ( { id : projectId } ) ;
74
74
}
75
75
76
- async getCurrentProjectId ( ) : Promise < string | undefined > {
77
- const result = await this . api . endpoints . getCurrentProjectId . query ( ) ;
78
- return result || undefined ;
79
- }
80
-
81
76
async relocateProject ( projectId : string ) : Promise < void > {
82
77
const path = await this . getValidPath ( ) ;
83
78
if ( ! path ) return ;
You can’t perform that action at this time.
0 commit comments