Skip to content

Commit 92288d7

Browse files
committed
💄
1 parent d81a470 commit 92288d7

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

‎src/github/emptyCommitWebview.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as vscode from 'vscode';
99
* Opens a webview panel to display a message for an empty commit.
1010
* The message is centered and styled similar to GitHub.com.
1111
*/
12-
export function showEmptyCommitWebview(extensionUri: vscode.Uri, commitSha: string): void {
12+
export function showEmptyCommitWebview(commitSha: string): void {
1313
const panel = vscode.window.createWebviewPanel(
1414
'emptyCommit',
1515
vscode.l10n.t('Commit {0}', commitSha.substring(0, 7)),
@@ -38,9 +38,6 @@ function getEmptyCommitHtml(): string {
3838
display: flex;
3939
align-items: center;
4040
justify-content: center;
41-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
42-
background-color: var(--vscode-editor-background);
43-
color: var(--vscode-editor-foreground);
4441
}
4542
.container {
4643
text-align: center;
@@ -71,9 +68,7 @@ function getEmptyCommitHtml(): string {
7168
<body>
7269
<div class="container">
7370
<div class="icon">
74-
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
75-
<path d="M13.5 0h-12C.67 0 0 .67 0 1.5v13c0 .83.67 1.5 1.5 1.5h12c.83 0 1.5-.67 1.5-1.5v-13c0-.83-.67-1.5-1.5-1.5zM13 14H2V2h11v12zM4 7h7v1H4V7zm0 2h7v1H4V9zm0 2h7v1H4v-1zM4 5h7v1H4V5z"/>
76-
</svg>
71+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M9.99994 11.999H4.99994V10.999H9.99994V11.999Z"/><path d="M7.99994 5.99902H9.99994V6.99902H7.99994V9H6.99994V6.99902H4.99994V5.99902H6.99994V4H7.99994V5.99902Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7099 1.28906L13.7099 4.28906L13.9999 4.99902V13.999L12.9999 14.999H2.99994L1.99994 13.999V1.99902L2.99994 0.999023H9.99994L10.7099 1.28906ZM2.99994 13.999H12.9999V4.99902L9.99994 1.99902H2.99994V13.999Z"/></svg>
7772
</div>
7873
<div class="title">No changes to show.</div>
7974
<div class="subtitle">This commit has no content.</div>

‎src/github/pullRequestModel.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
14661466
return vscode.commands.executeCommand('vscode.changes', vscode.l10n.t('Changes in Pull Request #{0}', pullRequestModel.number), args);
14671467
}
14681468

1469-
static async openCommitChanges(extensionUri: vscode.Uri, githubRepository: GitHubRepository, commitSha: string) {
1469+
static async openCommitChanges(githubRepository: GitHubRepository, commitSha: string) {
14701470
try {
14711471
const parentCommit = await githubRepository.getCommitParent(commitSha);
14721472
if (!parentCommit) {
@@ -1477,7 +1477,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
14771477
const changes = await githubRepository.compareCommits(parentCommit, commitSha);
14781478
if (!changes?.files || changes.files.length === 0) {
14791479
// Show a webview with the empty commit message instead of a notification
1480-
showEmptyCommitWebview(extensionUri, commitSha);
1480+
showEmptyCommitWebview(commitSha);
14811481
return;
14821482
}
14831483

‎src/github/pullRequestOverview.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
554554
private async openCommitChanges(message: IRequestMessage<OpenCommitChangesArgs>): Promise<void> {
555555
try {
556556
const { commitSha } = message.args;
557-
await PullRequestModel.openCommitChanges(this._extensionUri, this._item.githubRepository, commitSha);
557+
await PullRequestModel.openCommitChanges(this._item.githubRepository, commitSha);
558558
this._replyMessage(message, {});
559559
} catch (error) {
560560
Logger.error(`Failed to open commit changes: ${formatError(error)}`, PullRequestOverviewPanel.ID);

0 commit comments

Comments
 (0)