Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Muestra versión de app en menú #177

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@angular/router": "~10.0.0",
"@auth0/angular-jwt": "^5.0.1",
"@google/maps": "^1.1.3",
"@ionic-native/app-version": "^5.36.0",
"@ionic-native/barcode-scanner": "^5.29.0",
"@ionic-native/base64": "^5.29.0",
"@ionic-native/camera": "^5.36.0",
Expand Down Expand Up @@ -123,6 +124,7 @@
"cordova-plugin-advanced-http": "^3.2.2",
"cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-app-version": "^0.1.12",
"cordova-plugin-camera": "^6.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-email-composer": "^0.9.2",
Expand Down Expand Up @@ -197,7 +199,8 @@
},
"cordova-plugin-email-composer": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
},
"cordova-plugin-app-version": {}
},
"platforms": [
"browser",
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@
</ion-list>
</ion-menu-toggle>
</ion-content>
<ion-footer *ngIf="appVersion">
<ion-toolbar color="medium" class="ion-margin-start">
<ion-text color="medium">
<small><em>{{ appVersion }}</em></small>
</ion-text>
</ion-toolbar>
</ion-footer>
</ion-menu>
<ion-router-outlet id="main-content"></ion-router-outlet>
</ion-split-pane>
</ion-app>
</ion-app>
13 changes: 9 additions & 4 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { Router } from '@angular/router';
templateUrl: 'app.component.html'
})
export class AppComponent {
appVersion: any;

constructor(
private deviceProvider: DeviceProvider,
Expand Down Expand Up @@ -68,6 +69,9 @@ export class AppComponent {
this.platform.ready().then(async () => {

if (this.platform.is('cordova')) {

this.appVersion = await this.deviceProvider.getAppVersion();

this.statusBar.styleLightContent();
this.splashScreen.hide();

Expand Down Expand Up @@ -120,6 +124,7 @@ export class AppComponent {
});
}


get isLogged() {
return this.authProvider.user !== null;
}
Expand Down Expand Up @@ -201,8 +206,8 @@ export class AppComponent {
},
{
text: 'Descargar',
handler: () => {
window.open(`market:https://details?id=${ENV.REPOSITORIO}`);
handler: async () => {
window.open(`market:https://details?id=${await this.deviceProvider.getPackageName()}`);
}
}
]
Expand Down Expand Up @@ -232,8 +237,8 @@ export class AppComponent {
},
{
text: 'Descargar',
handler: () => {
window.open(`market:https://details?id=${ENV.REPOSITORIO}`);
handler: async () => {
window.open(`market:https://details?id=${await this.deviceProvider.getPackageName()}`);
(navigator as any).app.exitApp();
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import { HttpModule } from '@angular/http';
import { DescargaArchivosProvider } from 'src/providers/descarga-archivos';
import { FirebaseMessaging } from '@ionic-native/firebase-messaging/ngx';
import { HTTP } from '@ionic-native/http/ngx';
import { AppVersion } from '@ionic-native/app-version/ngx';

registerLocaleData(localeSpanish, 'es');
moment.locale('es');
Expand Down Expand Up @@ -102,6 +103,7 @@ moment.locale('es');
FirebaseMessaging,
HTTP,
StorageService,
AppVersion,
{ provide: LOCALE_ID, useValue: 'es' },
],
bootstrap: [AppComponent],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ <h3>Activación de cuenta de {{ accountNombre }}</h3>
</div>
</ng-container>

</ion-content>
</ion-content>
2 changes: 1 addition & 1 deletion src/app/pages/mis-familiares/registro-familiar.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ <h2>{{ sexo }}</h2>
</form>
</ng-container>
</ng-container>
</ion-content>
</ion-content>
Binary file removed src/assets/img/andes-dni-dorso.jpg
Binary file not shown.
Loading