@codingame/monaco-vscode-share-service-override 29.1.0 → 30.0.0
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": "
|
|
3
|
+
"version": "30.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - share service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "30.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -82,7 +82,7 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution extends Dispos
|
|
|
82
82
|
this.ID = "workbench.action.share";
|
|
83
83
|
}
|
|
84
84
|
static {
|
|
85
|
-
this.LABEL = ( localize2(
|
|
85
|
+
this.LABEL = ( localize2(12786, "Share..."));
|
|
86
86
|
}
|
|
87
87
|
constructor() {
|
|
88
88
|
super({
|
|
@@ -114,7 +114,7 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution extends Dispos
|
|
|
114
114
|
const selection = accessor.get(ICodeEditorService).getActiveCodeEditor()?.getSelection() ?? undefined;
|
|
115
115
|
const result = await progressService.withProgress({
|
|
116
116
|
location: ProgressLocation.Window,
|
|
117
|
-
detail: ( localize(
|
|
117
|
+
detail: ( localize(12787, "Generating link..."))
|
|
118
118
|
}, async () => shareService.provideShare({
|
|
119
119
|
resourceUri,
|
|
120
120
|
selection
|
|
@@ -125,7 +125,7 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution extends Dispos
|
|
|
125
125
|
await clipboardService.writeText(uriText);
|
|
126
126
|
dialogService.prompt({
|
|
127
127
|
type: Severity.Info,
|
|
128
|
-
message: isResultText ? ( localize(
|
|
128
|
+
message: isResultText ? ( localize(12788, "Copied text to clipboard!")) : ( localize(12789, "Copied link to clipboard!")),
|
|
129
129
|
custom: {
|
|
130
130
|
icon: Codicon.check,
|
|
131
131
|
markdownDetails: [{
|
|
@@ -135,9 +135,9 @@ let ShareWorkbenchContribution = class ShareWorkbenchContribution extends Dispos
|
|
|
135
135
|
classes: [isResultText ? "share-dialog-input-text" : "share-dialog-input-link"]
|
|
136
136
|
}]
|
|
137
137
|
},
|
|
138
|
-
cancelButton: ( localize(
|
|
138
|
+
cancelButton: ( localize(12790, "Close")),
|
|
139
139
|
buttons: isResultText ? [] : [{
|
|
140
|
-
label: ( localize(
|
|
140
|
+
label: ( localize(12791, "Open Link")),
|
|
141
141
|
run: () => {
|
|
142
142
|
urlService.open(result, {
|
|
143
143
|
openExternal: true
|
|
@@ -167,7 +167,7 @@ workbenchContributionsRegistry.registerWorkbenchContribution(ShareWorkbenchContr
|
|
|
167
167
|
default: false,
|
|
168
168
|
tags: ["experimental"],
|
|
169
169
|
markdownDescription: ( localize(
|
|
170
|
-
|
|
170
|
+
12792,
|
|
171
171
|
"Controls whether to render the Share action next to the command center when {0} is {1}.",
|
|
172
172
|
"`#window.commandCenter#`",
|
|
173
173
|
"`true`"
|
|
@@ -12,7 +12,7 @@ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
12
12
|
import { ToggleTitleBarConfigAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/titlebar/titlebarActions';
|
|
13
13
|
import { IsCompactTitleBarContext, WorkspaceFolderCountContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
14
14
|
|
|
15
|
-
const ShareProviderCountContext = ( new RawContextKey("shareProviderCount", 0, ( localize(
|
|
15
|
+
const ShareProviderCountContext = ( new RawContextKey("shareProviderCount", 0, ( localize(12793, "The number of available share providers"))));
|
|
16
16
|
let ShareService = class ShareService {
|
|
17
17
|
constructor(
|
|
18
18
|
contextKeyService,
|
|
@@ -63,7 +63,7 @@ let ShareService = class ShareService {
|
|
|
63
63
|
const selected = await this.quickInputService.pick(items, {
|
|
64
64
|
canPickMany: false,
|
|
65
65
|
placeHolder: ( localize(
|
|
66
|
-
|
|
66
|
+
12794,
|
|
67
67
|
"Choose how to share {0}",
|
|
68
68
|
this.labelService.getUriLabel(item.resourceUri)
|
|
69
69
|
))
|
|
@@ -80,7 +80,7 @@ let ShareService = class ShareService {
|
|
|
80
80
|
ShareService = ( __decorate([( __param(0, IContextKeyService)), ( __param(1, ILabelService)), ( __param(2, IQuickInputService)), ( __param(3, ICodeEditorService)), ( __param(4, ITelemetryService))], ShareService));
|
|
81
81
|
registerAction2(class ToggleShareControl extends ToggleTitleBarConfigAction {
|
|
82
82
|
constructor() {
|
|
83
|
-
super("workbench.experimental.share.enabled", ( localize(
|
|
83
|
+
super("workbench.experimental.share.enabled", ( localize(12795, "Share")), ( localize(12796, "Toggle visibility of the Share action in title bar")), 3, ( ContextKeyExpr.and(( IsCompactTitleBarContext.toNegated()), ( ContextKeyExpr.has("config.window.commandCenter")), ( ContextKeyExpr.and(( ShareProviderCountContext.notEqualsTo(0)), ( WorkspaceFolderCountContext.notEqualsTo(0)))))));
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
|