Commit 8ab1db53 by Nabil Sadki

Add CHANGELOG.md and set some default params

parent 0a04a02d
v1.0.8.1
-
v1.0.8.0
- Presentation
- Deals list
- Partners list
- Partners geolocation
- Partners geonotification
- General params
- About us
- Contact us
\ No newline at end of file
v1.0.8.1
- Add CHANGELOG.md
- Set geolocation default to true
- Add more values to notiftime parameter
v1.0.8.0
- Presentation
- Deals list
- Partners list
- Partners geolocation
- Partners geonotification
- General params
- About us
- Contact us
\ No newline at end of file
v1.0.8.1
- Add CHANGELOG.md
- Set geolocation param default to true
- Add more values to notiftime parameter
- Set notiftime param default to 1 day
v1.0.8.0
- Presentation
- Deals list
- Partners list
- Partners geolocation
- Partners geonotification
- General params
- About us
- Contact us
\ No newline at end of file
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Storage } from '@ionic/storage';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { TripService } from './services/trip-service';
// import { LocationService } from './services/location-service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(
public LN: LocalNotifications,
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private router: Router,
private _STOR: Storage
// private _LOCAT: LocationService
) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
// Set params
this.setDefaultParams();
// Set locator
// this.setLocator();
this._STOR.get('PARAM_mainslider').then((prmMainslider) => {
if (prmMainslider) {
this.router.navigateByUrl('/app/dashboard', { replaceUrl: true });
} else {
this.router.navigateByUrl('/mainslider', { replaceUrl: true });
this._STOR.set('PARAM_mainslider', true);
}
});
});
}
setDefaultParams() {
this._STOR.get('PARAM_geolocate').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geolocate', false);
}
});
this._STOR.get('PARAM_geoarea').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geoarea', 1000);
}
});
this._STOR.get('PARAM_notiftime').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notiftime', 15);
}
});
this._STOR.get('PARAM_trackdelay').then((val) => {
if (val === null) {
this._STOR.set('PARAM_trackdelay', 60000);
}
});
this._STOR.get('PARAM_notifnbr').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notifnbr', 'all');
}
});
this._STOR.get('NOTIF_shownpartners').then((val) => {
if (val === null) {
this._STOR.set('NOTIF_shownpartners', []);
}
});
}
setLocator() {
// Start locator if ON
// this._STOR.get('PARAM_geolocate').then((val) => {
// if (val !== null) {
// this._LOCAT.restartTracking();
// }
// });
this.LN.on('offres').subscribe(res => {
console.log('offres notif', res);
});
// this.LN.on('trigger').subscribe(res => {
// console.log('trigger notif', res);
// });
}
}
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Storage } from '@ionic/storage';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { TripService } from './services/trip-service';
// import { LocationService } from './services/location-service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(
public LN: LocalNotifications,
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private router: Router,
private _STOR: Storage
// private _LOCAT: LocationService
) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
// Set params
this.setDefaultParams();
// Set locator
// this.setLocator();
this._STOR.get('PARAM_mainslider').then((prmMainslider) => {
if (prmMainslider) {
this.router.navigateByUrl('/app/dashboard', { replaceUrl: true });
} else {
this.router.navigateByUrl('/mainslider', { replaceUrl: true });
this._STOR.set('PARAM_mainslider', true);
}
});
});
}
setDefaultParams() {
this._STOR.get('PARAM_geolocate').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geolocate', true);
}
});
this._STOR.get('PARAM_geoarea').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geoarea', 1000);
}
});
this._STOR.get('PARAM_notiftime').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notiftime', 15);
}
});
this._STOR.get('PARAM_trackdelay').then((val) => {
if (val === null) {
this._STOR.set('PARAM_trackdelay', 60000);
}
});
this._STOR.get('PARAM_notifnbr').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notifnbr', 'all');
}
});
this._STOR.get('NOTIF_shownpartners').then((val) => {
if (val === null) {
this._STOR.set('NOTIF_shownpartners', []);
}
});
}
setLocator() {
// Start locator if ON
// this._STOR.get('PARAM_geolocate').then((val) => {
// if (val !== null) {
// this._LOCAT.restartTracking();
// }
// });
this.LN.on('offres').subscribe(res => {
console.log('offres notif', res);
});
// this.LN.on('trigger').subscribe(res => {
// console.log('trigger notif', res);
// });
}
}
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Storage } from '@ionic/storage';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
import { TripService } from './services/trip-service';
// import { LocationService } from './services/location-service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
constructor(
public LN: LocalNotifications,
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private router: Router,
private _STOR: Storage
// private _LOCAT: LocationService
) {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
// Set params
this.setDefaultParams();
// Set locator
// this.setLocator();
this._STOR.get('PARAM_mainslider').then((prmMainslider) => {
if (prmMainslider) {
this.router.navigateByUrl('/app/dashboard', { replaceUrl: true });
} else {
this.router.navigateByUrl('/mainslider', { replaceUrl: true });
this._STOR.set('PARAM_mainslider', true);
}
});
});
}
setDefaultParams() {
this._STOR.get('PARAM_geolocate').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geolocate', true);
}
});
this._STOR.get('PARAM_geoarea').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geoarea', 1000);
}
});
this._STOR.get('PARAM_notiftime').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notiftime', 2880);
}
});
this._STOR.get('PARAM_trackdelay').then((val) => {
if (val === null) {
this._STOR.set('PARAM_trackdelay', 60000);
}
});
this._STOR.get('PARAM_notifnbr').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notifnbr', 'all');
}
});
this._STOR.get('NOTIF_shownpartners').then((val) => {
if (val === null) {
this._STOR.set('NOTIF_shownpartners', []);
}
});
}
setLocator() {
// Start locator if ON
// this._STOR.get('PARAM_geolocate').then((val) => {
// if (val !== null) {
// this._LOCAT.restartTracking();
// }
// });
this.LN.on('offres').subscribe(res => {
console.log('offres notif', res);
});
// this.LN.on('trigger').subscribe(res => {
// console.log('trigger notif', res);
// });
}
}
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-menu-button>
<ion-icon name="menu" size="large"></ion-icon>
</ion-menu-button>
</ion-buttons>
<ion-title>Paramètres</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<form class="list-form">
<!-- <ion-item>
<ion-label color="dark" class="text-1x">Cacher l'écran d'accueil</ion-label>
<ion-toggle checked color="primary" [(ngModel)]="prm_mainslider" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('mainslider')"></ion-toggle>
</ion-item> -->
<ion-item>
<ion-label color="dark" class="text-1x">Géo-notifications</ion-label>
<ion-toggle checked color="primary" [(ngModel)]="prm_geolocate" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('geolocate')"></ion-toggle>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Rayon de détection</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_geoarea" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('geoarea')">
<ion-select-option value="400">400m</ion-select-option>
<ion-select-option value="800">800m</ion-select-option>
<ion-select-option value="1200">1,2Km</ion-select-option>
<ion-select-option value="1600">1,6Km</ion-select-option>
<ion-select-option value="2000">2Km</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Raffraichir la position GPS chaque</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_trackdelay" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('trackdelay')">
<ion-select-option value="60000">minute</ion-select-option>
<ion-select-option value="120000">2 minutes</ion-select-option>
<ion-select-option value="180000">3 minutes</ion-select-option>
<ion-select-option value="240000">4 minutes</ion-select-option>
<ion-select-option value="300000">5 minutes</ion-select-option>
<ion-select-option value="360000">6 minutes</ion-select-option>
<ion-select-option value="420000">7 minutes</ion-select-option>
<ion-select-option value="480000">8 minutes</ion-select-option>
<ion-select-option value="540000">9 minutes</ion-select-option>
<ion-select-option value="600000">10 minutes</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Réaffichage des notifications</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_notiftime" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('notiftime')">
<ion-select-option value="5">5 min</ion-select-option>
<ion-select-option value="15">15 min</ion-select-option>
<ion-select-option value="30">30 min</ion-select-option>
<ion-select-option value="45">45 min</ion-select-option>
<ion-select-option value="60">1h</ion-select-option>
<ion-select-option value="120">2h</ion-select-option>
<ion-select-option value="480">4h</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Notifications par rafraîchissement</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_notifnbr" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('notifnbr')">
<ion-select-option value="2">Pas plus de 2 à la fois</ion-select-option>
<ion-select-option value="4">Pas plus de 4 à la fois</ion-select-option>
<ion-select-option value="6">Pas plus de 6 à la fois</ion-select-option>
<ion-select-option value="all">Afficher toutes les notifications</ion-select-option>
</ion-select>
</ion-item>
</form>
</ion-content>
\ No newline at end of file
<ion-header>
<ion-toolbar color="primary">
<ion-buttons slot="start">
<ion-menu-button>
<ion-icon name="menu" size="large"></ion-icon>
</ion-menu-button>
</ion-buttons>
<ion-title>Paramètres</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<form class="list-form">
<!-- <ion-item>
<ion-label color="dark" class="text-1x">Cacher l'écran d'accueil</ion-label>
<ion-toggle checked color="primary" [(ngModel)]="prm_mainslider" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('mainslider')"></ion-toggle>
</ion-item> -->
<ion-item>
<ion-label color="dark" class="text-1x">Géo-notifications</ion-label>
<ion-toggle checked color="primary" [(ngModel)]="prm_geolocate" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('geolocate')"></ion-toggle>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Rayon de détection</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_geoarea" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('geoarea')">
<ion-select-option value="400">400m</ion-select-option>
<ion-select-option value="800">800m</ion-select-option>
<ion-select-option value="1200">1,2Km</ion-select-option>
<ion-select-option value="1600">1,6Km</ion-select-option>
<ion-select-option value="2000">2Km</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Raffraichir la position GPS chaque</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_trackdelay" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('trackdelay')">
<ion-select-option value="60000">minute</ion-select-option>
<ion-select-option value="120000">2 minutes</ion-select-option>
<ion-select-option value="180000">3 minutes</ion-select-option>
<ion-select-option value="240000">4 minutes</ion-select-option>
<ion-select-option value="300000">5 minutes</ion-select-option>
<ion-select-option value="360000">6 minutes</ion-select-option>
<ion-select-option value="420000">7 minutes</ion-select-option>
<ion-select-option value="480000">8 minutes</ion-select-option>
<ion-select-option value="540000">9 minutes</ion-select-option>
<ion-select-option value="600000">10 minutes</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Réaffichage des notifications</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_notiftime" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('notiftime')">
<ion-select-option value="5">5 min</ion-select-option>
<ion-select-option value="15">15 min</ion-select-option>
<ion-select-option value="30">30 min</ion-select-option>
<ion-select-option value="45">45 min</ion-select-option>
<ion-select-option value="60">1 h</ion-select-option>
<ion-select-option value="120">2 h</ion-select-option>
<ion-select-option value="480">4 h</ion-select-option>
<ion-select-option value="960">8 h</ion-select-option>
<ion-select-option value="2880">1 j</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label color="dark" class="text-1x">Notifications par rafraîchissement</ion-label>
<ion-select class="text-primary" [(ngModel)]="prm_notifnbr" [ngModelOptions]="{standalone: true}"
(ionChange)="setParam('notifnbr')">
<ion-select-option value="2">Pas plus de 2 à la fois</ion-select-option>
<ion-select-option value="4">Pas plus de 4 à la fois</ion-select-option>
<ion-select-option value="6">Pas plus de 6 à la fois</ion-select-option>
<ion-select-option value="all">Afficher toutes les notifications</ion-select-option>
</ion-select>
</ion-item>
</form>
</ion-content>
\ No newline at end of file
v1.0.8.1
- Add CHANGELOG.md
- Set geolocation param default to true
- Add more values to notiftime parameter
- Set notiftime param default to 1 day
v1.0.8.0
- Presentation
- Deals list
- Partners list
- Partners geolocation
- Partners geonotification
- General params
- About us
- Contact us
\ No newline at end of file
......@@ -52,7 +52,7 @@ export class AppComponent {
setDefaultParams() {
this._STOR.get('PARAM_geolocate').then((val) => {
if (val === null) {
this._STOR.set('PARAM_geolocate', false);
this._STOR.set('PARAM_geolocate', true);
}
});
this._STOR.get('PARAM_geoarea').then((val) => {
......@@ -62,7 +62,7 @@ export class AppComponent {
});
this._STOR.get('PARAM_notiftime').then((val) => {
if (val === null) {
this._STOR.set('PARAM_notiftime', 15);
this._STOR.set('PARAM_notiftime', 2880);
}
});
this._STOR.get('PARAM_trackdelay').then((val) => {
......
......@@ -56,9 +56,11 @@
<ion-select-option value="15">15 min</ion-select-option>
<ion-select-option value="30">30 min</ion-select-option>
<ion-select-option value="45">45 min</ion-select-option>
<ion-select-option value="60">1h</ion-select-option>
<ion-select-option value="120">2h</ion-select-option>
<ion-select-option value="480">4h</ion-select-option>
<ion-select-option value="60">1 h</ion-select-option>
<ion-select-option value="120">2 h</ion-select-option>
<ion-select-option value="480">4 h</ion-select-option>
<ion-select-option value="960">8 h</ion-select-option>
<ion-select-option value="2880">1 j</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment