Skip to content

Commit 1728e7a

Browse files
JanKoehnleinakosyakov
authored andcommitted
[extension] applied review feedback
See gitpod-io/gitpod#3444 (review)
1 parent 89589cd commit 1728e7a

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

extensions/gitpod/src/extension.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,10 @@ export async function activate(context: vscode.ExtensionContext) {
161161
});
162162
const hostname = gitpodApi.getHost();
163163
const uri = `https://${hostname}#snapshot/${snapshotId}`;
164-
const copyAction = await vscode.window.showInformationMessage(`The current state is captured in a snapshot. Sharing the link '${uri}' allows anybody to create their own copy of this workspace.`,
165-
'Copy URL to Clipboard', 'Copy Markdown button', 'Copy HTML button');
166-
switch (copyAction) {
167-
case 'Copy URL to Clipboard':
168-
await vscode.env.clipboard.writeText(uri);
169-
break;
170-
case 'Copy Markdown button':
171-
await vscode.env.clipboard.writeText(`[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](${uri})`);
172-
break;
173-
case 'Copy HTML button':
174-
await vscode.env.clipboard.writeText(`<a href="${uri}"><img alt="Open in Gitpod" src="https://gitpod.io/button/open-in-gitpod.svg"></a>`);
164+
const copyAction = await vscode.window.showInformationMessage(`The current state is captured in a snapshot. Using '${uri}' anybody can create their own copy of this workspace.`,
165+
'Copy URL to Clipboard');
166+
if (copyAction === 'Copy URL to Clipboard') {
167+
await vscode.env.clipboard.writeText(uri);
175168
}
176169
} catch (err) {
177170
console.error('cannot capture workspace snapshot', err);

0 commit comments

Comments
 (0)