Sfoglia il codice sorgente

Modifies the colors in the app

Jorge Baquero 7 anni fa
parent
commit
91f0c8c149

+ 2 - 0
config.xml Vedi File

89
     </plugin>
89
     </plugin>
90
     <allow-navigation href="http://192.168.0.7:8100" />
90
     <allow-navigation href="http://192.168.0.7:8100" />
91
     <plugin name="cordova-sqlite-storage" spec="^2.2.1" />
91
     <plugin name="cordova-sqlite-storage" spec="^2.2.1" />
92
+    <allow-navigation href="http://192.168.43.167:8100" />
93
+    <plugin name="cordova-plugin-x-socialsharing" spec="^5.3.2" />
92
 </widget>
94
 </widget>

+ 15 - 0
package-lock.json Vedi File

101
       "resolved": "https://registry.npmjs.org/@ionic-native/google-maps/-/google-maps-4.5.3.tgz",
101
       "resolved": "https://registry.npmjs.org/@ionic-native/google-maps/-/google-maps-4.5.3.tgz",
102
       "integrity": "sha512-7CYuU3fy2WbOGMg3AI0/PH+0eg5lFShv9+3NT4/HiihHmMR6mGCdVvpZZaKHeAFkBXcFwHcjZjGId4SAASHoBg=="
102
       "integrity": "sha512-7CYuU3fy2WbOGMg3AI0/PH+0eg5lFShv9+3NT4/HiihHmMR6mGCdVvpZZaKHeAFkBXcFwHcjZjGId4SAASHoBg=="
103
     },
103
     },
104
+    "@ionic-native/social-sharing": {
105
+      "version": "4.6.0",
106
+      "resolved": "https://registry.npmjs.org/@ionic-native/social-sharing/-/social-sharing-4.6.0.tgz",
107
+      "integrity": "sha512-El/ZTZ5q49p8UQzq364lKJy2145/GYOPrOCdIhvux3tsXGIhwL+yMqt/mgdBFR5W/x7HHBjpFph067jUDSeO4g=="
108
+    },
104
     "@ionic-native/splash-screen": {
109
     "@ionic-native/splash-screen": {
105
       "version": "4.4.0",
110
       "version": "4.4.0",
106
       "resolved": "https://registry.npmjs.org/@ionic-native/splash-screen/-/splash-screen-4.4.0.tgz",
111
       "resolved": "https://registry.npmjs.org/@ionic-native/splash-screen/-/splash-screen-4.4.0.tgz",
1344
       "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz",
1349
       "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.3.tgz",
1345
       "integrity": "sha1-tehezbv+Wu3tQKG/TuI3LmfZb7Q="
1350
       "integrity": "sha1-tehezbv+Wu3tQKG/TuI3LmfZb7Q="
1346
     },
1351
     },
1352
+    "cordova-plugin-x-socialsharing": {
1353
+      "version": "5.3.2",
1354
+      "resolved": "https://registry.npmjs.org/cordova-plugin-x-socialsharing/-/cordova-plugin-x-socialsharing-5.3.2.tgz",
1355
+      "integrity": "sha1-8SBYny+lB+kqMG8lypV7lvmWhrE="
1356
+    },
1347
     "cordova-sqlite-storage": {
1357
     "cordova-sqlite-storage": {
1348
       "version": "2.2.1",
1358
       "version": "2.2.1",
1349
       "resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-2.2.1.tgz",
1359
       "resolved": "https://registry.npmjs.org/cordova-sqlite-storage/-/cordova-sqlite-storage-2.2.1.tgz",
1732
         "event-emitter": "0.3.5"
1742
         "event-emitter": "0.3.5"
1733
       }
1743
       }
1734
     },
1744
     },
1745
+    "es6-promise-plugin": {
1746
+      "version": "4.2.2",
1747
+      "resolved": "https://registry.npmjs.org/es6-promise-plugin/-/es6-promise-plugin-4.2.2.tgz",
1748
+      "integrity": "sha512-uoA4aVplXI9oqUYJFBAVRwAqIN9/n9JgrTAUGX3qPbnSZVE5yY1+6/MsoN5f4xsaPO62WjPHOdtts6okMN6tNA=="
1749
+    },
1735
     "es6-set": {
1750
     "es6-set": {
1736
       "version": "0.1.5",
1751
       "version": "0.1.5",
1737
       "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
1752
       "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",

+ 5 - 1
package.json Vedi File

22
     "@angular/platform-browser-dynamic": "5.0.3",
22
     "@angular/platform-browser-dynamic": "5.0.3",
23
     "@ionic-native/core": "4.4.0",
23
     "@ionic-native/core": "4.4.0",
24
     "@ionic-native/google-maps": "^4.5.3",
24
     "@ionic-native/google-maps": "^4.5.3",
25
+    "@ionic-native/social-sharing": "^4.6.0",
25
     "@ionic-native/splash-screen": "4.4.0",
26
     "@ionic-native/splash-screen": "4.4.0",
26
     "@ionic-native/status-bar": "4.4.0",
27
     "@ionic-native/status-bar": "4.4.0",
27
     "@ionic/storage": "^2.1.3",
28
     "@ionic/storage": "^2.1.3",
32
     "cordova-plugin-ionic-webview": "^1.1.16",
33
     "cordova-plugin-ionic-webview": "^1.1.16",
33
     "cordova-plugin-splashscreen": "^5.0.2",
34
     "cordova-plugin-splashscreen": "^5.0.2",
34
     "cordova-plugin-whitelist": "^1.3.3",
35
     "cordova-plugin-whitelist": "^1.3.3",
36
+    "cordova-plugin-x-socialsharing": "^5.3.2",
35
     "cordova-sqlite-storage": "^2.2.1",
37
     "cordova-sqlite-storage": "^2.2.1",
38
+    "es6-promise-plugin": "^4.2.2",
36
     "ionic-angular": "3.9.2",
39
     "ionic-angular": "3.9.2",
37
     "ionicons": "3.0.0",
40
     "ionicons": "3.0.0",
38
     "rxjs": "5.5.2",
41
     "rxjs": "5.5.2",
56
         "PLAY_SERVICES_VERSION": "11.8.0",
59
         "PLAY_SERVICES_VERSION": "11.8.0",
57
         "ANDROID_SUPPORT_V4_VERSION": "24.1.0"
60
         "ANDROID_SUPPORT_V4_VERSION": "24.1.0"
58
       },
61
       },
59
-      "cordova-sqlite-storage": {}
62
+      "cordova-sqlite-storage": {},
63
+      "cordova-plugin-x-socialsharing": {}
60
     },
64
     },
61
     "platforms": [
65
     "platforms": [
62
       "android"
66
       "android"

+ 2 - 3
src/app/app.component.ts Vedi File

11
   rootPage:any = HomePage;
11
   rootPage:any = HomePage;
12
 
12
 
13
   constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
13
   constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
14
-    platform.ready().then(() => {
14
+    /*platform.ready().then(() => {
15
       // Okay, so the platform is ready and our plugins are available.
15
       // Okay, so the platform is ready and our plugins are available.
16
       // Here you can do any higher level native things you might need.
16
       // Here you can do any higher level native things you might need.
17
       statusBar.styleDefault();
17
       statusBar.styleDefault();
18
       splashScreen.hide();
18
       splashScreen.hide();
19
-    });
19
+    });*/
20
   }
20
   }
21
 }
21
 }
22
-

+ 8 - 0
src/index.html Vedi File

26
         .catch(err => console.error('Error', err));
26
         .catch(err => console.error('Error', err));
27
     }
27
     }
28
   </script>-->
28
   </script>-->
29
+<!--
30
+  <link href="lib/ionic/css/ionic.css" rel="stylesheet">
31
+    <link href="lib/ionic-material/ionic.material.min.css" rel="stylesheet">
32
+    <link href="css/style.css" rel="stylesheet">
33
+
34
+    <script src="lib/ionic/js/ionic.bundle.js"></script>
35
+    <script src="lib/ionic-material/ionic.material.min.js"></script>-->
36
+
29
 
37
 
30
   <link href="build/main.css" rel="stylesheet">
38
   <link href="build/main.css" rel="stylesheet">
31
 
39
 

+ 1 - 1
src/manifest.json Vedi File

10
   }],
10
   }],
11
   "background_color": "#4e8ef7",
11
   "background_color": "#4e8ef7",
12
   "theme_color": "#4e8ef7"
12
   "theme_color": "#4e8ef7"
13
-}
13
+}

+ 16 - 2
src/pages/configuration/configuration.html Vedi File

6
 -->
6
 -->
7
 <ion-header>
7
 <ion-header>
8
 
8
 
9
-  <ion-navbar>
9
+  <ion-navbar  color="primary">
10
     <ion-title>Configuración</ion-title>
10
     <ion-title>Configuración</ion-title>
11
   </ion-navbar>
11
   </ion-navbar>
12
 
12
 
14
 
14
 
15
 
15
 
16
 <ion-content padding>
16
 <ion-content padding>
17
-Lista de configuraciones
17
+  <ion-list>
18
+    <ion-item>
19
+      <ion-label>Encender Alarma</ion-label>
20
+      <ion-toggle checked="false" [(ngModel)]="startAlarm" (ionChange)="changeAlarm()"></ion-toggle>
21
+    </ion-item>
22
+    <ion-item>
23
+      <ion-label>Tiempo Actualización</ion-label>
24
+      <ion-select [(ngModel)]="time" (ionChange)="changeTime()">
25
+        <ion-option value="15">15 seg</ion-option>
26
+        <ion-option value="30" selected="true">30 seg</ion-option>
27
+        <ion-option value="60">60 seg</ion-option>
28
+      </ion-select>
29
+    </ion-item>
30
+  </ion-list>
31
+
18
 </ion-content>
32
 </ion-content>

+ 22 - 3
src/pages/configuration/configuration.ts Vedi File

1
 import { Component } from '@angular/core';
1
 import { Component } from '@angular/core';
2
 import { IonicPage, NavController, NavParams } from 'ionic-angular';
2
 import { IonicPage, NavController, NavParams } from 'ionic-angular';
3
+import { Storage } from '@ionic/storage';
3
 
4
 
4
 /**
5
 /**
5
  * Generated class for the ConfigurationPage page.
6
  * Generated class for the ConfigurationPage page.
15
 })
16
 })
16
 export class ConfigurationPage {
17
 export class ConfigurationPage {
17
 
18
 
18
-  constructor(public navCtrl: NavController, public navParams: NavParams) {
19
+  startAlarm: any;
20
+  time: any;
21
+
22
+  constructor(public navCtrl: NavController,
23
+    public navParams: NavParams,
24
+    private storage: Storage) {
25
+  }
26
+
27
+  ionViewWillEnter() {
28
+    this.storage.get('startAlarm').then((valAlarm)=>{
29
+        this.startAlarm = valAlarm;
30
+    });
31
+    this.storage.get('time').then((valTime)=>{
32
+        this.time = valTime;
33
+    });
34
+  }
35
+
36
+  changeAlarm() {
37
+    this.storage.set('startAlarm', this.startAlarm);
19
   }
38
   }
20
 
39
 
21
-  ionViewDidLoad() {
22
-    console.log('ionViewDidLoad ConfigurationPage');
40
+  changeTime() {
41
+    this.storage.set('time', this.time);
23
   }
42
   }
24
 
43
 
25
 }
44
 }

+ 1 - 1
src/pages/devices/devices.html Vedi File

1
 <ion-header>
1
 <ion-header>
2
-  <ion-navbar>
2
+  <ion-navbar  color="primary">
3
     <ion-title>Dispositivo por Defecto</ion-title>
3
     <ion-title>Dispositivo por Defecto</ion-title>
4
   </ion-navbar>
4
   </ion-navbar>
5
 </ion-header>
5
 </ion-header>

+ 2 - 2
src/pages/home/home.html Vedi File

1
 <ion-header>
1
 <ion-header>
2
-  <ion-navbar>
2
+  <ion-navbar color="primary">
3
     <ion-title>
3
     <ion-title>
4
       SMART ALARM
4
       SMART ALARM
5
     </ion-title>
5
     </ion-title>
25
     <ion-checkbox [(ngModel)]="remember"></ion-checkbox>
25
     <ion-checkbox [(ngModel)]="remember"></ion-checkbox>
26
   </ion-item>
26
   </ion-item>
27
 <div padding>
27
 <div padding>
28
-  <button ion-button full (click)="login()">Ingresar</button>
28
+  <button class="button button-positive" ion-button full (click)="login()">Ingresar</button>
29
 </div>
29
 </div>
30
 </ion-list>
30
 </ion-list>
31
 </ion-content>
31
 </ion-content>

+ 2 - 0
src/pages/home/home.ts Vedi File

42
           if(this.remember == true) {
42
           if(this.remember == true) {
43
             this.storage.set('remember', true);
43
             this.storage.set('remember', true);
44
             this.storage.set('authentication', auth);
44
             this.storage.set('authentication', auth);
45
+            this.storage.set('startAlarm', true);
46
+            this.storage.set('time', 30);
45
           }
47
           }
46
 
48
 
47
           this.navCtrl.setRoot(Main);
49
           this.navCtrl.setRoot(Main);

+ 15 - 4
src/pages/main/main.html Vedi File

1
 <ion-menu [content]="vespotMenu" >
1
 <ion-menu [content]="vespotMenu" >
2
   <ion-header>
2
   <ion-header>
3
-    <ion-toolbar>
3
+    <ion-toolbar  color="primary">
4
       <ion-title>Menu</ion-title>
4
       <ion-title>Menu</ion-title>
5
     </ion-toolbar>
5
     </ion-toolbar>
6
   </ion-header>
6
   </ion-header>
7
     <ion-content>
7
     <ion-content>
8
         <ion-list>
8
         <ion-list>
9
              <button ion-item menuClose (click)="openDevicesPage()">
9
              <button ion-item menuClose (click)="openDevicesPage()">
10
-		Dispositivos
10
+               <ion-icon name="car"></ion-icon>
11
+		             Dispositivos
11
             </button>
12
             </button>
12
             <button ion-item menuClose (click)="openConfigurationPage()">
13
             <button ion-item menuClose (click)="openConfigurationPage()">
14
+              <ion-icon name="keypad"></ion-icon>
13
                 Configuración
15
                 Configuración
14
             </button>
16
             </button>
15
             <button ion-item menuClose (click)="closeSession()">
17
             <button ion-item menuClose (click)="closeSession()">
18
+              <ion-icon name="close"></ion-icon>
16
                 Cerrar Sesión
19
                 Cerrar Sesión
17
             </button>
20
             </button>
18
         </ion-list>
21
         </ion-list>
20
 </ion-menu>
23
 </ion-menu>
21
 
24
 
22
 <ion-header>
25
 <ion-header>
23
-  <ion-navbar>
26
+  <ion-navbar color="primary">
24
     <ion-buttons>
27
     <ion-buttons>
25
       <button ion-button menuToggle="left">
28
       <button ion-button menuToggle="left">
26
       <ion-icon name="menu"></ion-icon>
29
       <ion-icon name="menu"></ion-icon>
33
 </ion-header>
36
 </ion-header>
34
 
37
 
35
 <ion-content>
38
 <ion-content>
36
-  <div id="map_canvas"></div>
39
+  <div id="map_canvas">
40
+    <ion-fab right bottom>
41
+      <button ion-fab color="primary"><ion-icon name="car"></ion-icon></button>
42
+      <ion-fab-list side="left">
43
+        <button ion-fab><ion-icon name="map" (click)="shareViaMaps()"></ion-icon></button>
44
+        <button ion-fab><ion-icon name="logo-whatsapp" (click)="shareViaWhatsapp()"></ion-icon></button>
45
+      </ion-fab-list>
46
+    </ion-fab>
47
+  </div>
37
 </ion-content>
48
 </ion-content>

+ 10 - 1
src/pages/main/main.ts Vedi File

53
       console.log('ionViewWillEnter: Entro al undefined');
53
       console.log('ionViewWillEnter: Entro al undefined');
54
       this.storage.get('rootDevice').then((valDevice)=>{
54
       this.storage.get('rootDevice').then((valDevice)=>{
55
         if(valDevice == null) {
55
         if(valDevice == null) {
56
-          alert(valDevice);
57
           console.log('ionViewWillEnter: Entro al valDevice == null ' + valDevice);
56
           console.log('ionViewWillEnter: Entro al valDevice == null ' + valDevice);
58
           this.navCtrl.push(DevicesPage);
57
           this.navCtrl.push(DevicesPage);
59
         } else {
58
         } else {
122
           this.storage.set('authentication', '');
121
           this.storage.set('authentication', '');
123
           this.storage.set('remember', false);
122
           this.storage.set('remember', false);
124
           this.storage.set('rootDevice', null);
123
           this.storage.set('rootDevice', null);
124
+          this.storage.set('startAlarm', false);
125
+          this.storage.set('time', 30);
125
       	  this.navCtrl.setRoot(HomePage);
126
       	  this.navCtrl.setRoot(HomePage);
126
         }
127
         }
127
       },{
128
       },{
202
         );
203
         );
203
   }
204
   }
204
 
205
 
206
+  shareViaMaps() {
207
+
208
+  }
209
+
210
+  shareViaWhatsapp() {
211
+    
212
+  }
213
+
205
 }
214
 }

+ 8 - 2
src/theme/variables.scss Vedi File

33
 // colors so you can add, rename and remove colors as needed.
33
 // colors so you can add, rename and remove colors as needed.
34
 // The "primary" color is the only required color in the map.
34
 // The "primary" color is the only required color in the map.
35
 
35
 
36
-$colors: (
36
+/*$colors: (
37
   primary:    #488aff,
37
   primary:    #488aff,
38
   secondary:  #32db64,
38
   secondary:  #32db64,
39
   danger:     #f53d3d,
39
   danger:     #f53d3d,
40
   light:      #f4f4f4,
40
   light:      #f4f4f4,
41
   dark:       #222
41
   dark:       #222
42
+);*/
43
+$colors: (
44
+  primary:    #42bc7b,
45
+  secondary:  #00ff00,
46
+  danger:     #0000ff,
47
+  light:      #ff0000,
48
+  dark:       #00ff00
42
 );
49
 );
43
 
50
 
44
-
45
 // App iOS Variables
51
 // App iOS Variables
46
 // --------------------------------------------------
52
 // --------------------------------------------------
47
 // iOS only Sass variables can go here
53
 // iOS only Sass variables can go here