mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
"Are you sure" prompt on removing Azure account does not respect "No"
This commit is contained in:
@@ -10,7 +10,7 @@ import { Action } from 'vs/base/common/actions';
|
|||||||
|
|
||||||
import { error } from 'sql/base/common/log';
|
import { error } from 'sql/base/common/log';
|
||||||
import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces';
|
import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces';
|
||||||
import { IDialogService, IConfirmation } from 'vs/platform/dialogs/common/dialogs';
|
import { IDialogService, IConfirmation, IConfirmationResult } from 'vs/platform/dialogs/common/dialogs';
|
||||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||||
import Severity from 'vs/base/common/severity';
|
import Severity from 'vs/base/common/severity';
|
||||||
|
|
||||||
@@ -86,8 +86,8 @@ export class RemoveAccountAction extends Action {
|
|||||||
type: 'question'
|
type: 'question'
|
||||||
};
|
};
|
||||||
|
|
||||||
return this._dialogService.confirm(confirm).then(result => {
|
return this._dialogService.confirm(confirm).then((result: IConfirmationResult) => {
|
||||||
if (!result) {
|
if (!result || !result.confirmed) {
|
||||||
return Promise.resolve(false);
|
return Promise.resolve(false);
|
||||||
} else {
|
} else {
|
||||||
return Promise.resolve(this._accountManagementService.removeAccount(this._account.key)).catch(err => {
|
return Promise.resolve(this._accountManagementService.removeAccount(this._account.key)).catch(err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user