/
NestedFrontstage.ts
31 lines (28 loc) · 1.14 KB
/
NestedFrontstage.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Frontstage
*/
import { CommandItemDef } from "../shared/CommandItemDef";
import { UiFramework } from "../UiFramework";
import svgProgressBackwardCircular from "@bentley/icons-generic/icons/progress-backward.svg";
/**
* Nested Frontstage related classes and commands
* @public
*/
export class NestedFrontstage {
private static iconSpec = svgProgressBackwardCircular;
/** Command that returns to the previous Frontstage */
public static get backToPreviousFrontstageCommand() {
return new CommandItemDef({
commandId: "backToPreviousFrontstage",
iconSpec: NestedFrontstage.iconSpec,
labelKey: "UiFramework:commands.backToPreviousFrontstage",
execute: async () => {
await UiFramework.frontstages.closeNestedFrontstage();
},
});
}
}