Skip to content

Commit 88e7da6

Browse files
committed
make project id handling work
1 parent c67e331 commit 88e7da6

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

apps/desktop/src/components/FileMenuAction.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
goto(clonePath());
2525
}),
2626
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];
2829
if (currentProjectId) {
2930
await projectsService.openProjectInNewWindow(currentProjectId);
3031
}
31-
// If no project is available, the menu item will be ignored (as per requirements)
3232
})
3333
)
3434
);

apps/desktop/src/lib/project/projectsService.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ export class ProjectsService {
7373
await this.api.endpoints.openProjectInWindow.mutate({ id: projectId });
7474
}
7575

76-
async getCurrentProjectId(): Promise<string | undefined> {
77-
const result = await this.api.endpoints.getCurrentProjectId.query();
78-
return result || undefined;
79-
}
80-
8176
async relocateProject(projectId: string): Promise<void> {
8277
const path = await this.getValidPath();
8378
if (!path) return;

0 commit comments

Comments
 (0)