Skip to content

Commit 8d59cc4

Browse files
author
Alexander Vakrilov
authored
fix: cleanup modaltest paths (NativeScript#5300)
1 parent 87703ce commit 8d59cc4

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

apps/app/modaltest/app.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as application from "tns-core-modules/application";
22
// trace.addCategories(trace.categories.All);
3-
// application.run({ moduleName: "page.1" });
4-
// application.run({ moduleName: "main-page" });
3+
// application.run({ moduleName: "modaltest/page.1" });
4+
// application.run({ moduleName: "modaltest/main-page" });
55

6-
application.run({ moduleName: "modal-tab" });
7-
// application.run({ moduleName: "textview" });
6+
application.run({ moduleName: "modaltest/modal-tab" });
7+
// application.run({ moduleName: "modaltest/textview" });
88

9-
// application.start({ moduleName: "modal-tab.33" });
10-
// application.run({ moduleName: "modal-frame" });
11-
// application.start({ moduleName: "page.2" });
9+
// application.start({ moduleName: "modaltest/modal-tab.33" });
10+
// application.run({ moduleName: modaltest/modal-frame" });
11+
// application.start({ moduleName: "modaltest/page.2" });

apps/app/modaltest/main-page.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ export function onNavigatingTo(args: EventData) {
77

88
export function navigate(args: EventData) {
99
console.log("navigate");
10-
(args.object as View).page.frame.navigate("page.1");
10+
(args.object as View).page.frame.navigate("modaltest/page.1");
1111
}
1212

1313
export function onModalTab(args: EventData) {
1414
const view = args.object as View;
15-
view.showModal("modal-tab", "context", closeModal, false);
15+
view.showModal("modaltest/modal-tab", "context", closeModal, false);
1616
}
1717

1818
export function onModalFrame(args: EventData) {
1919
const view = args.object as View;
20-
view.showModal("modal-frame", "context", closeModal, false);
20+
view.showModal("modaltest/modal-frame", "context", closeModal, false);
2121
}
2222

2323
export function onTap3(args: EventData) {

apps/app/modaltest/modal-frame.1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Page backgroundColor="pink" codeFile='~/page.2' actionBarHidden="true">
1+
<Page backgroundColor="pink" codeFile='~/modaltest/page.2' actionBarHidden="true">
22
<Frame>
33
<Page backgroundColor="purple">
44
<ActionBar title=" AAA ">

apps/app/modaltest/modal-frame.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Frame codeFile='~/page.2'>
1+
<Frame codeFile='~/modaltest/page.2'>
22
<Page backgroundColor="pink">
33
<ActionBar title="{{ $value, 'Page ' + $value }} ">
44
<ActionItem text="close" tap="closeModal" ios.position='right' />

apps/app/modaltest/modal-tab.33.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Page backgroundColor="blue" actionBarHidden="true" loaded="pageLoaded"
2-
codeFile='~/modal-tab'>
2+
codeFile='~/modaltest/modal-tab'>
33
<ActionBar title="Frame in Modal Page">
44
<ActionItem text="close" tap="closeModal" />
55
</ActionBar>

apps/app/modaltest/modal-tab.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function onTap(args) {
2222
const view = args.object as View;
2323
const page = view.page;
2424
let context = page.bindingContext || 0;
25-
page.frame.navigate({ moduleName: "page.2", bindingContext: ++context, transition: { name: "fade", duration: 1000 } });
25+
page.frame.navigate({ moduleName: "modaltest/page.2", bindingContext: ++context, transition: { name: "fade", duration: 1000 } });
2626
}
2727

2828
export function tenGoBacks(args) {
@@ -33,7 +33,7 @@ export function tenGoBacks(args) {
3333
let context = page.bindingContext || 0;
3434
let x = 4;
3535
while (x--) {
36-
frame.navigate({ moduleName: "page.2", bindingContext: ++context, transition: { name: "fade", duration: 1000 } });
36+
frame.navigate({ moduleName: "modaltest/page.2", bindingContext: ++context, transition: { name: "fade", duration: 1000 } });
3737
}
3838

3939
x = 4;
@@ -50,17 +50,17 @@ export function navigateToFrame(args: EventData) {
5050
const view = args.object as View;
5151
const page = view.page;
5252
const frame = page.frame;
53-
frame.navigate("modal-frame");
53+
frame.navigate("modaltest/modal-frame");
5454
}
5555

5656
export function navigateToPageWithFrame(args: EventData) {
5757
const view = args.object as View;
5858
const page = view.page;
5959
const frame = page.frame;
60-
frame.navigate("modal-frame.1");
60+
frame.navigate("modaltest/modal-frame.1");
6161
}
6262

6363
export function onModalFrame(args: EventData) {
6464
const view = args.object as View;
65-
view.showModal("modal-frame", "some context", closeModal, false);
65+
view.showModal("modaltest/modal-frame", "some context", undefined, false);
6666
}

apps/app/modaltest/page.2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function onTap(args: EventData) {
1717
const view = args.object as View;
1818
const page = view.page;
1919
let context = page.bindingContext || 0;
20-
page.frame.navigate({ moduleName: "page.2", bindingContext: ++context, transition: { name: "fade", duration: 1000 } });
20+
page.frame.navigate({ moduleName: "modaltest/page.2", bindingContext: ++context, transition: { name: "fade", duration: 1000 } });
2121
}
2222

2323
export function onBack(args: EventData) {
@@ -32,7 +32,7 @@ export function closeModal(args: EventData) {
3232

3333
let modalContext = 0;
3434
export function showModal(args: EventData) {
35-
(args.object as View).showModal("page.2", ++modalContext, function () {
35+
(args.object as View).showModal("modaltest/page.2", ++modalContext, function () {
3636
console.log("Closed Modal: " + (args.object as View).bindingContext);
3737
});
3838
}

apps/app/modaltest/page.2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Page backgroundColor="pink" showingModally="showingModally">
2-
<ActionBar title="{{ $value }} ">
2+
<ActionBar title="{{ $value + ' page' }} ">
33
<ActionItem text="close" tap="closeModal" ios.position='right' />
44
</ActionBar>
55
<StackLayout backgroundColor="orange">

apps/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "tns-samples-apps",
3-
"main": "ui-tests-app/app.js"
3+
"main": "modaltest/app.js"
44
}

0 commit comments

Comments
 (0)