Skip to content

Commit 7f9aac6

Browse files
author
Jaipreet Singh
committed
Infer title of dialog from the operation name
1 parent d5fb2f9 commit 7f9aac6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/components/PathHeader.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export class PathHeader extends React.Component<
5555
onClick={() =>
5656
this.showGitPushPullDialog(
5757
this.props.currentFileBrowserPath,
58-
Operation.Pull,
59-
'Git Pull'
58+
Operation.Pull
6059
)
6160
}
6261
/>
@@ -66,8 +65,7 @@ export class PathHeader extends React.Component<
6665
onClick={() =>
6766
this.showGitPushPullDialog(
6867
this.props.currentFileBrowserPath,
69-
Operation.Push,
70-
'Git Push'
68+
Operation.Push
7169
)
7270
}
7371
/>
@@ -86,11 +84,10 @@ export class PathHeader extends React.Component<
8684
*/
8785
private showGitPushPullDialog(
8886
currentFileBrowserPath: string,
89-
operation: Operation,
90-
title: string
87+
operation: Operation
9188
): Promise<void> {
9289
let dialog = new Dialog({
93-
title: title,
90+
title: `Git ${Operation}`,
9491
body: new GitPullPushDialog(currentFileBrowserPath, operation),
9592
buttons: [Dialog.okButton({ label: 'DISMISS' })]
9693
});

0 commit comments

Comments
 (0)