@codingame/monaco-vscode-share-service-override 8.0.2 → 8.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-share-service-override",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@8.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.4"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -68,7 +68,7 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution {
|
|
|
68
68
|
}
|
|
69
69
|
this._disposables.add(registerAction2(class ShareAction extends Action2 {
|
|
70
70
|
static { this.ID = 'workbench.action.share'; }
|
|
71
|
-
static { this.LABEL = ( localize2(
|
|
71
|
+
static { this.LABEL = ( localize2(2752, 'Share...')); }
|
|
72
72
|
constructor() {
|
|
73
73
|
super({
|
|
74
74
|
id: ShareAction.ID,
|
|
@@ -100,7 +100,7 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution {
|
|
|
100
100
|
const selection = accessor.get(ICodeEditorService).getActiveCodeEditor()?.getSelection() ?? undefined;
|
|
101
101
|
const result = await progressService.withProgress({
|
|
102
102
|
location: ProgressLocation.Window,
|
|
103
|
-
detail: ( localize(
|
|
103
|
+
detail: ( localize(2753, 'Generating link...'))
|
|
104
104
|
}, async () => shareService.provideShare({ resourceUri, selection }, CancellationToken.None));
|
|
105
105
|
if (result) {
|
|
106
106
|
const uriText = ( (result.toString()));
|
|
@@ -108,7 +108,7 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution {
|
|
|
108
108
|
await clipboardService.writeText(uriText);
|
|
109
109
|
dialogService.prompt({
|
|
110
110
|
type: Severity$1.Info,
|
|
111
|
-
message: isResultText ? ( localize(
|
|
111
|
+
message: isResultText ? ( localize(2754, 'Copied text to clipboard!')) : ( localize(2755, 'Copied link to clipboard!')),
|
|
112
112
|
custom: {
|
|
113
113
|
icon: Codicon.check,
|
|
114
114
|
markdownDetails: [{
|
|
@@ -116,8 +116,8 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution {
|
|
|
116
116
|
classes: [isResultText ? 'share-dialog-input-text' : 'share-dialog-input-link']
|
|
117
117
|
}]
|
|
118
118
|
},
|
|
119
|
-
cancelButton: ( localize(
|
|
120
|
-
buttons: isResultText ? [] : [{ label: ( localize(
|
|
119
|
+
cancelButton: ( localize(2756, 'Close')),
|
|
120
|
+
buttons: isResultText ? [] : [{ label: ( localize(2757, 'Open Link')), run: () => { urlService.open(result, { openExternal: true }); } }]
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -144,7 +144,7 @@ workbenchContributionsRegistry.registerWorkbenchContribution(ShareWorkbenchContr
|
|
|
144
144
|
default: false,
|
|
145
145
|
tags: ['experimental'],
|
|
146
146
|
markdownDescription: ( localize(
|
|
147
|
-
|
|
147
|
+
2758,
|
|
148
148
|
"Controls whether to render the Share action next to the command center when {0} is {1}.",
|
|
149
149
|
'`#window.commandCenter#`',
|
|
150
150
|
'`true`'
|
|
@@ -8,7 +8,7 @@ import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.serv
|
|
|
8
8
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
9
9
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
10
10
|
|
|
11
|
-
const ShareProviderCountContext = ( (new RawContextKey('shareProviderCount', 0, ( localize(
|
|
11
|
+
const ShareProviderCountContext = ( (new RawContextKey('shareProviderCount', 0, ( localize(2750, "The number of available share providers")))));
|
|
12
12
|
let ShareService = class ShareService {
|
|
13
13
|
constructor(contextKeyService, labelService, quickInputService, codeEditorService, telemetryService) {
|
|
14
14
|
this.contextKeyService = contextKeyService;
|
|
@@ -46,7 +46,7 @@ let ShareService = class ShareService {
|
|
|
46
46
|
}
|
|
47
47
|
const items = ( (providers.map((p) => ({ label: p.label, provider: p }))));
|
|
48
48
|
const selected = await this.quickInputService.pick(items, { canPickMany: false, placeHolder: ( localize(
|
|
49
|
-
|
|
49
|
+
2751,
|
|
50
50
|
'Choose how to share {0}',
|
|
51
51
|
this.labelService.getUriLabel(item.resourceUri)
|
|
52
52
|
)) }, token);
|