Skip to content

Commit a53d787

Browse files
committed
Add action to copy share workspace link
Add copy url action to share ws notification Consume new getWorkspaceUrl api Update supervisor-api-grpc
1 parent acd138e commit a53d787

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

extensions/gitpod-shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@gitpod/gitpod-protocol": "main",
19-
"@gitpod/supervisor-api-grpc": "main",
19+
"@gitpod/supervisor-api-grpc": "jeanp413-your-workspace-is-currently-5313",
2020
"bufferutil": "^4.0.1",
2121
"reconnecting-websocket": "^4.4.0",
2222
"utf-8-validate": "^5.0.2",

extensions/gitpod-shared/src/features.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,12 @@ export async function registerWorkspaceSharing(context: GitpodExtensionContext):
435435
});
436436
setWorkspaceShared(level === 'everyone');
437437
if (level === 'everyone') {
438-
await vscode.window.showInformationMessage(`Your workspace is currently shared. Anyone with the link can access this workspace.`);
438+
const uri = context.info.getWorkspaceUrl();
439+
const copyToClipboard = 'Copy URL to Clipboard';
440+
const res = await vscode.window.showInformationMessage(`Your workspace is currently shared. Anyone with [the link](${uri}) can access this workspace.`, copyToClipboard);
441+
if (res === copyToClipboard) {
442+
await vscode.env.clipboard.writeText(uri);
443+
}
439444
} else {
440445
await vscode.window.showInformationMessage(`Your workspace is currently not shared. Only you can access it.`);
441446
}

extensions/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"@improbable-eng/grpc-web" "0.14.0"
3232
google-protobuf "^3.17.0"
3333

34-
"@gitpod/supervisor-api-grpc@main":
35-
version "0.1.5-main.1291"
36-
resolved "https://registry.yarnpkg.com/@gitpod/supervisor-api-grpc/-/supervisor-api-grpc-0.1.5-main.1291.tgz#4b30571d6e5934fefceec8bc9c34506904d05e6c"
37-
integrity sha512-+N6kFrpzB+Ljk2CO/2XZB7btgBdnx5LiiyjSnwJShn9XHju+eao9rzH/ZrChUbDVb/POFnwl1zfsBpISQChV3Q==
34+
"@gitpod/supervisor-api-grpc@jeanp413-your-workspace-is-currently-5313":
35+
version "0.1.5-jeanp413-your-workspace-is-currently-5313.0"
36+
resolved "https://registry.yarnpkg.com/@gitpod/supervisor-api-grpc/-/supervisor-api-grpc-0.1.5-jeanp413-your-workspace-is-currently-5313.0.tgz#dae4e6c93d324f8df72d34320c6a9281c82a2c86"
37+
integrity sha512-/4Y5bQ1braB4yxD5C5m9+2kdpqj5xwP0d9eUXqZ5i6S16uV1Qr0jqinKDOFRo0XT3/jdrvZyhU9THmOGNHzVGQ==
3838
dependencies:
3939
"@grpc/grpc-js" "^1.3.6"
4040
google-protobuf "^3.17.3"

0 commit comments

Comments
 (0)