@codingame/monaco-vscode-update-service-override 37.2.0 → 37.3.1
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 +2 -2
- package/vscode/src/vs/platform/update/common/update.config.contribution.js +18 -18
- package/vscode/src/vs/workbench/contrib/update/browser/postUpdateWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/update/browser/update.contribution.js +19 -19
- package/vscode/src/vs/workbench/browser/media/code-icon.svg +0 -1
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.d.ts +0 -43
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownSettingRenderer.js +0 -330
- package/vscode/src/vs/workbench/contrib/update/browser/media/updateTitleBarEntry.css +0 -91
- package/vscode/src/vs/workbench/contrib/update/browser/media/updateTooltip.css +0 -165
- package/vscode/src/vs/workbench/contrib/update/browser/releaseNotesEditor.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/update/browser/releaseNotesEditor.js +0 -646
- package/vscode/src/vs/workbench/contrib/update/browser/update.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/update/browser/update.js +0 -498
- package/vscode/src/vs/workbench/contrib/update/browser/updateTitleBarEntry.d.ts +0 -64
- package/vscode/src/vs/workbench/contrib/update/browser/updateTitleBarEntry.js +0 -364
- package/vscode/src/vs/workbench/contrib/update/browser/updateTooltip.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/update/browser/updateTooltip.js +0 -395
- package/vscode/src/vs/workbench/contrib/update/common/updateUtils.d.ts +0 -61
- package/vscode/src/vs/workbench/contrib/update/common/updateUtils.js +0 -129
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
|
-
import { append, $, scheduleAtNextAnimationFrame, getWindow, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
-
import { BaseActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionViewItems';
|
|
6
|
-
import { AnchorAlignment } from '@codingame/monaco-vscode-api/vscode/vs/base/common/layout';
|
|
7
|
-
import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
9
|
-
import { isWeb } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
10
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
|
-
import { IActionViewItemService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/actionViewItemService.service';
|
|
12
|
-
import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
14
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
15
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
16
|
-
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
17
|
-
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
18
|
-
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
19
|
-
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
20
|
-
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
21
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
22
|
-
import { StateType, DisablementReason } from '@codingame/monaco-vscode-api/vscode/vs/platform/update/common/update';
|
|
23
|
-
import { IUpdateService } from '@codingame/monaco-vscode-api/vscode/vs/platform/update/common/update.service';
|
|
24
|
-
import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
|
|
25
|
-
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
|
|
26
|
-
import { UpdateTitleBarEditorVisibleContext, UpdateTitleBarContext, UpdateTitleBarChatInProgressContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/update/common/update';
|
|
27
|
-
import { computeProgressPercent } from '../common/updateUtils.js';
|
|
28
|
-
import * as updateTitleBarEntry from './media/updateTitleBarEntry.css';
|
|
29
|
-
import { UpdateTooltip } from './updateTooltip.js';
|
|
30
|
-
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
31
|
-
|
|
32
|
-
registerCss(updateTitleBarEntry);
|
|
33
|
-
const UPDATE_TITLE_BAR_ACTION_ID = "workbench.actions.updateIndicator";
|
|
34
|
-
const DISABLED_REMINDER_LAST_SHOWN_KEY = "update/disabledReminderLastShown";
|
|
35
|
-
const DISABLED_REMINDER_PERIOD = 30 * 24 * 60 * 60 * 1000;
|
|
36
|
-
const UPDATE_TITLE_BAR_SETTING = "update.titleBar";
|
|
37
|
-
const ACTIONABLE_STATES = [StateType.AvailableForDownload, StateType.Downloaded, StateType.Ready];
|
|
38
|
-
const DETAILED_STATES = [
|
|
39
|
-
...ACTIONABLE_STATES,
|
|
40
|
-
StateType.CheckingForUpdates,
|
|
41
|
-
StateType.Downloading,
|
|
42
|
-
StateType.Updating,
|
|
43
|
-
StateType.Overwriting,
|
|
44
|
-
StateType.Cancelling
|
|
45
|
-
];
|
|
46
|
-
registerAction2(class UpdateIndicatorTitleBarAction extends Action2 {
|
|
47
|
-
constructor() {
|
|
48
|
-
super({
|
|
49
|
-
id: UPDATE_TITLE_BAR_ACTION_ID,
|
|
50
|
-
title: ( localize(18403, "Update")),
|
|
51
|
-
f1: false,
|
|
52
|
-
menu: [{
|
|
53
|
-
id: MenuId.TitleBarUpdate,
|
|
54
|
-
order: 0,
|
|
55
|
-
when: UpdateTitleBarEditorVisibleContext
|
|
56
|
-
}]
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
async run() {}
|
|
60
|
-
});
|
|
61
|
-
let UpdateTitleBarContribution = class UpdateTitleBarContribution extends Disposable {
|
|
62
|
-
constructor(
|
|
63
|
-
actionViewItemService,
|
|
64
|
-
chatService,
|
|
65
|
-
configurationService,
|
|
66
|
-
contextKeyService,
|
|
67
|
-
hostService,
|
|
68
|
-
instantiationService,
|
|
69
|
-
storageService,
|
|
70
|
-
updateService
|
|
71
|
-
) {
|
|
72
|
-
super();
|
|
73
|
-
this.configurationService = configurationService;
|
|
74
|
-
this.hostService = hostService;
|
|
75
|
-
this.storageService = storageService;
|
|
76
|
-
this.tooltipVisible = false;
|
|
77
|
-
this.tooltipFocused = false;
|
|
78
|
-
if (isWeb) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
this.context = UpdateTitleBarContext.bindTo(contextKeyService);
|
|
82
|
-
this.tooltip = this._register(instantiationService.createInstance(UpdateTooltip));
|
|
83
|
-
const chatInProgressContext = UpdateTitleBarChatInProgressContext.bindTo(contextKeyService);
|
|
84
|
-
this._register(autorun(reader => {
|
|
85
|
-
chatInProgressContext.set(chatService.requestInProgressObs.read(reader));
|
|
86
|
-
}));
|
|
87
|
-
this.state = updateService.state;
|
|
88
|
-
this._register(updateService.onStateChange(state => {
|
|
89
|
-
this.state = state;
|
|
90
|
-
this.onStateChange();
|
|
91
|
-
}));
|
|
92
|
-
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
|
93
|
-
if (e.affectsConfiguration(UPDATE_TITLE_BAR_SETTING)) {
|
|
94
|
-
this.onStateChange();
|
|
95
|
-
}
|
|
96
|
-
}));
|
|
97
|
-
this._register(actionViewItemService.register(
|
|
98
|
-
MenuId.TitleBarUpdate,
|
|
99
|
-
UPDATE_TITLE_BAR_ACTION_ID,
|
|
100
|
-
(action, options) => this.createEntry(instantiationService, action, options, AnchorAlignment.RIGHT)
|
|
101
|
-
));
|
|
102
|
-
void this.onStateChange(true);
|
|
103
|
-
}
|
|
104
|
-
createEntry(instantiationService, action, options, anchorAlignment) {
|
|
105
|
-
this.entry = instantiationService.createInstance(
|
|
106
|
-
UpdateTitleBarEntry,
|
|
107
|
-
action,
|
|
108
|
-
options,
|
|
109
|
-
anchorAlignment,
|
|
110
|
-
this.tooltip,
|
|
111
|
-
focus => {
|
|
112
|
-
this.tooltipVisible = true;
|
|
113
|
-
this.tooltipFocused = focus;
|
|
114
|
-
},
|
|
115
|
-
() => {
|
|
116
|
-
this.tooltipVisible = false;
|
|
117
|
-
this.tooltipFocused = false;
|
|
118
|
-
if (!ACTIONABLE_STATES.includes(this.state.type) && !DETAILED_STATES.includes(this.state.type)) {
|
|
119
|
-
this.context.set(false);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
if (this.tooltipVisible) {
|
|
124
|
-
this.entry.showTooltip(this.tooltipFocused);
|
|
125
|
-
}
|
|
126
|
-
return this.entry;
|
|
127
|
-
}
|
|
128
|
-
async onStateChange(startup = false) {
|
|
129
|
-
if (this.configurationService.getValue(UPDATE_TITLE_BAR_SETTING) === false) {
|
|
130
|
-
this.tooltipVisible = false;
|
|
131
|
-
this.tooltipFocused = false;
|
|
132
|
-
this.context.set(false);
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
if (this.tooltipVisible || !(await this.hostService.hadLastFocus())) {
|
|
136
|
-
this.context.set(this.tooltipVisible || ACTIONABLE_STATES.includes(this.state.type));
|
|
137
|
-
this.tooltip.renderState(this.state);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
this.tooltip.renderState(this.state);
|
|
141
|
-
let context = ACTIONABLE_STATES.includes(this.state.type);
|
|
142
|
-
let showTooltip = false;
|
|
143
|
-
switch (this.state.type) {
|
|
144
|
-
case StateType.Disabled:
|
|
145
|
-
if (startup) {
|
|
146
|
-
const reason = this.state.reason;
|
|
147
|
-
if (reason === DisablementReason.InvalidConfiguration || reason === DisablementReason.RunningAsAdmin) {
|
|
148
|
-
const lastShown = this.storageService.getNumber(DISABLED_REMINDER_LAST_SHOWN_KEY, StorageScope.APPLICATION);
|
|
149
|
-
showTooltip = lastShown === undefined || (Date.now() - lastShown) >= DISABLED_REMINDER_PERIOD;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
break;
|
|
153
|
-
case StateType.Idle:
|
|
154
|
-
showTooltip = !!this.state.error;
|
|
155
|
-
break;
|
|
156
|
-
case StateType.Downloading:
|
|
157
|
-
case StateType.Updating:
|
|
158
|
-
case StateType.Overwriting:
|
|
159
|
-
context = this.state.explicit;
|
|
160
|
-
break;
|
|
161
|
-
case StateType.Cancelling:
|
|
162
|
-
context = true;
|
|
163
|
-
break;
|
|
164
|
-
case StateType.Restarting:
|
|
165
|
-
context = true;
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
if (showTooltip) {
|
|
169
|
-
this.tooltipVisible = true;
|
|
170
|
-
context = true;
|
|
171
|
-
}
|
|
172
|
-
this.context.set(context);
|
|
173
|
-
if (showTooltip) {
|
|
174
|
-
this.entry?.showTooltip();
|
|
175
|
-
if (this.state.type === StateType.Disabled) {
|
|
176
|
-
this.storageService.store(
|
|
177
|
-
DISABLED_REMINDER_LAST_SHOWN_KEY,
|
|
178
|
-
Date.now(),
|
|
179
|
-
StorageScope.APPLICATION,
|
|
180
|
-
StorageTarget.MACHINE
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
UpdateTitleBarContribution = ( __decorate([( __param(0, IActionViewItemService)), ( __param(1, IChatService)), ( __param(2, IConfigurationService)), ( __param(3, IContextKeyService)), ( __param(4, IHostService)), ( __param(5, IInstantiationService)), ( __param(6, IStorageService)), ( __param(7, IUpdateService))], UpdateTitleBarContribution));
|
|
187
|
-
let UpdateTitleBarEntry = class UpdateTitleBarEntry extends BaseActionViewItem {
|
|
188
|
-
constructor(
|
|
189
|
-
action,
|
|
190
|
-
options,
|
|
191
|
-
anchorAlignment,
|
|
192
|
-
tooltip,
|
|
193
|
-
onDidShowTooltip,
|
|
194
|
-
onUserDismissedTooltip,
|
|
195
|
-
commandService,
|
|
196
|
-
hoverService,
|
|
197
|
-
telemetryService,
|
|
198
|
-
updateService
|
|
199
|
-
) {
|
|
200
|
-
super(undefined, action, options);
|
|
201
|
-
this.anchorAlignment = anchorAlignment;
|
|
202
|
-
this.tooltip = tooltip;
|
|
203
|
-
this.onDidShowTooltip = onDidShowTooltip;
|
|
204
|
-
this.onUserDismissedTooltip = onUserDismissedTooltip;
|
|
205
|
-
this.commandService = commandService;
|
|
206
|
-
this.hoverService = hoverService;
|
|
207
|
-
this.telemetryService = telemetryService;
|
|
208
|
-
this.updateService = updateService;
|
|
209
|
-
this.visibleTooltip = this._register(( new MutableDisposable()));
|
|
210
|
-
this.action.run = () => this.runAction();
|
|
211
|
-
this._register(this.updateService.onStateChange(state => this.onStateChange(state)));
|
|
212
|
-
this._register(this.commandService.onDidExecuteCommand(event => {
|
|
213
|
-
if (event.commandId === "workbench.action.showHover" && this.isFocused()) {
|
|
214
|
-
this.focusTooltip();
|
|
215
|
-
}
|
|
216
|
-
}));
|
|
217
|
-
}
|
|
218
|
-
render(container) {
|
|
219
|
-
super.render(container);
|
|
220
|
-
this.content = append(container, $(".update-indicator"));
|
|
221
|
-
container.setAttribute("role", "button");
|
|
222
|
-
this.updateTooltip();
|
|
223
|
-
this.onStateChange(this.updateService.state);
|
|
224
|
-
if (this.tooltipFocusOnRender !== undefined) {
|
|
225
|
-
const focus = this.tooltipFocusOnRender;
|
|
226
|
-
this.tooltipFocusOnRender = undefined;
|
|
227
|
-
scheduleAtNextAnimationFrame(getWindow(container), () => this.showTooltip(focus));
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
showTooltip(focus = false) {
|
|
231
|
-
if (!this.element?.isConnected) {
|
|
232
|
-
this.tooltipFocusOnRender = focus;
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
const hover = this.hoverService.showInstantHover({
|
|
236
|
-
content: this.tooltip.domNode,
|
|
237
|
-
target: {
|
|
238
|
-
targetElements: [this.element],
|
|
239
|
-
dispose: () => {
|
|
240
|
-
if (!!this.element?.isConnected) {
|
|
241
|
-
this.onUserDismissedTooltip();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
persistence: {
|
|
246
|
-
sticky: true
|
|
247
|
-
},
|
|
248
|
-
appearance: {
|
|
249
|
-
showPointer: true,
|
|
250
|
-
compact: true
|
|
251
|
-
},
|
|
252
|
-
position: {
|
|
253
|
-
anchorAlignment: this.anchorAlignment
|
|
254
|
-
},
|
|
255
|
-
trapFocus: focus
|
|
256
|
-
}, focus);
|
|
257
|
-
if (hover) {
|
|
258
|
-
this.visibleTooltip.value = hover;
|
|
259
|
-
this.onDidShowTooltip(focus);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
focusTooltip() {
|
|
263
|
-
this.visibleTooltip.clear();
|
|
264
|
-
this.showTooltip(true);
|
|
265
|
-
}
|
|
266
|
-
getHoverContents() {
|
|
267
|
-
return this.tooltip.domNode;
|
|
268
|
-
}
|
|
269
|
-
getHoverOptions() {
|
|
270
|
-
return {
|
|
271
|
-
position: {
|
|
272
|
-
anchorAlignment: this.anchorAlignment
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
async runAction() {
|
|
277
|
-
let commandId;
|
|
278
|
-
switch (this.updateService.state.type) {
|
|
279
|
-
case StateType.AvailableForDownload:
|
|
280
|
-
commandId = "update.downloadNow";
|
|
281
|
-
break;
|
|
282
|
-
case StateType.Downloaded:
|
|
283
|
-
commandId = "update.install";
|
|
284
|
-
break;
|
|
285
|
-
case StateType.Ready:
|
|
286
|
-
commandId = "update.restart";
|
|
287
|
-
break;
|
|
288
|
-
default:
|
|
289
|
-
this.showTooltip(true);
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
this.telemetryService.publicLog2("workbenchActionExecuted", {
|
|
293
|
-
id: commandId,
|
|
294
|
-
from: "titlebar"
|
|
295
|
-
});
|
|
296
|
-
await this.commandService.executeCommand(commandId);
|
|
297
|
-
}
|
|
298
|
-
onStateChange(state) {
|
|
299
|
-
if (!this.content) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
clearNode(this.content);
|
|
303
|
-
this.content.classList.remove("prominent", "progress-indefinite", "progress-percent", "update-disabled");
|
|
304
|
-
this.content.style.removeProperty("--update-progress");
|
|
305
|
-
const label = append(this.content, $(".indicator-label"));
|
|
306
|
-
switch (state.type) {
|
|
307
|
-
case StateType.Disabled:
|
|
308
|
-
label.textContent = ( localize(18404, "Update"));
|
|
309
|
-
this.content.classList.add("update-disabled");
|
|
310
|
-
break;
|
|
311
|
-
case StateType.CheckingForUpdates:
|
|
312
|
-
label.textContent = ( localize(18405, "Checking..."));
|
|
313
|
-
this.renderProgressState(this.content);
|
|
314
|
-
break;
|
|
315
|
-
case StateType.Overwriting:
|
|
316
|
-
label.textContent = ( localize(18406, "Updating..."));
|
|
317
|
-
this.renderProgressState(this.content);
|
|
318
|
-
break;
|
|
319
|
-
case StateType.AvailableForDownload:
|
|
320
|
-
case StateType.Downloaded:
|
|
321
|
-
case StateType.Ready:
|
|
322
|
-
label.textContent = ( localize(18404, "Update"));
|
|
323
|
-
this.content.classList.add("prominent");
|
|
324
|
-
break;
|
|
325
|
-
case StateType.Downloading:
|
|
326
|
-
label.textContent = ( localize(18407, "Downloading..."));
|
|
327
|
-
this.renderProgressState(
|
|
328
|
-
this.content,
|
|
329
|
-
computeProgressPercent(state.downloadedBytes, state.totalBytes)
|
|
330
|
-
);
|
|
331
|
-
break;
|
|
332
|
-
case StateType.Updating:
|
|
333
|
-
label.textContent = ( localize(18408, "Installing..."));
|
|
334
|
-
this.renderProgressState(
|
|
335
|
-
this.content,
|
|
336
|
-
computeProgressPercent(state.currentProgress, state.maxProgress)
|
|
337
|
-
);
|
|
338
|
-
break;
|
|
339
|
-
case StateType.Restarting:
|
|
340
|
-
label.textContent = ( localize(18409, "Restarting..."));
|
|
341
|
-
this.renderProgressState(this.content);
|
|
342
|
-
break;
|
|
343
|
-
case StateType.Cancelling:
|
|
344
|
-
label.textContent = ( localize(18410, "Cancelling..."));
|
|
345
|
-
this.renderProgressState(this.content);
|
|
346
|
-
break;
|
|
347
|
-
default:
|
|
348
|
-
label.textContent = ( localize(18404, "Update"));
|
|
349
|
-
break;
|
|
350
|
-
}
|
|
351
|
-
this.element?.setAttribute("aria-label", label.textContent);
|
|
352
|
-
}
|
|
353
|
-
renderProgressState(content, percentage) {
|
|
354
|
-
if (percentage !== undefined) {
|
|
355
|
-
content.classList.add("progress-percent");
|
|
356
|
-
content.style.setProperty("--update-progress", `${percentage}%`);
|
|
357
|
-
} else {
|
|
358
|
-
content.classList.add("progress-indefinite");
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
UpdateTitleBarEntry = ( __decorate([( __param(6, ICommandService)), ( __param(7, IHoverService)), ( __param(8, ITelemetryService)), ( __param(9, IUpdateService))], UpdateTitleBarEntry));
|
|
363
|
-
|
|
364
|
-
export { UpdateTitleBarContribution, UpdateTitleBarEntry };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { IClipboardService } from "@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service";
|
|
3
|
-
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
4
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
-
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
6
|
-
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
7
|
-
import { State } from "@codingame/monaco-vscode-api/vscode/vs/platform/update/common/update";
|
|
8
|
-
/**
|
|
9
|
-
* A stateful tooltip control for the update status.
|
|
10
|
-
*/
|
|
11
|
-
export declare class UpdateTooltip extends Disposable {
|
|
12
|
-
private readonly clipboardService;
|
|
13
|
-
private readonly commandService;
|
|
14
|
-
private readonly configurationService;
|
|
15
|
-
private readonly hoverService;
|
|
16
|
-
private readonly productService;
|
|
17
|
-
readonly domNode: HTMLElement;
|
|
18
|
-
private readonly titleNode;
|
|
19
|
-
private readonly productInfoNode;
|
|
20
|
-
private readonly productNameNode;
|
|
21
|
-
private readonly currentVersionNode;
|
|
22
|
-
private readonly currentVersionCopyValue;
|
|
23
|
-
private readonly currentVersionCopyButton;
|
|
24
|
-
private readonly latestVersionNode;
|
|
25
|
-
private readonly latestVersionCopyValue;
|
|
26
|
-
private readonly latestVersionCopyButton;
|
|
27
|
-
private readonly releaseDateNode;
|
|
28
|
-
private readonly progressContainer;
|
|
29
|
-
private readonly progressFill;
|
|
30
|
-
private readonly progressPercentNode;
|
|
31
|
-
private readonly progressSizeNode;
|
|
32
|
-
private readonly downloadStatsContainer;
|
|
33
|
-
private readonly timeRemainingNode;
|
|
34
|
-
private readonly speedInfoNode;
|
|
35
|
-
private readonly messageNode;
|
|
36
|
-
private readonly buttonBar;
|
|
37
|
-
private readonly releaseNotesButton;
|
|
38
|
-
private readonly actionButton;
|
|
39
|
-
private releaseNotesVersion;
|
|
40
|
-
constructor(clipboardService: IClipboardService, commandService: ICommandService, configurationService: IConfigurationService, hoverService: IHoverService, productService: IProductService);
|
|
41
|
-
private updateCurrentVersion;
|
|
42
|
-
private hideAll;
|
|
43
|
-
renderState(state: State): void;
|
|
44
|
-
private renderUninitialized;
|
|
45
|
-
private renderDisabled;
|
|
46
|
-
private renderIdle;
|
|
47
|
-
private renderCheckingForUpdates;
|
|
48
|
-
private renderAvailableForDownload;
|
|
49
|
-
private renderDownloading;
|
|
50
|
-
private renderDownloaded;
|
|
51
|
-
private renderUpdating;
|
|
52
|
-
private renderReady;
|
|
53
|
-
private renderOverwriting;
|
|
54
|
-
private renderRestarting;
|
|
55
|
-
private renderCancelling;
|
|
56
|
-
private renderTitleAndInfo;
|
|
57
|
-
private renderActionButton;
|
|
58
|
-
private renderMessage;
|
|
59
|
-
private createVersionRow;
|
|
60
|
-
private runCommandAndClose;
|
|
61
|
-
}
|