Skip to content

Commit 7cfca4f

Browse files
committed
project migration to 6 + font icons for BottomNavigation
1 parent a568562 commit 7cfca4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+42
-73
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ report
88

99
app/**/*.map
1010
app/**/*-ts-*.js
11+
.migration_backup/
1112

1213
.DS_Store
1314
**/*.log

.migration_backup/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,25 @@
2222
"nativescript": {
2323
"id": "org.nativescript.nativescriptsdkexamplesjs",
2424
"tns-android": {
25-
"version": "5.4.0"
25+
"version": "6.0.0-rc-2019-07-04-174325-01"
26+
},
27+
"tns-ios": {
28+
"version": "6.0.0-rc-2019-07-04-095546-01"
2629
}
2730
},
2831
"dependencies": {
2932
"nativescript-theme-core": "~1.0.4",
30-
"tns-core-modules": "^5.3.1"
33+
"tns-core-modules": "rc"
3134
},
3235
"devDependencies": {
3336
"eslint": "~5.9.0",
3437
"fs-extra": "^0.30.0",
3538
"markdown-snippet-injector": "^0.2.4",
36-
"nativescript-dev-typescript": "~0.9.0",
37-
"nativescript-dev-webpack": "^0.21.0",
39+
"nativescript-dev-webpack": "next",
3840
"tar.gz": "^1.0.7",
39-
"tns-platform-declarations": "^5.3.1",
41+
"tns-platform-declarations": "rc",
4042
"tslint": "5.11.0",
41-
"typescript": "~3.1.6"
43+
"typescript": "3.4.1"
4244
},
4345
"scripts": {
4446
"lint": "eslint \"app/**/*.js\"",

app/app.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

app/ns-ui-category/icon-fonts/basics/basics-page.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@
2323
<!-- Using IcoMoon-Free.ttf -->
2424
<Label text="&#xe904;" class="ico"/>
2525
<!-- << icon-font-xml-def -->
26+
27+
<!-- Using font icons in Images requires the font:// prefix -->
28+
<Image src="font://&#xf019;" class="far"></Image>
2629
</StackLayout>
2730
</Page>

app/ns-ui-widgets-category/bottom-navigation/events/events-page.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
</Page.actionBar>
55
<!-- >> bottom-navigation-events-xml -->
66
<BottomNavigation selectedIndex="1" loaded="onBottomNavLoaded">
7-
87
<!-- The bottom tab UI is created via TabStrip (the containier) and TabStripItem (for each tab)-->
98
<TabStrip>
109
<TabStripItem title="Home" iconSource="res://baseline_home_black_24pt"></TabStripItem>

app/ns-ui-widgets-category/bottom-navigation/properties/properties-ts-page.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ function createTabStrip() {
4040
/*
4141
Using TabStripItem title property
4242
*/
43-
item.title = `Tab ${index === 0
44-
? "res://baseline_home_black_24pt"
45-
: (index === 1
46-
? "res://baseline_account_balance_black_24pt"
47-
: "res://baseline_search_black_24pt")}`;
43+
item.title = `Tab ${index}`;
4844
/*
4945
Using TabStripItem title property
5046
*/
Lines changed: 4 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.font-size {
2+
font-size: 14;
3+
}

app/ns-ui-widgets-category/bottom-navigation/tips-and-tricks/tips-and-tricks-page.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
<Page.actionBar>
33
<ActionBar title="BottomNavigation - Usage"/>
44
</Page.actionBar>
5-
6-
<BottomNavigation selectedIndex="1">
7-
8-
<!-- The bottom tab UI is created via TabStrip (the containier) and TabStripItem (for each tab)-->
5+
<!-- >> bottom-navigation-tips-icons-js -->
6+
<BottomNavigation selectedIndex="1" class="fas font-size">
7+
<!-- Using icon fonts for each TabStripItem -->
98
<TabStrip>
10-
<TabStripItem title="Home" iconSource="res://baseline_home_black_18pt"></TabStripItem>
11-
<TabStripItem title="Account" iconSource="res://baseline_account_balance_black_18pt"></TabStripItem>
12-
<TabStripItem title="Search" iconSource="res://baseline_search_black_18pt"></TabStripItem>
9+
<TabStripItem title="Home" iconSource="font://&#xf015;"></TabStripItem>
10+
<TabStripItem title="Account" iconSource="font://&#xf2bd;"></TabStripItem>
11+
<TabStripItem title="Search" iconSource="font://&#xf002;"></TabStripItem>
1312
</TabStrip>
14-
15-
<!-- The number of TabContentItem components should corespond to the number of TabStripItem components -->
13+
1614
<TabContentItem>
1715
<GridLayout>
1816
<Label text="Home Page" class="h2 text-center"></Label>
@@ -30,5 +28,5 @@
3028
</TabContentItem>
3129

3230
</BottomNavigation>
33-
31+
<!-- << bottom-navigation-tips-icons-js -->
3432
</Page>

app/ns-ui-widgets-category/bottom-navigation/tips-and-tricks/tips-and-tricks-ts-page.xml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
<Page.actionBar>
33
<ActionBar title="BottomNavigation - Usage"/>
44
</Page.actionBar>
5-
6-
<BottomNavigation selectedIndex="1">
7-
8-
<!-- The bottom tab UI is created via TabStrip (the containier) and TabStripItem (for each tab)-->
5+
<!-- >> bottom-navigation-tips-icons-tsc -->
6+
<BottomNavigation selectedIndex="1" class="fas font-size">
7+
<!-- Using icon fonts for each TabStripItem -->
98
<TabStrip>
10-
<TabStripItem title="Home" iconSource="res://baseline_home_black_18pt"></TabStripItem>
11-
<TabStripItem title="Account" iconSource="res://baseline_account_balance_black_18pt"></TabStripItem>
12-
<TabStripItem title="Search" iconSource="res://baseline_search_black_18pt"></TabStripItem>
9+
<TabStripItem title="Home" iconSource="font://&#xf015;"></TabStripItem>
10+
<TabStripItem title="Account" iconSource="font://&#xf2bd;"></TabStripItem>
11+
<TabStripItem title="Search" iconSource="font://&#xf002;"></TabStripItem>
1312
</TabStrip>
14-
15-
<!-- The number of TabContentItem components should corespond to the number of TabStripItem components -->
13+
1614
<TabContentItem>
1715
<GridLayout>
1816
<Label text="Home Page" class="h2 text-center"></Label>
@@ -30,5 +28,5 @@
3028
</TabContentItem>
3129

3230
</BottomNavigation>
33-
31+
<!-- << bottom-navigation-tips-icons-tsc -->
3432
</Page>

nsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"useLegacyWorkflow": false
3-
}
1+
{}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@
2222
"nativescript": {
2323
"id": "org.nativescript.nativescriptsdkexamplesjs",
2424
"tns-android": {
25-
"version": "6.0.0-rc-2019-07-04-174325-01"
25+
"version": "6.0.0"
2626
},
2727
"tns-ios": {
28-
"version": "6.0.0-rc-2019-07-04-095546-01"
28+
"version": "6.0.0"
2929
}
3030
},
3131
"dependencies": {
3232
"nativescript-theme-core": "~1.0.4",
33-
"tns-core-modules": "^6.1.0-next-2019-07-03-144356-02"
33+
"tns-core-modules": "6.0.1"
3434
},
3535
"devDependencies": {
3636
"eslint": "~5.9.0",
3737
"fs-extra": "^0.30.0",
3838
"markdown-snippet-injector": "^0.2.4",
39-
"nativescript-dev-webpack": "next",
39+
"nativescript-dev-webpack": "1.0.0",
4040
"tar.gz": "^1.0.7",
41-
"tns-platform-declarations": "rc",
41+
"tns-platform-declarations": "6.0.1",
4242
"tslint": "5.11.0",
4343
"typescript": "3.4.1"
4444
},

0 commit comments

Comments
 (0)