Skip to content

Commit 4f31965

Browse files
committed
feat: add "Open in Finder" menu option
1 parent 97f3680 commit 4f31965

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

apps/desktop/src/components/ProjectSettingsMenuAction.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
openExternalUrl(path);
3131
});
3232
33+
shortcutService.on('open-in-finder', () => {
34+
const path = `file://${project.path}`;
35+
openExternalUrl(path);
36+
});
37+
3338
shortcutService.on('history', () => {
3439
$showHistoryView = !$showHistoryView;
3540
});

crates/gitbutler-tauri/src/menu.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ pub fn build<R: Runtime>(handle: &AppHandle<R>) -> tauri::Result<tauri::menu::Me
172172
.build(handle)?,
173173
)
174174
.text("project/open-in-vscode", "Open in Editor")
175+
.text("project/open-in-finder", "Open in Finder")
175176
.separator()
176177
.text("project/settings", "Project Settings")
177178
.build()?;
@@ -299,6 +300,11 @@ pub fn handle_event(webview: &WebviewWindow, event: &MenuEvent) {
299300
return;
300301
}
301302

303+
if event.id() == "project/open-in-finder" {
304+
emit(webview, SHORTCUT_EVENT, "open-in-finder");
305+
return;
306+
}
307+
302308
if event.id() == "project/settings" {
303309
emit(webview, SHORTCUT_EVENT, "project-settings");
304310
return;

0 commit comments

Comments
 (0)