|
@ -22,6 +22,7 @@ import type { |
|
|
CopyShaToClipboardCommandArgs, |
|
|
CopyShaToClipboardCommandArgs, |
|
|
OpenBranchOnRemoteCommandArgs, |
|
|
OpenBranchOnRemoteCommandArgs, |
|
|
OpenCommitOnRemoteCommandArgs, |
|
|
OpenCommitOnRemoteCommandArgs, |
|
|
|
|
|
ShowCommitsInViewCommandArgs, |
|
|
} from '../../../commands'; |
|
|
} from '../../../commands'; |
|
|
import { parseCommandContext } from '../../../commands/base'; |
|
|
import { parseCommandContext } from '../../../commands/base'; |
|
|
import { GitActions } from '../../../commands/gitCommands.actions'; |
|
|
import { GitActions } from '../../../commands/gitCommands.actions'; |
|
@ -294,6 +295,7 @@ export class GraphWebview extends WebviewBase { |
|
|
|
|
|
|
|
|
registerCommand('gitlens.graph.cherryPick', this.cherryPick, this), |
|
|
registerCommand('gitlens.graph.cherryPick', this.cherryPick, this), |
|
|
registerCommand('gitlens.graph.copyRemoteCommitUrl', item => this.openCommitOnRemote(item, true), this), |
|
|
registerCommand('gitlens.graph.copyRemoteCommitUrl', item => this.openCommitOnRemote(item, true), this), |
|
|
|
|
|
registerCommand('gitlens.graph.showInDetailsView', this.openInDetailsView, this), |
|
|
registerCommand('gitlens.graph.openCommitOnRemote', this.openCommitOnRemote, this), |
|
|
registerCommand('gitlens.graph.openCommitOnRemote', this.openCommitOnRemote, this), |
|
|
registerCommand('gitlens.graph.rebaseOntoCommit', this.rebase, this), |
|
|
registerCommand('gitlens.graph.rebaseOntoCommit', this.rebase, this), |
|
|
registerCommand('gitlens.graph.resetCommit', this.resetCommit, this), |
|
|
registerCommand('gitlens.graph.resetCommit', this.resetCommit, this), |
|
@ -940,9 +942,7 @@ export class GraphWebview extends WebviewBase { |
|
|
return this.container.storage.getWorkspace('graph:columns'); |
|
|
return this.container.storage.getWorkspace('graph:columns'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private getColumnSettings( |
|
|
|
|
|
columns: Record<GraphColumnName, GraphColumnConfig> | undefined, |
|
|
|
|
|
): GraphColumnsSettings { |
|
|
|
|
|
|
|
|
private getColumnSettings(columns: Record<GraphColumnName, GraphColumnConfig> | undefined): GraphColumnsSettings { |
|
|
const columnsSettings: GraphColumnsSettings = { |
|
|
const columnsSettings: GraphColumnsSettings = { |
|
|
...defaultGraphColumnsSettings, |
|
|
...defaultGraphColumnsSettings, |
|
|
}; |
|
|
}; |
|
@ -1303,6 +1303,19 @@ export class GraphWebview extends WebviewBase { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@debug() |
|
|
@debug() |
|
|
|
|
|
private openInDetailsView(item: GraphItemContext) { |
|
|
|
|
|
if (isGraphItemRefContext(item, 'revision')) { |
|
|
|
|
|
const { ref } = item.webviewItemValue; |
|
|
|
|
|
return executeCommand<ShowCommitsInViewCommandArgs>(Commands.ShowInDetailsView, { |
|
|
|
|
|
repoPath: ref.repoPath, |
|
|
|
|
|
refs: [ref.ref], |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Promise.resolve(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@debug() |
|
|
private openCommitOnRemote(item: GraphItemContext, clipboard?: boolean) { |
|
|
private openCommitOnRemote(item: GraphItemContext, clipboard?: boolean) { |
|
|
if (isGraphItemRefContext(item, 'revision')) { |
|
|
if (isGraphItemRefContext(item, 'revision')) { |
|
|
const { ref } = item.webviewItemValue; |
|
|
const { ref } = item.webviewItemValue; |
|
|