@wiztivi/dana-templates 0.0.16 → 0.0.18
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/app-template/gitignoreTemplate.hbs +1 -0
- package/app-template/images/dana_logo_light.png +0 -0
- package/app-template/scripts/app/theme/AppTheme.js +1 -1
- package/modules/fip/scripts/ui/views/PlayButtonView.js +3 -4
- package/modules/home/package.json +2 -1
- package/modules/home/scripts/services/mock/highlightMock.json +40 -0
- package/modules/home/scripts/ui/screens/HomeScreen.js +84 -27
- package/modules/home/scripts/ui/views/highlight/DotsListItemView.js +37 -0
- package/modules/home/scripts/ui/views/highlight/DotsListView.js +22 -0
- package/modules/home/scripts/ui/views/highlight/HighlightContentDescriptionView.js +99 -0
- package/modules/home/scripts/ui/views/highlight/HighlightPlayButtonView.js +63 -0
- package/modules/home/scripts/ui/views/highlight/HighlightRailItemView.js +186 -0
- package/modules/menu/package.json +3 -2
- package/modules/menu/scripts/MenuModule.js +1 -1
- package/modules/menu/scripts/ui/views/MenuButtonView.js +19 -18
- package/modules/menu/scripts/ui/views/MenuView.js +14 -12
- package/modules/player/scripts/ui/views/PlayerControlButtonView.js +1 -1
- package/modules/search/package.json +3 -2
- package/modules/search/scripts/ui/views/keyboard/SearchKeyboardRowItemView.js +1 -1
- package/modules/vod/package.json +3 -2
- package/modules/vod/scripts/ui/screens/VodScreen.js +23 -12
- package/package.json +1 -1
- package/tutorial/modules/fip/scripts/ui/views/PlayButtonView.js +3 -4
- package/modules/player/styles/fonts/fa-solid-900.ttf +0 -0
- /package/{modules/menu/styles → assets}/fonts/fa-solid-900.ttf +0 -0
- /package/modules/home/scripts/ui/views/{HomeMockTileListItemView.js → scrollview/HomeMockTileListItemView.js} +0 -0
- /package/modules/home/scripts/ui/views/{HomeRailScrollItemView.js → scrollview/HomeRailScrollItemView.js} +0 -0
- /package/modules/home/scripts/ui/views/{HomeScrollView.js → scrollview/HomeScrollView.js} +0 -0
|
Binary file
|
|
@@ -20,7 +20,7 @@ export default $AbstractTheme.declare("AppTheme", {
|
|
|
20
20
|
///////////////////////////////////////////////////////////////////////
|
|
21
21
|
RobotoRegular: "RobotoRegular",
|
|
22
22
|
RobotoBold: "RobotoBold",
|
|
23
|
-
|
|
23
|
+
MockIcons: "",
|
|
24
24
|
|
|
25
25
|
///////////////////////////////////////////////////////////////////////
|
|
26
26
|
// COLORS
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import $RenderedView from "@RenderedView";
|
|
1
|
+
import $View from "@View";
|
|
3
2
|
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
4
3
|
import $TextPrimitive from "@TextPrimitive";
|
|
5
4
|
|
|
@@ -10,12 +9,12 @@ import $Theme from "@Theme";
|
|
|
10
9
|
*
|
|
11
10
|
* @name PlayButtonView
|
|
12
11
|
* @class
|
|
13
|
-
* @extends
|
|
12
|
+
* @extends View
|
|
14
13
|
*
|
|
15
14
|
* @property {boolean} isInteractive flag
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
|
-
export default $
|
|
17
|
+
export default $View.declare("PlayButtonView", {
|
|
19
18
|
statics: /** @lends PlayButtonView */ {
|
|
20
19
|
MARGIN: 20
|
|
21
20
|
},
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"id": "df2bf24f-587c-4d28-8514-d6077d2d3a42",
|
|
5
|
+
"original_title": "Halloween III: Season of the Witch",
|
|
6
|
+
"imageUrl": "https://image.tmdb.org/t/p/original/WABfdeaThFYXCySGIOvRNv2sSW.jpg",
|
|
7
|
+
"fallbackUrl": "https://image.tmdb.org/t/p/original/eyOKqtgNeEEIp7zYMHnpISpsaS3.jpg"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "e27b38c1-ad1b-4636-a738-ff8dcfdb109d",
|
|
11
|
+
"original_title": "Superman: Doomsday",
|
|
12
|
+
"imageUrl": "https://image.tmdb.org/t/p/original/itvuWm7DFWWzWgW0xgiaKzzWszP.jpg",
|
|
13
|
+
"fallbackUrl": "https://image.tmdb.org/t/p/original/oTPSjQyETTFYDehdbiG8yi2oDmL.jpg"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "875c0a94-2735-4bf3-9e8c-76d426871ded",
|
|
17
|
+
"original_title": "White Heat",
|
|
18
|
+
"imageUrl": "https://image.tmdb.org/t/p/original/4ekAK25fz1FDzRUHuJs171uiVaI.jpg",
|
|
19
|
+
"fallbackUrl": "https://image.tmdb.org/t/p/original/cap8458wFeRCJSKxL758dI82TRK.jpg"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "fd82d7eb-3028-4206-891b-8132130f37ba",
|
|
23
|
+
"original_title": "Greed",
|
|
24
|
+
"imageUrl": "https://image.tmdb.org/t/p/original/mZPmDFlVp1BSGQD4QCKHOwbXLfv.jpg",
|
|
25
|
+
"fallbackUrl": "https://image.tmdb.org/t/p/original/cgmGPmyeShz9zM9GQM5EEgMutnd.jpg"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "23dafbcc-5cc6-43ba-977a-32100e1e6e53",
|
|
29
|
+
"original_title": "Hello, Dolly!",
|
|
30
|
+
"imageUrl": "https://image.tmdb.org/t/p/original/aPZOt9BR3gnk1RyX924ySq81S4P.jpg",
|
|
31
|
+
"fallbackUrl": "https://image.tmdb.org/t/p/original/rvsPkUYhWZkAKMb2fnWHw5pNAjZ.jpg"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "9fb75c7e-3dc4-4e7a-a048-29eb4b2ab734",
|
|
35
|
+
"original_title": "Wrong Place",
|
|
36
|
+
"imageUrl": "https://image.tmdb.org/t/p/original/mlEtOQAQVy6eW65sHz3UduvzRK.jpg",
|
|
37
|
+
"fallbackUrl": "https://image.tmdb.org/t/p/original/zSre0UHWLSnDoNrM9F2Go9OXq5G.jpg"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -4,10 +4,12 @@ import $RectanglePrimitive from "@RectanglePrimitive";
|
|
|
4
4
|
import $MenuView from "@MenuView";
|
|
5
5
|
import $HomeScrollView from "@HomeScrollView";
|
|
6
6
|
import $Theme from "@Theme";
|
|
7
|
+
import $HighlightRailItemView from "@HighlightRailItemView";
|
|
7
8
|
|
|
8
9
|
// TODO remove and get data from service
|
|
9
10
|
import $ListModel from "@ListModel";
|
|
10
11
|
import homeScrollMock from "homeScrollViewMock.json!";
|
|
12
|
+
import highlightMock from "highlightMock.json!";
|
|
11
13
|
import menuMock from "menuMock.json!";
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -19,6 +21,15 @@ import menuMock from "menuMock.json!";
|
|
|
19
21
|
* @screen
|
|
20
22
|
*/
|
|
21
23
|
export default $AppScreen.declare("HomeScreen", {
|
|
24
|
+
statics: /** @lends HomeScreen */ {
|
|
25
|
+
MARGIN_TOP: 60,
|
|
26
|
+
MARGIN_LEFT: 108,
|
|
27
|
+
LOGO_WIDTH: 183,
|
|
28
|
+
LOGO_HEIGHT: 60,
|
|
29
|
+
LOGO_X: 1642,
|
|
30
|
+
MENU_SCROLL_GAP: 100,
|
|
31
|
+
SCREEN_HORIZONTAL_MARGIN: 50
|
|
32
|
+
},
|
|
22
33
|
|
|
23
34
|
children: /** @lends HomeScreen.prototype */ {
|
|
24
35
|
background: {class: $RectanglePrimitive},
|
|
@@ -27,6 +38,7 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
27
38
|
url: ({theme}) => theme.getImageUrl($Theme.APP_LOGO_URL)
|
|
28
39
|
},
|
|
29
40
|
menu: {class: $MenuView},
|
|
41
|
+
highlight: {class: $HighlightRailItemView},
|
|
30
42
|
scrollView: {class: $HomeScrollView}
|
|
31
43
|
},
|
|
32
44
|
|
|
@@ -37,7 +49,7 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
37
49
|
|
|
38
50
|
/**
|
|
39
51
|
* Prepare screen data: get the business data to feed the views
|
|
40
|
-
* View should always be
|
|
52
|
+
* View should always be fulfilled with business model(s).
|
|
41
53
|
*
|
|
42
54
|
* It must return an Object.
|
|
43
55
|
*
|
|
@@ -46,13 +58,15 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
46
58
|
* @override
|
|
47
59
|
*/
|
|
48
60
|
prepareData: function (context) {
|
|
49
|
-
if(!context.isBack) {
|
|
61
|
+
if (!context.isBack) {
|
|
50
62
|
// TODO get data from service
|
|
51
63
|
const data = {};
|
|
52
64
|
const scrollData = this._getScrollDataFromMock();
|
|
53
|
-
const menuData= this._getMenuDataFromMock();
|
|
65
|
+
const menuData = this._getMenuDataFromMock();
|
|
66
|
+
const highlightData = this._getHighlightDataFromMock();
|
|
54
67
|
data.scrollData = scrollData;
|
|
55
68
|
data.menuData = menuData;
|
|
69
|
+
data.highlightData = highlightData;
|
|
56
70
|
return Promise.resolve(data);
|
|
57
71
|
}
|
|
58
72
|
return Promise.resolve(this.data)
|
|
@@ -68,11 +82,15 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
68
82
|
connectData: function (context) {
|
|
69
83
|
this.scrollView.setData(this.data.scrollData, {index: this.data.scrollIndex});
|
|
70
84
|
this.menu.setData(this.data.menuData);
|
|
85
|
+
this.highlight.setData(this.data.highlightData);
|
|
71
86
|
},
|
|
72
87
|
|
|
73
88
|
_getChildToFocus: function (options) {
|
|
74
|
-
if(options.isBack && options.previousScreenId === "fipScreen") {
|
|
75
|
-
return this.scrollView
|
|
89
|
+
if (options.isBack && options.previousScreenId === "fipScreen") {
|
|
90
|
+
return this.scrollView;
|
|
91
|
+
}
|
|
92
|
+
if (options.isBack && options.previousScreenId === "playerScreen") {
|
|
93
|
+
return this.highlight;
|
|
76
94
|
}
|
|
77
95
|
return this.menu;
|
|
78
96
|
},
|
|
@@ -82,10 +100,12 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
82
100
|
*/
|
|
83
101
|
down: function (key) {
|
|
84
102
|
if (this.focusedChild === this.menu) {
|
|
103
|
+
return this.highlight.focus();
|
|
104
|
+
}
|
|
105
|
+
if (this.focusedChild === this.highlight) {
|
|
106
|
+
this._showScrollView();
|
|
85
107
|
return this.scrollView.focus();
|
|
86
108
|
}
|
|
87
|
-
this.menu.hide();
|
|
88
|
-
this.setState("hideLogo")
|
|
89
109
|
return this.focusedChild.down();
|
|
90
110
|
},
|
|
91
111
|
|
|
@@ -93,18 +113,19 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
93
113
|
* @override
|
|
94
114
|
*/
|
|
95
115
|
up: function (key) {
|
|
96
|
-
let nav;
|
|
97
116
|
|
|
117
|
+
if (this.focusedChild === this.highlight) {
|
|
118
|
+
return this.menu.focus();
|
|
119
|
+
}
|
|
98
120
|
if (this.focusedChild === this.scrollView) {
|
|
99
|
-
nav = this.scrollView.up();
|
|
100
|
-
if
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
121
|
+
let nav = this.scrollView.up();
|
|
122
|
+
if(!nav) {
|
|
123
|
+
this._hideScrollView();
|
|
124
|
+
return this.highlight.focus();
|
|
125
|
+
} else {
|
|
126
|
+
return nav;
|
|
103
127
|
}
|
|
104
128
|
}
|
|
105
|
-
if (!nav) {
|
|
106
|
-
return this.menu.focus();
|
|
107
|
-
}
|
|
108
129
|
return false;
|
|
109
130
|
},
|
|
110
131
|
|
|
@@ -115,6 +136,9 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
115
136
|
if (this.focusedChild === this.menu) {
|
|
116
137
|
return this.menu.right();
|
|
117
138
|
}
|
|
139
|
+
if (this.focusedChild === this.highlight) {
|
|
140
|
+
return this.highlight.right();
|
|
141
|
+
}
|
|
118
142
|
return this.scrollView.right();
|
|
119
143
|
},
|
|
120
144
|
|
|
@@ -125,6 +149,9 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
125
149
|
if (this.focusedChild === this.menu) {
|
|
126
150
|
return this.menu.left();
|
|
127
151
|
}
|
|
152
|
+
if (this.focusedChild === this.highlight) {
|
|
153
|
+
return this.highlight.left();
|
|
154
|
+
}
|
|
128
155
|
return this.scrollView.left();
|
|
129
156
|
},
|
|
130
157
|
|
|
@@ -134,19 +161,25 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
134
161
|
ok: function (key) {
|
|
135
162
|
if (this.focusedChild === this.menu) {
|
|
136
163
|
const route = this.menu.buttonList.dataItem.route;
|
|
137
|
-
|
|
164
|
+
if (route !== "home") {
|
|
165
|
+
return this.route(route);
|
|
166
|
+
}
|
|
138
167
|
}
|
|
139
168
|
if (this.focusedChild === this.scrollView) {
|
|
140
169
|
this.data.scrollIndex = this.focusedChild.index
|
|
141
170
|
return this.route("fip", { data: this.scrollView.dataItem });
|
|
142
171
|
}
|
|
172
|
+
if (this.focusedChild === this.highlight) {
|
|
173
|
+
return this.route("player");
|
|
174
|
+
}
|
|
143
175
|
},
|
|
144
176
|
|
|
145
177
|
/**
|
|
146
178
|
* @override
|
|
147
179
|
*/
|
|
148
180
|
back: function (key) {
|
|
149
|
-
|
|
181
|
+
// Do not route to SplashScreen
|
|
182
|
+
return false;
|
|
150
183
|
},
|
|
151
184
|
|
|
152
185
|
_getScrollDataFromMock: function() {
|
|
@@ -172,13 +205,31 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
172
205
|
_getMenuDataFromMock: function() {
|
|
173
206
|
return menuMock.data.map((el) => ({ iconText: el.iconText, text: el.text, route: el.route }))
|
|
174
207
|
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
_getHighlightDataFromMock: function () {
|
|
211
|
+
return highlightMock.data.map((el) => ({imageUrl: el.fallbackUrl, title: el.original_title}));
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
_showScrollView: function () {
|
|
215
|
+
this.setState("hideLogoAndHighlight");
|
|
216
|
+
this.menu.hide();
|
|
217
|
+
this.highlight.stopCarousel();
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
_hideScrollView: function () {
|
|
221
|
+
this.setState("!hideLogoAndHighlight");
|
|
222
|
+
this.menu.show();
|
|
223
|
+
this.highlight.startCarousel();
|
|
175
224
|
}
|
|
176
225
|
},
|
|
177
226
|
|
|
178
227
|
states: {
|
|
179
|
-
|
|
228
|
+
hideLogoAndHighlight: {
|
|
180
229
|
"logo.opacity": 0,
|
|
181
|
-
|
|
230
|
+
"highlight.opacity": 0,
|
|
231
|
+
"highlight.height": 0
|
|
232
|
+
},
|
|
182
233
|
},
|
|
183
234
|
|
|
184
235
|
style: {
|
|
@@ -188,18 +239,24 @@ export default $AppScreen.declare("HomeScreen", {
|
|
|
188
239
|
fillColor: $Theme.COLOR_BACKGROUND
|
|
189
240
|
},
|
|
190
241
|
menu: {
|
|
191
|
-
x:
|
|
192
|
-
y:
|
|
242
|
+
x: ({parent}) => parent.statics.MARGIN_LEFT,
|
|
243
|
+
y: ({parent}) => parent.statics.MARGIN_TOP,
|
|
244
|
+
height:({parent}) => parent.statics.MARGIN_TOP
|
|
193
245
|
},
|
|
194
246
|
logo: {
|
|
195
|
-
width:
|
|
196
|
-
height:
|
|
197
|
-
x: ({
|
|
198
|
-
y:
|
|
247
|
+
width: ({parent}) => parent.statics.LOGO_WIDTH,
|
|
248
|
+
height: ({parent}) => parent.statics.LOGO_HEIGHT,
|
|
249
|
+
x: ({parent}) => parent.statics.LOGO_X,
|
|
250
|
+
y: ({parent}) => parent.statics.MARGIN_TOP
|
|
251
|
+
},
|
|
252
|
+
highlight: {
|
|
253
|
+
height: 668,
|
|
254
|
+
width: $Theme.FULL_SCREEN_WIDTH,
|
|
255
|
+
y: ({parent}) => parent.menu.y + 120
|
|
199
256
|
},
|
|
200
257
|
scrollView: {
|
|
201
|
-
x:
|
|
202
|
-
y:
|
|
258
|
+
x: ({parent}) => parent.statics.MARGIN_LEFT,
|
|
259
|
+
y: ({parent}) => parent.highlight.y + parent.highlight.height + 100
|
|
203
260
|
}
|
|
204
261
|
}
|
|
205
262
|
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import $ListViewItem from "@ListViewItem";
|
|
2
|
+
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
3
|
+
import $Theme from "@Theme";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Display dots
|
|
7
|
+
*
|
|
8
|
+
* @name DotsListItemView
|
|
9
|
+
* @class
|
|
10
|
+
* @extends ListViewItem
|
|
11
|
+
* @property {boolean} isInteractive - interactive item for pointer
|
|
12
|
+
*/
|
|
13
|
+
export default $ListViewItem.declare("DotsListItemView", {
|
|
14
|
+
properties: /** @lends DotsListItemView.prototype */ {
|
|
15
|
+
isInteractive: true
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
children: /** @lends DotsListItemView.prototype */ {
|
|
19
|
+
dotsView: {class: $RectanglePrimitive}
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
transitions: {
|
|
23
|
+
scale: {duration: 100}
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
style: {
|
|
27
|
+
height: ({dotsView}) => dotsView.height,
|
|
28
|
+
width: ({dotsView}) => dotsView.width,
|
|
29
|
+
x: ({previousItem}) => previousItem == null ? 0 : previousItem.x + previousItem.width + 20,
|
|
30
|
+
dotsView: {
|
|
31
|
+
width: 18,
|
|
32
|
+
height: 18,
|
|
33
|
+
borderRadius: 9,
|
|
34
|
+
fillColor: ({parent})=> parent.isSelected ? $Theme.COLOR_ACCENT : $Theme.COLOR_TEXT
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import $ListView from "@ListView";
|
|
2
|
+
import $DotsListItemView from "@DotsListItemView";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Displays a list of dots
|
|
6
|
+
*
|
|
7
|
+
* @name DotsListView
|
|
8
|
+
* @class
|
|
9
|
+
* @extends ListView
|
|
10
|
+
*
|
|
11
|
+
* @property {DotsListItemView} itemViewClass - the itemViewClass
|
|
12
|
+
*/
|
|
13
|
+
export default $ListView.declare("DotsListView", {
|
|
14
|
+
properties: /** @lends DotsListView.prototype */ {
|
|
15
|
+
itemViewClass: () => $DotsListItemView
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
style: {
|
|
19
|
+
height: ({lastItemView}) => lastItemView ? lastItemView.height : 0,
|
|
20
|
+
width: ({lastItemView}) => lastItemView ? lastItemView.width + lastItemView.x : 0
|
|
21
|
+
}
|
|
22
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import $View from "@View";
|
|
2
|
+
import $ImagePrimitive from "@ImagePrimitive";
|
|
3
|
+
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
4
|
+
import $TextPrimitive from "@TextPrimitive";
|
|
5
|
+
import $HighlightPlayButtonView from "@HighlightPlayButtonView";
|
|
6
|
+
import $Theme from "@Theme";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Displays content description
|
|
10
|
+
*
|
|
11
|
+
* @name HighlightContentDescriptionView
|
|
12
|
+
* @class
|
|
13
|
+
* @extends View
|
|
14
|
+
*/
|
|
15
|
+
export default $View.declare("HighlightContentDescriptionView", {
|
|
16
|
+
statics: /** @lends HighlightContentDescriptionView */ {
|
|
17
|
+
WIDTH: 696,
|
|
18
|
+
CONTENT_TITLE_SIZE: 42,
|
|
19
|
+
DEFAULT_FONT_SIZE: 20,
|
|
20
|
+
SCREEN_HORIZONTAL_MARGIN: 50,
|
|
21
|
+
COLOR_TRANSPARENT: "#00000000",
|
|
22
|
+
HIGHLIGHT_HEIGHT: 668,
|
|
23
|
+
DOWNGRADIENT_HEIGHT: 200
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
children: /** @lends HighlightContentDescriptionView.prototype */ {
|
|
27
|
+
highlightImage: {
|
|
28
|
+
class: $ImagePrimitive
|
|
29
|
+
},
|
|
30
|
+
rightGradient: {
|
|
31
|
+
class: $RectanglePrimitive
|
|
32
|
+
},
|
|
33
|
+
downGradient: {
|
|
34
|
+
class: $RectanglePrimitive
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
class: $TextPrimitive,
|
|
38
|
+
text: "No title"
|
|
39
|
+
},
|
|
40
|
+
playButton: {
|
|
41
|
+
class: $HighlightPlayButtonView
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
methods: {
|
|
46
|
+
setData: function (data) {
|
|
47
|
+
this.highlightImage.url = data.imageUrl || "";
|
|
48
|
+
this.title.text = data.title || "no title";
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
52
|
+
// FOCUS
|
|
53
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
54
|
+
|
|
55
|
+
_getChildToFocus: function () {
|
|
56
|
+
return this.playButton;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
style: /** @lends HighlightContentDescriptionView.prototype */ {
|
|
61
|
+
height: 668,
|
|
62
|
+
width: $Theme.FULL_SCREEN_WIDTH,
|
|
63
|
+
highlightImage: {
|
|
64
|
+
width: ({parent}) => parent.width,
|
|
65
|
+
height: 668,
|
|
66
|
+
opacity: 0.8
|
|
67
|
+
},
|
|
68
|
+
rightGradient: {
|
|
69
|
+
width: $Theme.FULL_SCREEN_WIDTH / 2,
|
|
70
|
+
height: ({parent})=> parent.height,
|
|
71
|
+
gradientDirection: "to right",
|
|
72
|
+
gradientColorStart: $Theme.COLOR_BACKGROUND,
|
|
73
|
+
gradientColorEnd: ({parent}) => parent.statics.COLOR_TRANSPARENT
|
|
74
|
+
},
|
|
75
|
+
downGradient: {
|
|
76
|
+
y: ({parent}) => parent.height - parent.statics.DOWNGRADIENT_HEIGHT,
|
|
77
|
+
width: $Theme.FULL_SCREEN_WIDTH,
|
|
78
|
+
height: ({parent}) => parent.statics.DOWNGRADIENT_HEIGHT,
|
|
79
|
+
gradientDirection: "to bottom",
|
|
80
|
+
gradientColorStart: ({parent}) => parent.statics.COLOR_TRANSPARENT,
|
|
81
|
+
gradientColorEnd: $Theme.COLOR_BACKGROUND
|
|
82
|
+
},
|
|
83
|
+
title: {
|
|
84
|
+
// eslint-disable-next-line @dana/no-use-width-height-auto
|
|
85
|
+
isAuto_width: true,
|
|
86
|
+
height: ({parent}) => parent.statics.CONTENT_TITLE_SIZE + 10,
|
|
87
|
+
size: ({parent}) => parent.statics.CONTENT_TITLE_SIZE,
|
|
88
|
+
x: ({parent}) => parent.statics.SCREEN_HORIZONTAL_MARGIN,
|
|
89
|
+
y: ({parent, height}) => (parent.height - height) / 2 + 100,
|
|
90
|
+
family: $Theme.RobotoBold,
|
|
91
|
+
color: $Theme.COLOR_TEXT
|
|
92
|
+
},
|
|
93
|
+
playButton: {
|
|
94
|
+
x: ({parent}) => parent.statics.SCREEN_HORIZONTAL_MARGIN,
|
|
95
|
+
y: ({parent}) => parent.title.y + 100,
|
|
96
|
+
size: 30
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import $View from "@View";
|
|
2
|
+
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
3
|
+
import $TextPrimitive from "@TextPrimitive";
|
|
4
|
+
|
|
5
|
+
import $Theme from "@Theme";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Play Button
|
|
9
|
+
*
|
|
10
|
+
* @name HighlightPlayButtonView
|
|
11
|
+
* @class
|
|
12
|
+
* @extends View
|
|
13
|
+
*
|
|
14
|
+
* @property {boolean} isInteractive flag
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export default $View.declare("HighlightPlayButtonView", {
|
|
18
|
+
statics: /** @lends HighlightPlayButtonView */ {
|
|
19
|
+
MARGIN: 20
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
properties: /** @lends HighlightPlayButtonView.prototype */ {
|
|
23
|
+
isInteractive: true
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
children: /** @lends HighlightPlayButtonView.prototype */ {
|
|
27
|
+
button: {
|
|
28
|
+
class: $RectanglePrimitive
|
|
29
|
+
},
|
|
30
|
+
title: {
|
|
31
|
+
class: $TextPrimitive,
|
|
32
|
+
text: "Play"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
states: {
|
|
37
|
+
focused: {
|
|
38
|
+
"button.borderColor": $Theme.COLOR_TEXT
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
style: /** @lends HighlightPlayButtonView.prototype */ {
|
|
43
|
+
width: ({title, statics}) => title.width + 2 * statics.MARGIN,
|
|
44
|
+
height: 60,
|
|
45
|
+
title: {
|
|
46
|
+
color: $Theme.COLOR_TEXT,
|
|
47
|
+
size: 35,
|
|
48
|
+
x: ({parent}) => parent.statics.MARGIN,
|
|
49
|
+
y: 8,
|
|
50
|
+
isAuto_width: true, // eslint-disable-line @dana/no-use-width-height-auto
|
|
51
|
+
height: 50,
|
|
52
|
+
family: $Theme.RobotoBold
|
|
53
|
+
},
|
|
54
|
+
button: {
|
|
55
|
+
borderWidth: 5,
|
|
56
|
+
fillColor: $Theme.COLOR_ACCENT,
|
|
57
|
+
borderColor: $Theme.COLOR_ACCENT,
|
|
58
|
+
width: ({parent}) => parent.width,
|
|
59
|
+
height: 60,
|
|
60
|
+
borderRadius: 12
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import $ScrollItemView from "@ScrollItemView";
|
|
2
|
+
// CONST
|
|
3
|
+
import $DateUtils from "@DateUtils";
|
|
4
|
+
import $TimerManager from "@TimerManager";
|
|
5
|
+
import $Easing from "@Easing";
|
|
6
|
+
// VIEW
|
|
7
|
+
import $HighlightContentDescriptionView from "@HighlightContentDescriptionView";
|
|
8
|
+
import $DotsListView from "@DotsListView";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @name HighlightRailItemView
|
|
12
|
+
* @class
|
|
13
|
+
* @extends ScrollItemView
|
|
14
|
+
* @property {number} nbViewBefore - the number of highlightTile to keep before
|
|
15
|
+
* @property {number} nbViewAfter - the number of highlightTile to keep after
|
|
16
|
+
* @property {number} direction - the screen direction
|
|
17
|
+
* @property {TimerManager} timerManager - the TimerManager instance
|
|
18
|
+
* @property {Boolean} interactiveArrow - disable arrows
|
|
19
|
+
*/
|
|
20
|
+
export default $ScrollItemView.declare("HighlightRailItemView", {
|
|
21
|
+
|
|
22
|
+
statics: {
|
|
23
|
+
RATIO: 4 / 15,
|
|
24
|
+
HIGHLIGHT_HEIGHT: 668,
|
|
25
|
+
CAROUSEL_TIMEOUT_ID: "CAROUSEL_TIMEOUT_ID",
|
|
26
|
+
CAROUSEL_TIMEOUT_VALUE: 5 // in seconds
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
properties: {
|
|
30
|
+
nbViewBefore: 0,
|
|
31
|
+
nbViewAfter: 0,
|
|
32
|
+
direction: ({parent}) => parent.direction, // eslint-disable-line @dana/no-parent-on-top-level
|
|
33
|
+
timerManager: {class: $TimerManager},
|
|
34
|
+
interactiveArrow: false
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
children: {
|
|
38
|
+
contentDescriptionView: {
|
|
39
|
+
class: $HighlightContentDescriptionView
|
|
40
|
+
},
|
|
41
|
+
dotsView: {
|
|
42
|
+
class: $DotsListView
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
methods: /** @lends HighlightRailItemView.prototype */ {
|
|
47
|
+
|
|
48
|
+
//////////////////
|
|
49
|
+
// INPUTS
|
|
50
|
+
//////////////////
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @override
|
|
54
|
+
*/
|
|
55
|
+
left: function (key) {
|
|
56
|
+
this.resetCarousel();
|
|
57
|
+
this.__checkFirstListIndex();
|
|
58
|
+
this.previous();
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @override
|
|
63
|
+
*/
|
|
64
|
+
right: function (key) {
|
|
65
|
+
this.resetCarousel();
|
|
66
|
+
this.__checkLastListIndex();
|
|
67
|
+
this.next();
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
up: function (key) {
|
|
71
|
+
return false;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @override
|
|
76
|
+
*/
|
|
77
|
+
down: function (key) {
|
|
78
|
+
return false;
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
_setData: function (data, options = {}) {
|
|
82
|
+
this.list.setData(data);
|
|
83
|
+
if (data && data.length > 1) {
|
|
84
|
+
this.dotsView.setData(data, {index: this.list.index});
|
|
85
|
+
} else {
|
|
86
|
+
this.dotsView.setData([]);
|
|
87
|
+
}
|
|
88
|
+
this._updateContent();
|
|
89
|
+
this.startCarousel();
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
_updateContent: function () {
|
|
93
|
+
const data = this.list.data[this.list.index];
|
|
94
|
+
|
|
95
|
+
this.contentDescriptionView.setData(data);
|
|
96
|
+
this.dotsView.selectItem(this.list.index);
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
next: function () {
|
|
100
|
+
this.list.index++;
|
|
101
|
+
this._updateContent();
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
previous: function () {
|
|
105
|
+
this.list.index--;
|
|
106
|
+
this._updateContent();
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @override
|
|
111
|
+
*/
|
|
112
|
+
hide: function () {
|
|
113
|
+
this.stopCarousel();
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
stopCarousel: function () {
|
|
117
|
+
this.timerManager.clearInterval(this.statics.CAROUSEL_TIMEOUT_ID);
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
startCarousel: function () {
|
|
121
|
+
if (this.list.data.length > 1) {
|
|
122
|
+
this.timerManager.setInterval(() => {
|
|
123
|
+
this.__checkLastListIndex();
|
|
124
|
+
this.next();
|
|
125
|
+
}, this.statics.CAROUSEL_TIMEOUT_VALUE * $DateUtils.ONE_SECOND, this.statics.CAROUSEL_TIMEOUT_ID);
|
|
126
|
+
} else {
|
|
127
|
+
this.timerManager.clearInterval(this.statics.CAROUSEL_TIMEOUT_ID);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
resetCarousel: function () {
|
|
132
|
+
this.stopCarousel();
|
|
133
|
+
this.startCarousel();
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
//////////////////
|
|
137
|
+
// FOCUS
|
|
138
|
+
//////////////////
|
|
139
|
+
|
|
140
|
+
_getChildToFocus: function () {
|
|
141
|
+
return this.contentDescriptionView;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
//////////////////
|
|
145
|
+
// PRIVATE
|
|
146
|
+
//////////////////
|
|
147
|
+
__checkLastListIndex: function () {
|
|
148
|
+
if (this.list.index === this.list.data.length - 1) {
|
|
149
|
+
this.list.index = -1;
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
__checkFirstListIndex: function () {
|
|
154
|
+
if (this.list.index === 0) {
|
|
155
|
+
this.list.index = this.list.data.length;
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
transitions: {
|
|
161
|
+
default: {
|
|
162
|
+
scale: {
|
|
163
|
+
duration: 250,
|
|
164
|
+
easing: $Easing.linear
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
focused: {
|
|
168
|
+
scale: {
|
|
169
|
+
duration: 250,
|
|
170
|
+
easing: $Easing.linear
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
style: {
|
|
176
|
+
contentDescriptionView: {
|
|
177
|
+
y: ({parent, height}) => (parent.height - height) / 2,
|
|
178
|
+
opacity: 1
|
|
179
|
+
},
|
|
180
|
+
dotsView: {
|
|
181
|
+
y: ({parent, height}) => parent.height - height - 20,
|
|
182
|
+
x: ({parent, width}) => (parent.width - width) / 2,
|
|
183
|
+
opacity: 1
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
@@ -2,7 +2,6 @@ import $MRecyclingItem from "@MRecyclingItem";
|
|
|
2
2
|
import $View from "@View";
|
|
3
3
|
// PRIMITIVE
|
|
4
4
|
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
5
|
-
import $ContainImagePrimitive from "@ContainImagePrimitive";
|
|
6
5
|
import $TextPrimitive from "@TextPrimitive";
|
|
7
6
|
// CONST
|
|
8
7
|
import $Theme from "@Theme";
|
|
@@ -17,6 +16,10 @@ import $TextAlign from "@TextAlign";
|
|
|
17
16
|
|
|
18
17
|
export default $View.declare("MenuButtonView", {
|
|
19
18
|
traits: [$MRecyclingItem],
|
|
19
|
+
statics: /** @lends MenuButtonView */ {
|
|
20
|
+
MENU_BUTTON_MARGIN_TOP: 55,
|
|
21
|
+
MENU_BUTTON_HEIGHT: 40
|
|
22
|
+
},
|
|
20
23
|
|
|
21
24
|
children: /** @lends MenuButtonView.prototype */ {
|
|
22
25
|
button: {
|
|
@@ -47,52 +50,50 @@ export default $View.declare("MenuButtonView", {
|
|
|
47
50
|
|
|
48
51
|
states: {
|
|
49
52
|
focused: {
|
|
50
|
-
"focusBar.fillColor": $Theme.
|
|
53
|
+
"focusBar.fillColor": $Theme.COLOR_TEXT,
|
|
54
|
+
"text.color": $Theme.COLOR_TEXT,
|
|
55
|
+
"iconText.color": $Theme.COLOR_TEXT
|
|
51
56
|
}
|
|
52
57
|
},
|
|
53
58
|
|
|
54
59
|
style: /** @lends ButtonView.prototype */ {
|
|
55
|
-
width: ({
|
|
56
|
-
height:
|
|
57
|
-
x: 50,
|
|
58
|
-
y: 55,
|
|
60
|
+
width: ({iconText, text}) => text === "" ? iconText.width : (iconText.width + text.width) + 3,
|
|
61
|
+
height: ({statics}) => statics.MENU_BUTTON_HEIGHT,
|
|
59
62
|
|
|
60
63
|
button: {
|
|
61
|
-
margin:
|
|
64
|
+
margin: 6,
|
|
62
65
|
fillColor: $Theme.COLOR_BACKGROUND_LIGHT,
|
|
63
|
-
width: ({
|
|
64
|
-
height: ({
|
|
66
|
+
width: ({parent}) => parent.width,
|
|
67
|
+
height: ({parent}) => parent.height - 10
|
|
65
68
|
},
|
|
66
69
|
|
|
67
70
|
focusBar: {
|
|
68
71
|
fillColor: $Theme.COLOR_BACKGROUND_LIGHT,
|
|
69
|
-
width: ({
|
|
70
|
-
y: ({
|
|
72
|
+
width: ({parent}) =>parent.width,
|
|
73
|
+
y: ({parent}) => parent.statics.MENU_BUTTON_MARGIN_TOP - 20,
|
|
71
74
|
height: 6,
|
|
72
75
|
borderRadius: 12
|
|
73
76
|
},
|
|
74
77
|
|
|
75
78
|
text: {
|
|
76
|
-
color: $Theme.
|
|
79
|
+
color: $Theme.COLOR_MUTED,
|
|
77
80
|
height: 24,
|
|
78
81
|
lineHeight: 24,
|
|
79
82
|
x: ({parent}) => parent.iconText.width + 3,
|
|
80
|
-
y: ({
|
|
83
|
+
y: ({parent}) => parent.statics.MENU_BUTTON_MARGIN_TOP - 50,
|
|
81
84
|
family: $Theme.RobotoBold,
|
|
82
85
|
// eslint-disable-next-line @dana/no-use-width-height-auto
|
|
83
86
|
isAuto_width: true
|
|
84
87
|
},
|
|
85
88
|
|
|
86
89
|
iconText: {
|
|
87
|
-
color: $Theme.
|
|
90
|
+
color: $Theme.COLOR_MUTED,
|
|
88
91
|
align: $TextAlign.CENTER,
|
|
89
92
|
size: 20,
|
|
90
|
-
|
|
91
|
-
y: ({ parent }) => parent.y - 50,
|
|
93
|
+
y: ({parent}) => parent.statics.MENU_BUTTON_MARGIN_TOP - 50,
|
|
92
94
|
height: 24,
|
|
93
95
|
width: 24,
|
|
94
|
-
family: $Theme.
|
|
95
|
-
|
|
96
|
+
family: $Theme.MockIcons
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
});
|
|
@@ -17,13 +17,19 @@ import menuMock from "menuMock.json!";
|
|
|
17
17
|
|
|
18
18
|
export default $View.declare("MenuView", {
|
|
19
19
|
traits: [$MRecyclingItem],
|
|
20
|
+
statics: /** @lends MenuView */ {
|
|
21
|
+
MENU_CONTAINER_WIDTH: 343,
|
|
22
|
+
MENU_CONTAINER_HEIGHT: 60,
|
|
23
|
+
GAP_BETWEEN_BUTTON: 10,
|
|
24
|
+
BUTTON_LIST_HEIGHT: 36
|
|
25
|
+
},
|
|
20
26
|
children: /** @lends MenuView.prototype */ {
|
|
21
27
|
menuContainer: {
|
|
22
28
|
class: $RectanglePrimitive
|
|
23
29
|
},
|
|
24
30
|
profileImage: {
|
|
25
31
|
class: $ContainImagePrimitive,
|
|
26
|
-
url: "
|
|
32
|
+
url: ({theme}) => theme.getImageUrl("profile")
|
|
27
33
|
},
|
|
28
34
|
buttonList: {
|
|
29
35
|
class: $MenuListView
|
|
@@ -56,30 +62,26 @@ export default $View.declare("MenuView", {
|
|
|
56
62
|
|
|
57
63
|
style: /** @lends MenuView.prototype */ {
|
|
58
64
|
width: $Theme.FULL_SCREEN_WIDTH / 5,
|
|
59
|
-
height:
|
|
60
|
-
x: 0,
|
|
61
|
-
y: 50,
|
|
65
|
+
height: ({statics}) => statics.MENU_CONTAINER_HEIGHT,
|
|
62
66
|
|
|
63
67
|
menuContainer: {
|
|
64
68
|
fillColor: $Theme.COLOR_BACKGROUND_LIGHT,
|
|
65
|
-
width: ({
|
|
66
|
-
|
|
67
|
-
y: ({ parent }) => parent.y,
|
|
68
|
-
height: 50,
|
|
69
|
+
width: ({parent}) => parent.statics.MENU_CONTAINER_WIDTH,
|
|
70
|
+
height: ({parent}) => parent.statics.MENU_CONTAINER_HEIGHT,
|
|
69
71
|
borderRadius: 25
|
|
70
72
|
},
|
|
71
73
|
|
|
72
74
|
profileImage: {
|
|
73
|
-
x: ({ parent }) => parent.x - 50,
|
|
74
|
-
y: ({ parent }) => parent.y,
|
|
75
75
|
width: 55,
|
|
76
|
-
height:
|
|
76
|
+
height: 60,
|
|
77
77
|
size: 50,
|
|
78
78
|
borderRadius: 25
|
|
79
79
|
},
|
|
80
80
|
|
|
81
81
|
buttonList: {
|
|
82
|
-
x: ({
|
|
82
|
+
x: ({parent}) => parent.statics.GAP_BETWEEN_BUTTON + parent.profileImage.width,
|
|
83
|
+
height: ({parent}) => parent.statics.BUTTON_LIST_HEIGHT,
|
|
84
|
+
y: ({parent, height}) => Math.floor((parent.height - height) / 2)
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
});
|
|
@@ -55,7 +55,7 @@ export default $View.declare("PlayerControlButtonView", {
|
|
|
55
55
|
x: ({parent}) => (parent.statics.BUTTON_WIDTH - parent.statics.FONT_SIZE) / 2,
|
|
56
56
|
y: ({parent}) => (parent.statics.BUTTON_HEIGHT - parent.statics.FONT_SIZE) / 2,
|
|
57
57
|
align: $TextAlign.CENTER,
|
|
58
|
-
family: $Theme.
|
|
58
|
+
family: $Theme.MockIcons,
|
|
59
59
|
color: $Theme.COLOR_BACKGROUND,
|
|
60
60
|
size: ({parent}) => parent.statics.FONT_SIZE
|
|
61
61
|
}
|
|
@@ -87,7 +87,7 @@ export default $AbstractKeyboardRowItemView.declare("SearchKeyboardRowItemView",
|
|
|
87
87
|
width: ({ parent }) => parent.width,
|
|
88
88
|
size: ({ parent }) => ((parent.data && parent.data.ratio) || 1) * 10,
|
|
89
89
|
align: $TextAlign.CENTER,
|
|
90
|
-
family: $Theme.
|
|
90
|
+
family: $Theme.MockIcons,
|
|
91
91
|
color: $Theme.COLOR_TEXT,
|
|
92
92
|
},
|
|
93
93
|
},
|
package/modules/vod/package.json
CHANGED
|
@@ -18,6 +18,14 @@ import menuMock from "menuMock.json!";
|
|
|
18
18
|
* @screen
|
|
19
19
|
*/
|
|
20
20
|
export default $AppScreen.declare("VodScreen", {
|
|
21
|
+
statics: /** @lends VodScreen */ {
|
|
22
|
+
MARGIN_TOP: 60,
|
|
23
|
+
MARGIN_LEFT: 108,
|
|
24
|
+
LOGO_WIDTH: 183,
|
|
25
|
+
LOGO_HEIGHT: 60,
|
|
26
|
+
LOGO_X: 1642,
|
|
27
|
+
MENU_SCROLL_GAP: 100
|
|
28
|
+
},
|
|
21
29
|
children: /** @lends VodScreen.prototype */ {
|
|
22
30
|
background: { class: $RectanglePrimitive },
|
|
23
31
|
logo: {
|
|
@@ -132,7 +140,9 @@ export default $AppScreen.declare("VodScreen", {
|
|
|
132
140
|
ok: function (key) {
|
|
133
141
|
if (this.focusedChild === this.menu) {
|
|
134
142
|
const route = this.menu.buttonList.dataItem.route;
|
|
135
|
-
|
|
143
|
+
if (route !== "vod") {
|
|
144
|
+
return this.route(route);
|
|
145
|
+
}
|
|
136
146
|
}
|
|
137
147
|
if (this.focusedChild === this.scrollView) {
|
|
138
148
|
this.data.scrollIndex = this.focusedChild.index
|
|
@@ -183,21 +193,22 @@ export default $AppScreen.declare("VodScreen", {
|
|
|
183
193
|
background: {
|
|
184
194
|
width: $Theme.FULL_SCREEN_WIDTH,
|
|
185
195
|
height: $Theme.FULL_SCREEN_HEIGHT,
|
|
186
|
-
fillColor: $Theme.COLOR_BACKGROUND
|
|
196
|
+
fillColor: $Theme.COLOR_BACKGROUND
|
|
187
197
|
},
|
|
188
198
|
menu: {
|
|
189
|
-
x:
|
|
190
|
-
y:
|
|
199
|
+
x: ({parent}) => parent.statics.MARGIN_LEFT,
|
|
200
|
+
y: ({parent}) => parent.statics.MARGIN_TOP,
|
|
201
|
+
height: ({parent}) => parent.statics.MARGIN_TOP
|
|
191
202
|
},
|
|
192
203
|
logo: {
|
|
193
|
-
width:
|
|
194
|
-
height:
|
|
195
|
-
x: ({
|
|
196
|
-
y:
|
|
204
|
+
width: ({parent}) => parent.statics.LOGO_WIDTH,
|
|
205
|
+
height: ({parent}) => parent.statics.LOGO_HEIGHT,
|
|
206
|
+
x: ({parent}) => parent.statics.LOGO_X,
|
|
207
|
+
y: ({parent}) => parent.statics.MARGIN_TOP
|
|
197
208
|
},
|
|
198
209
|
scrollView: {
|
|
199
|
-
x:
|
|
200
|
-
y:
|
|
201
|
-
}
|
|
202
|
-
}
|
|
210
|
+
x: ({parent}) => parent.statics.MARGIN_LEFT,
|
|
211
|
+
y: ({parent}) => parent.menu.y + parent.menu.height + parent.statics.MENU_SCROLL_GAP
|
|
212
|
+
}
|
|
213
|
+
}
|
|
203
214
|
});
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import $RenderedView from "@RenderedView";
|
|
1
|
+
import $View from "@View";
|
|
3
2
|
import $TextPrimitive from "@TextPrimitive";
|
|
4
3
|
import $RectanglePrimitive from "@RectanglePrimitive";
|
|
5
4
|
import $Theme from "@Theme";
|
|
@@ -9,9 +8,9 @@ import $Theme from "@Theme";
|
|
|
9
8
|
*
|
|
10
9
|
* @name PlayButtonView
|
|
11
10
|
* @class
|
|
12
|
-
* @extends
|
|
11
|
+
* @extends View
|
|
13
12
|
*/
|
|
14
|
-
export default $
|
|
13
|
+
export default $View.declare("PlayButtonView", {
|
|
15
14
|
statics: /** @lends PlayButtonView */ {
|
|
16
15
|
MARGIN: 20,
|
|
17
16
|
COLOR_BLACK_0_8: "#00000080"
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|