lasta chnages

This commit is contained in:
Eudes Inácio
2022-03-03 08:21:22 +01:00
parent 99275b891b
commit 5c210928c0
15 changed files with 527 additions and 365 deletions
@@ -8,6 +8,7 @@ import { ViewMediaPageRoutingModule } from './view-media-routing.module';
import { ViewMediaPage } from './view-media.page';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { PdfViewerModule } from 'ng2-pdf-viewer';
@NgModule({
imports: [
@@ -15,7 +16,8 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
FormsModule,
IonicModule,
FontAwesomeModule,
ViewMediaPageRoutingModule
ViewMediaPageRoutingModule,
PdfViewerModule
],
declarations: [ViewMediaPage]
})
@@ -20,7 +20,13 @@
<ion-slides style="width: 100%; height: 100%;" [options]="sliderOpts">
<ion-slide>
<div class="swiper-zoom-container">
<img src="{{image}}">
<div *ngIf="type == 'application/img'">
<img src="{{image}}">
</div>
<div *ngIf="type == 'application/pdf'">
<pdf-viewer [src]="image" [render-text]="true" [original-size]="false" [zoom]="0.5" style="display: block;">
</pdf-viewer>
</div>
</div>
</ion-slide>
</ion-slides>
@@ -9,6 +9,7 @@ import { ModalController, NavParams } from '@ionic/angular';
export class ViewMediaPage implements OnInit {
image: any;
type: any;
name: string
_updatedAt: string
@@ -22,6 +23,7 @@ export class ViewMediaPage implements OnInit {
private navParams:NavParams,
) {
this.image = this.navParams.get('image')
this.type = this.navParams.get('type')
this.name = this.navParams.get('username')
this._updatedAt = this.navParams.get('_updatedAt')
}