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

Commit

Permalink
Updated to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
trave committed Dec 23, 2015
1 parent b06dada commit 374f81b
Show file tree
Hide file tree
Showing 43 changed files with 723 additions and 153 deletions.
2 changes: 1 addition & 1 deletion README-RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ AppLauncher поддерживает:

- NV-102 (+)

- NV-300
- NV-300 (+)

- Mag STB (Aura STB)

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AppLauncher
AppLauncher allows running Smart TV and STB application avoiding standard
installation process.

AppLauncher lets to create list of applications URLs to run. URLs are sorted
AppLauncher lets to create list of applications URLs to run. URLs are sorted
according to last activities: adding or launching.

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

Important details:

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

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

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


Expand Down Expand Up @@ -77,7 +77,7 @@ AppLauncher supports:

- NV-102 (+)

- NV-300
- NV-300 (+)

- Mag STB (Aura STB)

Expand Down
1 change: 1 addition & 0 deletions app/launcher/app-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ goog.provide('launcher.appConfig');
* @struct
*/
launcher.appConfig = {
googleAnalyticsId: 'UA-29756002-6',
noticeTime: 5000
};
20 changes: 20 additions & 0 deletions app/launcher/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ goog.provide('launcher.Application');
goog.require('launcher.BaseApplication');
goog.require('launcher.services.AppList');
goog.require('launcher.services.HelpBarItemFactory');
goog.require('zb.ui.GoogleAnalytics');



Expand All @@ -12,6 +13,7 @@ goog.require('launcher.services.HelpBarItemFactory');
launcher.Application = function() {
zb.console.setLevel(zb.console.Level.LOG | zb.console.Level.ERROR);
this.services = {
ga: null,
appList: null,
helpBarItemFactory: null
};
Expand All @@ -33,6 +35,21 @@ launcher.Application.prototype.canBack = function() {
* @inheritDoc
*/
launcher.Application.prototype.onReady = function() {
var gaId = '';
if (COMPILED) {
gaId = launcher.appConfig.googleAnalyticsId;

this._layerManager.on(this._layerManager.EVENT_TRANSITION_SUCCESS, function(eventName, transitionData) {
transitionData = /** @type {zb.LayerManager.TransitionData} */(transitionData);
var layer = transitionData.layer;
var pageName = '/' + /s-([a-z0-9\-]+)$/i.exec(layer.getCSSClassName())[1];
this.services.ga.sendPageview(pageName);
}.bind(this));
}

this.services.ga = new zb.ui.GoogleAnalytics(gaId, this.device, {
analyticsJS: 'analytics.js'
});
this.services.appList = new launcher.services.AppList(this.device.storage);
this.services.helpBarItemFactory = new launcher.services.HelpBarItemFactory;
this.setHomeScene('app-list');
Expand All @@ -45,8 +62,10 @@ launcher.Application.prototype.onReady = function() {
launcher.Application.prototype.onStart = function() {
var apps = this.services.appList.getApps();
if (apps.length) {
this.services.ga.sendEvent('app', 'start');
this.home();
} else {
this.services.ga.sendEvent('app', 'first-start');
this.show('app-add', {});
}
};
Expand All @@ -70,6 +89,7 @@ launcher.Application.prototype._appendScreenSizeClass = function() {

/**
* @type {{
* ga: zb.ui.GoogleAnalytics,
* appList: launcher.services.AppList,
* helpBarItemFactory: launcher.services.HelpBarItemFactory
* }}
Expand Down
16 changes: 8 additions & 8 deletions app/launcher/scenes/about/about.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
goog.provide('launcher.scenes.About');
goog.require('launcher.scenes.AbstractBase');
goog.require('launcher.scenes.templates.about.about');
goog.require('launcher.scenes.AbstractBase');



Expand All @@ -11,12 +11,14 @@ goog.require('launcher.scenes.templates.about.about');
launcher.scenes.About = function() {
goog.base(this);
this._addContainerClass('s-about');

this._createHelpBar();
};
goog.inherits(launcher.scenes.About, launcher.scenes.AbstractBase);


/**
* @inheritDoc
* @protected
*/
launcher.scenes.About.prototype._createHelpBar = function() {
goog.base(this, '_createHelpBar');
Expand All @@ -30,16 +32,14 @@ launcher.scenes.About.prototype._createHelpBar = function() {
};


/**
* @inheritDoc
*/
/** @inheritDoc */
launcher.scenes.About.prototype._renderTemplate = function() {
return launcher.scenes.templates.about.about(this._getTemplateData(), this._getTemplateOptions());
};


/**
* @type {launcher.scenes.templates.about.AboutOut}
* @protected
*/
* @type {launcher.scenes.templates.about.AboutOut}
* @protected
*/
launcher.scenes.About.prototype._exported;
6 changes: 3 additions & 3 deletions app/launcher/scenes/about/about.jst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<div class="s-about__desc">
<p>
AppLauncher allows to run Smart TV and STB application avoiding standard application installation process.
AppLauncher lets to create list of applications URLs to run.
AppLauncher lets to create list of applications URLs to run.
URLs are sorted according to last activities: adding or launching.
</p>
<p>
Attention:
AppLauncher couldn’t check applications URLs before running them due to platform limitations.
AppLauncher couldn’t check applications URLs before running them due to platform limitations.
Be careful while entering URL. Improper URL can cause Smart TV/STB hang-up.
Reboot your Smart TV/STB in this situation.
</p>
</div>
<div class="s-about__contacts">
Developed by Interfaced
<br />site: interfaced.ru, e-mail: info@ifaced.ru
<br />site: interfaced.tv, e-mail: info@interfaced.tv
</div>
5 changes: 4 additions & 1 deletion app/launcher/scenes/abstract-base/abstract-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
font-size: 47px;
font-weight: bold;
}
.s-abstract-base-head__made {
.s-abstract-base-head__version {
font-size: 23px;
margin-left: 5px;
}
Expand All @@ -33,6 +33,9 @@
.s-abstract-base-head__notice._remove {
background: #e78787;
}
.s-abstract-base-head__notice._change {
background: #f8d56e;
}

.s-abstract-base {}
.s-abstract-base .s-abstract-base-head {
Expand Down
10 changes: 10 additions & 0 deletions app/launcher/scenes/abstract-base/abstract-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ launcher.scenes.AbstractBase.prototype.processKey = function(zbKey, e) {
*/
launcher.scenes.AbstractBase.prototype._createHelpBar = function() {
this._helpBar = new zb.ui.HelpBar;
this._helpBar.setOrder([
zb.device.input.Keys.ENTER,
zb.device.input.Keys.PAGE_UP,
zb.device.input.Keys.PAGE_DOWN,
zb.device.input.Keys.RED,
zb.device.input.Keys.GREEN,
zb.device.input.Keys.YELLOW,
zb.device.input.Keys.BLUE,
zb.device.input.Keys.BACK
]);
this._container.appendChild(this._helpBar.getContainer());
this.appendWidget(this._helpBar);
};
Expand Down
2 changes: 1 addition & 1 deletion app/launcher/scenes/abstract-base/abstract-base.jst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="s-abstract-base-head">
<div class="s-abstract-base-head__title">
<span class="s-abstract-base-head__name">AppLauncher</span>
<span class="s-abstract-base-head__made">by Interfaced</span>
<span class="s-abstract-base-head__version">v.{{- zb.packageInfo.version }}</span>
</div>
<div class="s-abstract-base-head__notice _add" data-component="{{% launcher.widgets.Notice, {}, notice }}">URL added</div>
</div>
Expand Down
Binary file added app/launcher/scenes/app-add/app-add-input-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/launcher/scenes/app-add/app-add-input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 23 additions & 11 deletions app/launcher/scenes/app-add/app-add.css
Original file line number Diff line number Diff line change
@@ -1,48 +1,60 @@
/* AppAdd scene
*******************************/

.s-app-add-input-button {
background: url(app-add-input.png) 50% 50% no-repeat;
border: 2px solid #00809c;
border-radius: 12px;
}

.s-app-add-input-button._active {
background-color: #00809c;
background-image: url(app-add-input-active.png);
}

.s-app-add-input {}
.s-app-add-input__title {
text-align: center;
font-size: 23px;
font-weight: bold;
text-align: center;
}
.s-app-add-input__address {
position: relative;
margin-top: 8px;
}
.s-app-add-input .w-button {
.s-app-add-input .s-app-add-input-button {
width: 60px;
height: 40px;
position: absolute;
top: 0;
left: 100%;
margin-left: 7px;
}
.s-app-add-input__input {
width: 100%;
font-size: 23px;
font-size: 24px;
padding: 7px 0;
box-sizing: border-box;
padding: 7px;
padding-right: 0;
border: 1px solid #022a33;
outline: 1px solid #022a33;
}
.s-app-add-input__input._active {
box-shadow: 0 0 5px #00809c;
}
.s-app-add-input__input:focus {
outline: none;
box-shadow: 0 0 8px 2px #00809c;
}
.s-app-add-input__warning {
font-size: 18px;
color: #00809c;
margin-top: 17px;
}
.s-app-add-input .w-zbui-div-input .w-zbui-div-input__wrapper {
margin-left: 7px;
}

.s-app-add {}
.s-app-add .s-app-add-input {
position: absolute;
top: 50px;
left: 200px;
right: 200px;
left: 200px;
}
.s-app-add .w-keyboard {
position: absolute;
Expand Down
Loading

0 comments on commit 374f81b

Please sign in to comment.