diff --git a/src/pages/home/home.module.ts b/src/pages/home/home.module.ts
index f3250af4..b61b4368 100644
--- a/src/pages/home/home.module.ts
+++ b/src/pages/home/home.module.ts
@@ -4,6 +4,7 @@ import { HomePage } from './home';
import { SharedModule } from '@shared/shared.module';
import { TranslateModule } from '@ngx-translate/core';
import { SuperTabsModule } from 'ionic2-super-tabs';
+import { IonicImageLoader } from 'ionic-image-loader';
@NgModule({
declarations: [
@@ -11,9 +12,10 @@ import { SuperTabsModule } from 'ionic2-super-tabs';
],
imports: [
IonicPageModule.forChild(HomePage),
+ IonicImageLoader.forRoot(),
SharedModule,
TranslateModule,
SuperTabsModule,
],
})
-export class HomePageModule {}
\ No newline at end of file
+export class HomePageModule {}
diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts
index 042691d7..125b97ab 100644
--- a/src/pages/home/home.ts
+++ b/src/pages/home/home.ts
@@ -1,27 +1,24 @@
import { SettingsService } from '@providers/settings';
import { Observable } from 'rxjs/Observable';
-import { Component, OnInit, OnDestroy } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { IonicPage, NavController } from 'ionic-angular';
import { AuthDataPersistenceService } from '@providers/auth-data-persistence';
-import { AuthUser } from '@models/auth.interface';
import { Settings } from '@models/settings';
-import { Subscription } from 'rxjs';
+import { ImageAttribute } from 'ionic-image-loader';
@IonicPage()
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
-export class HomePage implements OnInit, OnDestroy {
+export class HomePage implements OnInit {
live: any = 'LivePage';
contacts: any = 'ContactsPage';
items: any = 'ItemsPage';
authData$: Observable
;
- authUser: AuthUser = null;
- settings: Settings;
- settingsSubscription: Subscription;
- authDataSubscription: Subscription;
+ settings: Observable;
+ imageAttributes: ImageAttribute[] = [];
constructor(
private authDataPersistenceService: AuthDataPersistenceService,
@@ -30,26 +27,13 @@ export class HomePage implements OnInit, OnDestroy {
) {}
ngOnInit() {
- console.log('HomePage ngOnInit');
- this.authData$ = this.authDataPersistenceService.getAuthDataObserver();
- this.authDataSubscription = this.authData$.subscribe(
- data => {
- if (data) {
- this.authUser = data.visitor;
- } else {
- this.authUser = null;
- }
- }
- );
-
- this.settingsSubscription = this.settingsService.getSettingsObserver().subscribe( data => {
- this.settings = data;
+ this.imageAttributes.push({
+ element: 'class',
+ value: 'logo'
});
- }
- ngOnDestroy() {
- this.settingsSubscription.unsubscribe();
- this.authDataSubscription.unsubscribe();
+ this.authData$ = this.authDataPersistenceService.getAuthDataObserver();
+ this.settings = this.settingsService.getSettingsObserver();
}
ionViewCanEnter(): boolean {
diff --git a/src/pages/settings/settings.html b/src/pages/settings/settings.html
index 8fcada50..85b478a2 100644
--- a/src/pages/settings/settings.html
+++ b/src/pages/settings/settings.html
@@ -13,12 +13,14 @@
{{'SETTINGS.YOUTUBE_CHANNEL_ID' | translate}}
-
-
{{'SETTINGS.TV_URL' | translate}}
+
+ {{'SETTINGS.LOGO_URL' | translate}}
+
+
diff --git a/src/providers/settings/settings.service-mock.ts b/src/providers/settings/settings.service-mock.ts
index 74fc062d..8a8949b0 100644
--- a/src/providers/settings/settings.service-mock.ts
+++ b/src/providers/settings/settings.service-mock.ts
@@ -9,7 +9,8 @@ export class SettingsService {
settings = Observable.of({
domain: 'meumobibox.meumobi.com',
youtubeChannelId: 'UCRGoQtYFZCkbBegdlv8xWew',
- tvUrl: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8'
+ tvUrl: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
+ logoUrl: 'https://meumobi.com/uploads/site_logos/200x200_6943664.png'
});