-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDeployRevisionDraftConfirmStep.ts
More file actions
22 lines (19 loc) · 1.12 KB
/
DeployRevisionDraftConfirmStep.ts
File metadata and controls
22 lines (19 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AzureWizardPromptStep } from "@microsoft/vscode-azext-utils";
import { localize } from "../../../utils/localize";
import type { IDeployRevisionDraftContext } from "./IDeployRevisionDraftContext";
export class DeployRevisionDraftConfirmStep extends AzureWizardPromptStep<IDeployRevisionDraftContext> {
public async prompt(context: IDeployRevisionDraftContext): Promise<void> {
await context.ui.showWarningMessage(
localize('deployRevisionWarning', 'This will deploy any unsaved changes to container app "{0}".', context.containerApp?.name),
{ modal: true },
{ title: localize('continue', 'Continue') }
);
}
public shouldPrompt(context: IDeployRevisionDraftContext): boolean {
return !!context.template;
}
}