mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-29 00:00:29 -04:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -434,7 +434,9 @@ export class NotificationTemplateRenderer {
|
||||
const action = notification.actions.primary[index];
|
||||
button.label = action.label;
|
||||
|
||||
this.inputDisposeables.push(button.onDidClick(() => {
|
||||
this.inputDisposeables.push(button.onDidClick(e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// Run action
|
||||
this.actionRunner.run(action, notification);
|
||||
@@ -454,7 +456,7 @@ export class NotificationTemplateRenderer {
|
||||
|
||||
// Return early if the item has no progress
|
||||
if (!notification.hasProgress()) {
|
||||
this.template.progress.stop().getContainer().hide();
|
||||
this.template.progress.stop().hide();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -462,23 +464,23 @@ export class NotificationTemplateRenderer {
|
||||
// Infinite
|
||||
const state = notification.progress.state;
|
||||
if (state.infinite) {
|
||||
this.template.progress.infinite().getContainer().show();
|
||||
this.template.progress.infinite().show();
|
||||
}
|
||||
|
||||
// Total / Worked
|
||||
else if (state.total || state.worked) {
|
||||
if (state.total) {
|
||||
else if (typeof state.total === 'number' || typeof state.worked === 'number') {
|
||||
if (typeof state.total === 'number' && !this.template.progress.hasTotal()) {
|
||||
this.template.progress.total(state.total);
|
||||
}
|
||||
|
||||
if (state.worked) {
|
||||
this.template.progress.worked(state.worked).getContainer().show();
|
||||
if (typeof state.worked === 'number') {
|
||||
this.template.progress.worked(state.worked).show();
|
||||
}
|
||||
}
|
||||
|
||||
// Done
|
||||
else {
|
||||
this.template.progress.done().getContainer().hide();
|
||||
this.template.progress.done().hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user