mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 06:22:28 +03:00
adjusted remaining handlers
This commit is contained in:
parent
908c6cdff7
commit
9b791cc986
@ -12,6 +12,7 @@
|
||||
import { BaseBranch } from '$lib/vbranches/types';
|
||||
import { VirtualBranchService } from '$lib/vbranches/virtualBranch';
|
||||
import { open } from '@tauri-apps/api/shell';
|
||||
import { editor } from '$lib/utils/systemEditor';
|
||||
|
||||
const vbranchService = getContext(VirtualBranchService);
|
||||
const branchController = getContext(BranchController);
|
||||
@ -149,9 +150,9 @@
|
||||
role="button"
|
||||
tabindex="0"
|
||||
on:keypress={async () =>
|
||||
await open(`vscode://file${project.vscodePath}/?windowId=_blank`)}
|
||||
await open(`${editor.get()}://file${project.vscodePath}/?windowId=_blank`)}
|
||||
on:click={async () =>
|
||||
await open(`vscode://file${project.vscodePath}/?windowId=_blank`)}
|
||||
await open(`${editor.get()}://file${project.vscodePath}/?windowId=_blank`)}
|
||||
>
|
||||
<div class="empty-board__suggestions__link__icon">
|
||||
<Icon name="vscode" />
|
||||
|
@ -13,6 +13,7 @@
|
||||
import { LocalFile, type AnyFile } from '$lib/vbranches/types';
|
||||
import { join } from '@tauri-apps/api/path';
|
||||
import { open } from '@tauri-apps/api/shell';
|
||||
import { editor } from '$lib/utils/systemEditor';
|
||||
|
||||
const branchController = getContext(BranchController);
|
||||
const project = getContext(Project);
|
||||
@ -89,7 +90,7 @@
|
||||
if (!project) return;
|
||||
for (let file of item.files) {
|
||||
const absPath = await join(project.path, file.path);
|
||||
open(`vscode://file${absPath}`);
|
||||
open(`${editor.get()}://file${absPath}`);
|
||||
}
|
||||
dismiss();
|
||||
} catch {
|
||||
|
@ -4,6 +4,7 @@
|
||||
import ContextMenuItem from '$lib/components/contextmenu/ContextMenuItem.svelte';
|
||||
import ContextMenuSection from '$lib/components/contextmenu/ContextMenuSection.svelte';
|
||||
import { getContext } from '$lib/utils/context';
|
||||
import { editor } from '$lib/utils/systemEditor';
|
||||
import { BranchController } from '$lib/vbranches/branchController';
|
||||
import { open } from '@tauri-apps/api/shell';
|
||||
|
||||
@ -36,7 +37,8 @@
|
||||
<ContextMenuItem
|
||||
label="Open in VS Code"
|
||||
on:mousedown={() => {
|
||||
projectPath && open(`vscode://file${projectPath}/${filePath}:${item.lineNumber}`);
|
||||
projectPath &&
|
||||
open(`${editor.get()}://file${projectPath}/${filePath}:${item.lineNumber}`);
|
||||
dismiss();
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user