@effindomv2/create-fui-as-app 0.1.5 → 0.1.7
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/README.md +26 -0
- package/dist/src/templates.js +1 -1
- package/dist/src/versions.d.ts +1 -1
- package/dist/src/versions.js +1 -1
- package/dist/tests/scaffold.test.js +5 -2
- package/package.json +5 -4
- package/templates/hello/README.md +20 -0
- package/{build/templates → templates}/hello/package.json +2 -2
- package/{build/templates → templates}/hello/src/App.ts +1 -1
- package/{build/templates → templates}/hello/src/HelloWorld.ts +32 -21
- package/templates/hello/src/fui/Fui.ts +1 -0
- package/templates/hello/src/fui/FuiBrowser.ts +1 -0
- package/templates/hello/src/fui/FuiExports.ts +1 -0
- package/templates/hello/src/fui/FuiPrimitives.ts +1 -0
- package/templates/mvc/README.md +27 -0
- package/{build/templates → templates}/mvc/harness.ts +9 -9
- package/templates/mvc/index.html +11 -0
- package/{build/templates → templates}/mvc/package.json +5 -5
- package/{build/templates → templates}/mvc/route-shell.html +2 -2
- package/{build/templates → templates}/mvc/scripts/prepare-runtime.ts +4 -4
- package/{build/templates → templates}/mvc/scripts/smoke.ts +4 -4
- package/templates/mvc/src/fui/Fui.ts +1 -0
- package/templates/mvc/src/fui/FuiBrowser.ts +1 -0
- package/templates/mvc/src/fui/FuiExports.ts +1 -0
- package/templates/mvc/src/fui/FuiPrimitives.ts +1 -0
- package/templates/mvc/src/routes/HomeApp.ts +16 -0
- package/templates/mvc/src/routes/SettingsApp.ts +16 -0
- package/{build/templates/mvc/src/routes/mvc/pages → templates/mvc/src/routes}/home/HomeController.ts +8 -10
- package/{build/templates/mvc/src/routes/mvc/pages → templates/mvc/src/routes}/home/HomeView.ts +37 -25
- package/{build/templates/mvc/src/routes/mvc/pages → templates/mvc/src/routes}/settings/SettingsController.ts +5 -7
- package/templates/mvc/src/routes/settings/SettingsView.ts +73 -0
- package/templates/mvc/src/routes/shared/design-system/NavBar.ts +18 -0
- package/templates/mvc/src/routes/shared/design-system/NavPill.ts +59 -0
- package/{build/templates/mvc/src/routes/mvc/shared/design-system/MvcPrimaryButton.ts → templates/mvc/src/routes/shared/design-system/PrimaryButton.ts} +2 -7
- package/{build/templates/mvc/src/routes/mvc → templates/mvc/src/routes}/shared/routes.ts +7 -7
- package/build/templates/hello/src/fui/Fui.ts +0 -1
- package/build/templates/hello/src/fui/FuiBrowser.ts +0 -1
- package/build/templates/hello/src/fui/FuiExports.ts +0 -1
- package/build/templates/hello/src/fui/FuiPrimitives.ts +0 -1
- package/build/templates/mvc/index.html +0 -11
- package/build/templates/mvc/src/fui/Fui.ts +0 -1
- package/build/templates/mvc/src/fui/FuiBrowser.ts +0 -1
- package/build/templates/mvc/src/fui/FuiExports.ts +0 -1
- package/build/templates/mvc/src/fui/FuiPrimitives.ts +0 -1
- package/build/templates/mvc/src/routes/mvc/pages/settings/SettingsView.ts +0 -61
- package/build/templates/mvc/src/routes/mvc/shared/design-system/MvcNavPill.ts +0 -42
- package/build/templates/mvc/src/routes/mvc_home.ts +0 -20
- package/build/templates/mvc/src/routes/mvc_settings.ts +0 -20
- package/dist/scripts/sync-templates.d.ts +0 -1
- package/dist/scripts/sync-templates.js +0 -297
- /package/{build/templates → templates}/hello/asconfig.json +0 -0
- /package/{build/templates → templates}/hello/harness.ts +0 -0
- /package/{build/templates → templates}/hello/index.html +0 -0
- /package/{build/templates → templates}/hello/scripts/prepare-runtime.ts +0 -0
- /package/{build/templates → templates}/hello/scripts/smoke.ts +0 -0
- /package/{build/templates → templates}/hello/src/host/generated/HostEvents.ts +0 -0
- /package/{build/templates → templates}/hello/src/host/generated/HostServices.ts +0 -0
- /package/{build/templates → templates}/hello/src/host/host-events.ts +0 -0
- /package/{build/templates → templates}/hello/src/host/host-services.ts +0 -0
- /package/{build/templates → templates}/hello/tsconfig.json +0 -0
- /package/{build/templates → templates}/mvc/asconfig.json +0 -0
- /package/{build/templates → templates}/mvc/src/host/generated/HostEvents.ts +0 -0
- /package/{build/templates → templates}/mvc/src/host/generated/HostServices.ts +0 -0
- /package/{build/templates → templates}/mvc/src/host/host-events.ts +0 -0
- /package/{build/templates → templates}/mvc/src/host/host-services.ts +0 -0
- /package/{build/templates/mvc/src/routes/mvc/pages → templates/mvc/src/routes}/home/HomeModel.ts +0 -0
- /package/{build/templates/mvc/src/routes/mvc/pages → templates/mvc/src/routes}/settings/SettingsModel.ts +0 -0
- /package/{build/templates → templates}/mvc/tsconfig.json +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Column, Disposable, FlexBox, SelectionArea, Theme, activeTheme, bindTheme, disposeAll, Text, Unit } from "../../fui/Fui";
|
|
2
|
+
import { createNavBar } from "../shared/design-system/NavBar";
|
|
3
|
+
import { PrimaryButton } from "../shared/design-system/PrimaryButton";
|
|
4
|
+
import { SettingsModel } from "./SettingsModel";
|
|
5
|
+
|
|
6
|
+
export class SettingsView {
|
|
7
|
+
readonly actionButton: PrimaryButton;
|
|
8
|
+
private readonly statusText: Text;
|
|
9
|
+
private readonly root!: SelectionArea;
|
|
10
|
+
private readonly themeBindings: Array<Disposable> = new Array<Disposable>();
|
|
11
|
+
private themeBindingDisposed: bool = false;
|
|
12
|
+
|
|
13
|
+
constructor(model: SettingsModel) {
|
|
14
|
+
const navBar = createNavBar(false);
|
|
15
|
+
|
|
16
|
+
const title = new Text(model.title).fontSize(34.0) as Text;
|
|
17
|
+
const subtitle = new Text(model.subtitle).fontSize(16.0) as Text;
|
|
18
|
+
this.statusText = new Text("Settings saved: 0").fontSize(18.0) as Text;
|
|
19
|
+
this.actionButton = new PrimaryButton(model.actionLabel);
|
|
20
|
+
|
|
21
|
+
const content = Column(
|
|
22
|
+
navBar,
|
|
23
|
+
new FlexBox().height(24.0, Unit.Pixel),
|
|
24
|
+
title,
|
|
25
|
+
new FlexBox().height(12.0, Unit.Pixel),
|
|
26
|
+
subtitle,
|
|
27
|
+
new FlexBox().height(20.0, Unit.Pixel),
|
|
28
|
+
this.statusText,
|
|
29
|
+
new FlexBox().height(16.0, Unit.Pixel),
|
|
30
|
+
this.actionButton,
|
|
31
|
+
)
|
|
32
|
+
.width(100.0, Unit.Percent)
|
|
33
|
+
.height(100.0, Unit.Percent)
|
|
34
|
+
.padding(24.0, 24.0, 24.0, 24.0);
|
|
35
|
+
|
|
36
|
+
this.root = new SelectionArea()
|
|
37
|
+
.fillWidth()
|
|
38
|
+
.fillHeight()
|
|
39
|
+
.child(content) as SelectionArea;
|
|
40
|
+
this.trackTheme(bindTheme(this, (view, theme): void => {
|
|
41
|
+
view.applyTheme(theme);
|
|
42
|
+
}));
|
|
43
|
+
this.applyTheme(activeTheme.value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getRoot(): SelectionArea {
|
|
47
|
+
return this.root;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
dispose(): void {
|
|
51
|
+
this.disposeThemeBindings();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
setSaveCount(count: i32): void {
|
|
55
|
+
this.statusText.text("Settings saved: " + count.toString());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private applyTheme(theme: Theme): void {
|
|
59
|
+
this.root.bgColor(theme.colors.background);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private trackTheme(disposable: Disposable): void {
|
|
63
|
+
this.themeBindings.push(disposable);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private disposeThemeBindings(): void {
|
|
67
|
+
if (this.themeBindingDisposed) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.themeBindingDisposed = true;
|
|
71
|
+
disposeAll(this.themeBindings);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FlexBox, JustifyContent, Row, Unit } from "../../../fui/Fui";
|
|
2
|
+
import { NavPill } from "./NavPill";
|
|
3
|
+
import { homeRoute, settingsRoute } from "../routes";
|
|
4
|
+
|
|
5
|
+
function navSpacer(): FlexBox {
|
|
6
|
+
return new FlexBox().width(10.0, Unit.Pixel).height(1.0, Unit.Pixel);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function createNavBar(homeIsActive: bool): FlexBox {
|
|
10
|
+
const homePill = new NavPill(homeRoute(), "Home").active(homeIsActive);
|
|
11
|
+
const settingsPill = new NavPill(settingsRoute(), "Settings").active(!homeIsActive);
|
|
12
|
+
return Row()
|
|
13
|
+
.width(100.0, Unit.Percent)
|
|
14
|
+
.justifyContent(JustifyContent.End)
|
|
15
|
+
.child(homePill)
|
|
16
|
+
.child(navSpacer())
|
|
17
|
+
.child(settingsPill);
|
|
18
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Disposable, Theme, activeTheme, bindTheme, disposeAll, NavLink, Text } from "../../../fui/Fui";
|
|
2
|
+
|
|
3
|
+
const PILL_RADIUS: f32 = 999.0;
|
|
4
|
+
const PILL_PADDING_X: f32 = 16.0;
|
|
5
|
+
const PILL_PADDING_Y: f32 = 8.0;
|
|
6
|
+
export class NavPill extends NavLink {
|
|
7
|
+
private readonly labelNode: Text;
|
|
8
|
+
private readonly themeBindings: Array<Disposable> = new Array<Disposable>();
|
|
9
|
+
private themeBindingDisposed: bool = false;
|
|
10
|
+
private activeValue: bool = false;
|
|
11
|
+
|
|
12
|
+
constructor(href: string, label: string) {
|
|
13
|
+
super(href, label, false);
|
|
14
|
+
this.labelNode = new Text(label)
|
|
15
|
+
.fontSize(14.0)
|
|
16
|
+
.selectable(false) as Text;
|
|
17
|
+
this
|
|
18
|
+
.cornerRadius(PILL_RADIUS)
|
|
19
|
+
.padding(PILL_PADDING_X, PILL_PADDING_Y, PILL_PADDING_X, PILL_PADDING_Y)
|
|
20
|
+
.child(this.labelNode);
|
|
21
|
+
this.trackTheme(bindTheme(this, (pill, theme): void => {
|
|
22
|
+
pill.applyVisualState(theme);
|
|
23
|
+
}));
|
|
24
|
+
this.applyVisualState(activeTheme.value);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
active(flag: bool = true): this {
|
|
28
|
+
this.activeValue = flag;
|
|
29
|
+
this.applyVisualState(activeTheme.value);
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
dispose(): void {
|
|
34
|
+
this.disposeThemeBindings();
|
|
35
|
+
super.dispose();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
private applyVisualState(theme: Theme): void {
|
|
39
|
+
if (this.activeValue) {
|
|
40
|
+
this.bgColor(theme.colors.accent);
|
|
41
|
+
this.labelNode.textColor(theme.colors.textPrimary);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.bgColor(theme.colors.surface);
|
|
45
|
+
this.labelNode.textColor(theme.colors.textMuted);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private trackTheme(disposable: Disposable): void {
|
|
49
|
+
this.themeBindings.push(disposable);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
private disposeThemeBindings(): void {
|
|
53
|
+
if (this.themeBindingDisposed) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.themeBindingDisposed = true;
|
|
57
|
+
disposeAll(this.themeBindings);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { Button
|
|
1
|
+
import { Button } from "../../../fui/Fui";
|
|
2
2
|
|
|
3
3
|
const BUTTON_RADIUS: f32 = 12.0;
|
|
4
4
|
const BUTTON_PADDING_X: f32 = 18.0;
|
|
5
5
|
const BUTTON_PADDING_Y: f32 = 10.0;
|
|
6
|
-
|
|
7
|
-
const BUTTON_TEXT: u32 = rgb(241, 245, 249);
|
|
8
|
-
|
|
9
|
-
export class MvcPrimaryButton extends Button {
|
|
6
|
+
export class PrimaryButton extends Button {
|
|
10
7
|
constructor(label: string) {
|
|
11
8
|
super(label);
|
|
12
9
|
this
|
|
13
10
|
.cornerRadius(BUTTON_RADIUS)
|
|
14
11
|
.padding(BUTTON_PADDING_X, BUTTON_PADDING_Y, BUTTON_PADDING_X, BUTTON_PADDING_Y)
|
|
15
|
-
.bgColor(BUTTON_BG)
|
|
16
|
-
.textColor(BUTTON_TEXT)
|
|
17
12
|
.fontSize(14.0);
|
|
18
13
|
}
|
|
19
14
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { currentRoute } from "
|
|
1
|
+
import { currentRoute } from "../../fui/Fui";
|
|
2
2
|
|
|
3
3
|
const SOURCE_DEMO_BASE: string = "/v2/fui-as/demo-mvc";
|
|
4
|
-
const SOURCE_HOME_ROUTE: string = "/v2/fui-as/demo-mvc/
|
|
5
|
-
const SOURCE_SETTINGS_ROUTE: string = "/v2/fui-as/demo-mvc/
|
|
6
|
-
const PUBLISHED_HOME_ROUTE: string = "/
|
|
7
|
-
const PUBLISHED_SETTINGS_ROUTE: string = "/
|
|
4
|
+
const SOURCE_HOME_ROUTE: string = "/v2/fui-as/demo-mvc/home/";
|
|
5
|
+
const SOURCE_SETTINGS_ROUTE: string = "/v2/fui-as/demo-mvc/settings/";
|
|
6
|
+
const PUBLISHED_HOME_ROUTE: string = "/home/";
|
|
7
|
+
const PUBLISHED_SETTINGS_ROUTE: string = "/settings/";
|
|
8
8
|
|
|
9
9
|
function isSourceDemoRoute(route: string): bool {
|
|
10
10
|
if (route.length == 0) {
|
|
@@ -13,10 +13,10 @@ function isSourceDemoRoute(route: string): bool {
|
|
|
13
13
|
return route.startsWith(SOURCE_DEMO_BASE);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export function
|
|
16
|
+
export function homeRoute(): string {
|
|
17
17
|
return isSourceDemoRoute(currentRoute.value) ? SOURCE_HOME_ROUTE : PUBLISHED_HOME_ROUTE;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function
|
|
20
|
+
export function settingsRoute(): string {
|
|
21
21
|
return isSourceDemoRoute(currentRoute.value) ? SOURCE_SETTINGS_ROUTE : PUBLISHED_SETTINGS_ROUTE;
|
|
22
22
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/src/Fui";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/browser/src/index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/src/FuiExports";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/src/FuiPrimitives";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="refresh" content="0; url=/mvc-home/" />
|
|
6
|
-
<title>FUI-AS MVC App</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<p>Redirecting to <a href="/mvc-home/">/mvc-home/</a>…</p>
|
|
10
|
-
</body>
|
|
11
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/src/Fui";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/browser/src/index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/src/FuiExports";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../node_modules/@effindomv2/fui-as/src/FuiPrimitives";
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Column, FlexBox, JustifyContent, Row, SelectionArea, Text, Unit, rgb } from "../../../../fui/Fui";
|
|
2
|
-
import { MvcNavPill } from "../../shared/design-system/MvcNavPill";
|
|
3
|
-
import { MvcPrimaryButton } from "../../shared/design-system/MvcPrimaryButton";
|
|
4
|
-
import { mvcHomeRoute, mvcSettingsRoute } from "../../shared/routes";
|
|
5
|
-
import { SettingsModel } from "./SettingsModel";
|
|
6
|
-
|
|
7
|
-
function navSpacer(): FlexBox {
|
|
8
|
-
return new FlexBox().width(10.0, Unit.Pixel).height(1.0, Unit.Pixel);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class SettingsView {
|
|
12
|
-
readonly actionButton: MvcPrimaryButton;
|
|
13
|
-
private readonly statusText: Text;
|
|
14
|
-
private readonly root!: SelectionArea;
|
|
15
|
-
|
|
16
|
-
constructor(model: SettingsModel) {
|
|
17
|
-
const homePill = new MvcNavPill(mvcHomeRoute(), "Home").active(false);
|
|
18
|
-
const settingsPill = new MvcNavPill(mvcSettingsRoute(), "Settings").active(true);
|
|
19
|
-
|
|
20
|
-
const navBar = Row()
|
|
21
|
-
.width(100.0, Unit.Percent)
|
|
22
|
-
.justifyContent(JustifyContent.End)
|
|
23
|
-
.child(homePill)
|
|
24
|
-
.child(navSpacer())
|
|
25
|
-
.child(settingsPill);
|
|
26
|
-
|
|
27
|
-
const title = new Text(model.title).fontSize(34.0).textColor(rgb(241, 245, 249)) as Text;
|
|
28
|
-
const subtitle = new Text(model.subtitle).fontSize(16.0).textColor(rgb(148, 163, 184)) as Text;
|
|
29
|
-
this.statusText = new Text("Settings saved: 0").fontSize(18.0).textColor(rgb(134, 239, 172)) as Text;
|
|
30
|
-
this.actionButton = new MvcPrimaryButton(model.actionLabel);
|
|
31
|
-
|
|
32
|
-
const content = Column(
|
|
33
|
-
navBar,
|
|
34
|
-
new FlexBox().height(24.0, Unit.Pixel),
|
|
35
|
-
title,
|
|
36
|
-
new FlexBox().height(12.0, Unit.Pixel),
|
|
37
|
-
subtitle,
|
|
38
|
-
new FlexBox().height(20.0, Unit.Pixel),
|
|
39
|
-
this.statusText,
|
|
40
|
-
new FlexBox().height(16.0, Unit.Pixel),
|
|
41
|
-
this.actionButton,
|
|
42
|
-
)
|
|
43
|
-
.width(100.0, Unit.Percent)
|
|
44
|
-
.height(100.0, Unit.Percent)
|
|
45
|
-
.padding(24.0, 24.0, 24.0, 24.0);
|
|
46
|
-
|
|
47
|
-
this.root = new SelectionArea()
|
|
48
|
-
.fillWidth()
|
|
49
|
-
.fillHeight()
|
|
50
|
-
.bgColor(rgb(2, 6, 23))
|
|
51
|
-
.child(content) as SelectionArea;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
getRoot(): SelectionArea {
|
|
55
|
-
return this.root;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
setSaveCount(count: i32): void {
|
|
59
|
-
this.statusText.text("Settings saved: " + count.toString());
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { NavLink, Text, rgb } from "../../../../fui/Fui";
|
|
2
|
-
|
|
3
|
-
const PILL_RADIUS: f32 = 999.0;
|
|
4
|
-
const PILL_PADDING_X: f32 = 16.0;
|
|
5
|
-
const PILL_PADDING_Y: f32 = 8.0;
|
|
6
|
-
const PILL_INACTIVE_BG: u32 = rgb(33, 45, 67);
|
|
7
|
-
const PILL_ACTIVE_BG: u32 = rgb(34, 197, 94);
|
|
8
|
-
const PILL_INACTIVE_TEXT: u32 = rgb(226, 232, 240);
|
|
9
|
-
const PILL_ACTIVE_TEXT: u32 = rgb(12, 16, 24);
|
|
10
|
-
|
|
11
|
-
export class MvcNavPill extends NavLink {
|
|
12
|
-
private readonly labelNode: Text;
|
|
13
|
-
private activeValue: bool = false;
|
|
14
|
-
|
|
15
|
-
constructor(href: string, label: string) {
|
|
16
|
-
super(href, label, false);
|
|
17
|
-
this.labelNode = new Text(label)
|
|
18
|
-
.fontSize(14.0)
|
|
19
|
-
.selectable(false) as Text;
|
|
20
|
-
this
|
|
21
|
-
.cornerRadius(PILL_RADIUS)
|
|
22
|
-
.padding(PILL_PADDING_X, PILL_PADDING_Y, PILL_PADDING_X, PILL_PADDING_Y)
|
|
23
|
-
.child(this.labelNode);
|
|
24
|
-
this.applyVisualState();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
active(flag: bool = true): this {
|
|
28
|
-
this.activeValue = flag;
|
|
29
|
-
this.applyVisualState();
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private applyVisualState(): void {
|
|
34
|
-
if (this.activeValue) {
|
|
35
|
-
this.bgColor(PILL_ACTIVE_BG);
|
|
36
|
-
this.labelNode.textColor(PILL_ACTIVE_TEXT);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
this.bgColor(PILL_INACTIVE_BG);
|
|
40
|
-
this.labelNode.textColor(PILL_INACTIVE_TEXT);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from "../fui/FuiExports";
|
|
2
|
-
export * from "../host/generated/HostEvents";
|
|
3
|
-
|
|
4
|
-
import { Node, createManagedApplication } from "../fui/Fui";
|
|
5
|
-
import { HomeController } from "./mvc/pages/home/HomeController";
|
|
6
|
-
|
|
7
|
-
const app = createManagedApplication<HomeController>(
|
|
8
|
-
() => new HomeController(),
|
|
9
|
-
(controller): Node => controller.getRoot(),
|
|
10
|
-
(controller): void => controller.mount(),
|
|
11
|
-
(controller): void => controller.dispose(),
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
export function __runApp(): void {
|
|
15
|
-
app.run();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function __disposeApp(): void {
|
|
19
|
-
app.dispose();
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from "../fui/FuiExports";
|
|
2
|
-
export * from "../host/generated/HostEvents";
|
|
3
|
-
|
|
4
|
-
import { Node, createManagedApplication } from "../fui/Fui";
|
|
5
|
-
import { SettingsController } from "./mvc/pages/settings/SettingsController";
|
|
6
|
-
|
|
7
|
-
const app = createManagedApplication<SettingsController>(
|
|
8
|
-
() => new SettingsController(),
|
|
9
|
-
(controller): Node => controller.getRoot(),
|
|
10
|
-
(controller): void => controller.mount(),
|
|
11
|
-
(controller): void => controller.dispose(),
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
export function __runApp(): void {
|
|
15
|
-
app.run();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function __disposeApp(): void {
|
|
19
|
-
app.dispose();
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|