Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 374f81b

Browse files
committed
Updated to 0.2.0
1 parent b06dada commit 374f81b

43 files changed

Lines changed: 723 additions & 153 deletions

Some content is hidden

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

README-RU.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ AppLauncher поддерживает:
7878

7979
- NV-102 (+)
8080

81-
- NV-300
81+
- NV-300 (+)
8282

8383
- Mag STB (Aura STB)
8484

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ AppLauncher
88
AppLauncher allows running Smart TV and STB application avoiding standard
99
installation process.
1010

11-
AppLauncher lets to create list of applications URLs to run. URLs are sorted
11+
AppLauncher lets to create list of applications URLs to run. URLs are sorted
1212
according to last activities: adding or launching.
1313

1414
Install AppLauncher once and easily run dozens of your applications at Smart TV
@@ -18,11 +18,11 @@ or STB.
1818

1919
Important details:
2020

21-
1. You have to run web-server to provide application's URL to run. AppLauncher
21+
1. You have to run web-server to provide application URL to run. AppLauncher
2222
works only with URLs, not ipk or zip files!
2323

24-
2. AppLauncher could not check applications URLs before running them due to
25-
platforms' limitations. Be careful while entering URL. Improper URL can
24+
2. AppLauncher could not check applications URLs before running them due to
25+
platforms limitations. Be careful while entering URL. Improper URL can
2626
cause Smart TV/STB hang-up. Reboot your Smart TV/STB in this situation.
2727

2828
3. You can use remote control digital buttons to enter digits into URL instead
@@ -36,7 +36,7 @@ Platforms
3636
AppLauncer was tested on devices marked (+). It must also work on other devices
3737
listed below, but there can be problems of various types. If you run AppLauncher
3838
on devices without (+) mark, please write mail to
39-
[applauncher@interfaced.ru](mailto:applauncher@interfaced.ru) and inform us about both success and problems
39+
[applauncher@interfaced.tv](mailto:applauncher@interfaced.tv) and inform us about both success and problems
4040
you have.
4141

4242

@@ -77,7 +77,7 @@ AppLauncher supports:
7777

7878
- NV-102 (+)
7979

80-
- NV-300
80+
- NV-300 (+)
8181

8282
- Mag STB (Aura STB)
8383

app/launcher/app-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ goog.provide('launcher.appConfig');
66
* @struct
77
*/
88
launcher.appConfig = {
9+
googleAnalyticsId: 'UA-29756002-6',
910
noticeTime: 5000
1011
};

app/launcher/application.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ goog.provide('launcher.Application');
22
goog.require('launcher.BaseApplication');
33
goog.require('launcher.services.AppList');
44
goog.require('launcher.services.HelpBarItemFactory');
5+
goog.require('zb.ui.GoogleAnalytics');
56

67

78

@@ -12,6 +13,7 @@ goog.require('launcher.services.HelpBarItemFactory');
1213
launcher.Application = function() {
1314
zb.console.setLevel(zb.console.Level.LOG | zb.console.Level.ERROR);
1415
this.services = {
16+
ga: null,
1517
appList: null,
1618
helpBarItemFactory: null
1719
};
@@ -33,6 +35,21 @@ launcher.Application.prototype.canBack = function() {
3335
* @inheritDoc
3436
*/
3537
launcher.Application.prototype.onReady = function() {
38+
var gaId = '';
39+
if (COMPILED) {
40+
gaId = launcher.appConfig.googleAnalyticsId;
41+
42+
this._layerManager.on(this._layerManager.EVENT_TRANSITION_SUCCESS, function(eventName, transitionData) {
43+
transitionData = /** @type {zb.LayerManager.TransitionData} */(transitionData);
44+
var layer = transitionData.layer;
45+
var pageName = '/' + /s-([a-z0-9\-]+)$/i.exec(layer.getCSSClassName())[1];
46+
this.services.ga.sendPageview(pageName);
47+
}.bind(this));
48+
}
49+
50+
this.services.ga = new zb.ui.GoogleAnalytics(gaId, this.device, {
51+
analyticsJS: 'analytics.js'
52+
});
3653
this.services.appList = new launcher.services.AppList(this.device.storage);
3754
this.services.helpBarItemFactory = new launcher.services.HelpBarItemFactory;
3855
this.setHomeScene('app-list');
@@ -45,8 +62,10 @@ launcher.Application.prototype.onReady = function() {
4562
launcher.Application.prototype.onStart = function() {
4663
var apps = this.services.appList.getApps();
4764
if (apps.length) {
65+
this.services.ga.sendEvent('app', 'start');
4866
this.home();
4967
} else {
68+
this.services.ga.sendEvent('app', 'first-start');
5069
this.show('app-add', {});
5170
}
5271
};
@@ -70,6 +89,7 @@ launcher.Application.prototype._appendScreenSizeClass = function() {
7089

7190
/**
7291
* @type {{
92+
* ga: zb.ui.GoogleAnalytics,
7393
* appList: launcher.services.AppList,
7494
* helpBarItemFactory: launcher.services.HelpBarItemFactory
7595
* }}

app/launcher/scenes/about/about.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
goog.provide('launcher.scenes.About');
2-
goog.require('launcher.scenes.AbstractBase');
32
goog.require('launcher.scenes.templates.about.about');
3+
goog.require('launcher.scenes.AbstractBase');
44

55

66

@@ -11,12 +11,14 @@ goog.require('launcher.scenes.templates.about.about');
1111
launcher.scenes.About = function() {
1212
goog.base(this);
1313
this._addContainerClass('s-about');
14+
15+
this._createHelpBar();
1416
};
1517
goog.inherits(launcher.scenes.About, launcher.scenes.AbstractBase);
1618

1719

1820
/**
19-
* @inheritDoc
21+
* @protected
2022
*/
2123
launcher.scenes.About.prototype._createHelpBar = function() {
2224
goog.base(this, '_createHelpBar');
@@ -30,16 +32,14 @@ launcher.scenes.About.prototype._createHelpBar = function() {
3032
};
3133

3234

33-
/**
34-
* @inheritDoc
35-
*/
35+
/** @inheritDoc */
3636
launcher.scenes.About.prototype._renderTemplate = function() {
3737
return launcher.scenes.templates.about.about(this._getTemplateData(), this._getTemplateOptions());
3838
};
3939

4040

4141
/**
42-
* @type {launcher.scenes.templates.about.AboutOut}
43-
* @protected
44-
*/
42+
* @type {launcher.scenes.templates.about.AboutOut}
43+
* @protected
44+
*/
4545
launcher.scenes.About.prototype._exported;

app/launcher/scenes/about/about.jst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<div class="s-about__desc">
44
<p>
55
AppLauncher allows to run Smart TV and STB application avoiding standard application installation process.
6-
AppLauncher lets to create list of applications URLs to run.
6+
AppLauncher lets to create list of applications URLs to run.
77
URLs are sorted according to last activities: adding or launching.
88
</p>
99
<p>
1010
Attention:
11-
AppLauncher couldn’t check applications URLs before running them due to platform limitations.
11+
AppLauncher couldn’t check applications URLs before running them due to platform limitations.
1212
Be careful while entering URL. Improper URL can cause Smart TV/STB hang-up.
1313
Reboot your Smart TV/STB in this situation.
1414
</p>
1515
</div>
1616
<div class="s-about__contacts">
1717
Developed by Interfaced
18-
<br />site: interfaced.ru, e-mail: info@ifaced.ru
18+
<br />site: interfaced.tv, e-mail: info@interfaced.tv
1919
</div>

app/launcher/scenes/abstract-base/abstract-base.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
font-size: 47px;
1313
font-weight: bold;
1414
}
15-
.s-abstract-base-head__made {
15+
.s-abstract-base-head__version {
1616
font-size: 23px;
1717
margin-left: 5px;
1818
}
@@ -33,6 +33,9 @@
3333
.s-abstract-base-head__notice._remove {
3434
background: #e78787;
3535
}
36+
.s-abstract-base-head__notice._change {
37+
background: #f8d56e;
38+
}
3639

3740
.s-abstract-base {}
3841
.s-abstract-base .s-abstract-base-head {

app/launcher/scenes/abstract-base/abstract-base.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ launcher.scenes.AbstractBase.prototype.processKey = function(zbKey, e) {
4545
*/
4646
launcher.scenes.AbstractBase.prototype._createHelpBar = function() {
4747
this._helpBar = new zb.ui.HelpBar;
48+
this._helpBar.setOrder([
49+
zb.device.input.Keys.ENTER,
50+
zb.device.input.Keys.PAGE_UP,
51+
zb.device.input.Keys.PAGE_DOWN,
52+
zb.device.input.Keys.RED,
53+
zb.device.input.Keys.GREEN,
54+
zb.device.input.Keys.YELLOW,
55+
zb.device.input.Keys.BLUE,
56+
zb.device.input.Keys.BACK
57+
]);
4858
this._container.appendChild(this._helpBar.getContainer());
4959
this.appendWidget(this._helpBar);
5060
};

app/launcher/scenes/abstract-base/abstract-base.jst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="s-abstract-base-head">
44
<div class="s-abstract-base-head__title">
55
<span class="s-abstract-base-head__name">AppLauncher</span>
6-
<span class="s-abstract-base-head__made">by Interfaced</span>
6+
<span class="s-abstract-base-head__version">v.{{- zb.packageInfo.version }}</span>
77
</div>
88
<div class="s-abstract-base-head__notice _add" data-component="{{% launcher.widgets.Notice, {}, notice }}">URL added</div>
99
</div>
1008 Bytes
Loading

0 commit comments

Comments
 (0)