fix message

This commit is contained in:
Peter Maquiran
2024-09-05 11:45:54 +01:00
parent 106267aee9
commit b0e1dd74cd
16 changed files with 237 additions and 78 deletions
@@ -7,13 +7,15 @@ import { IonicModule } from '@ionic/angular';
import { ViewOncesPageRoutingModule } from './view-onces-routing.module';
import { ViewOncesImagePage } from './view-onces.page';
import { PipesModule } from 'src/app/pipes/pipes.module';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
ViewOncesPageRoutingModule
ViewOncesPageRoutingModule,
PipesModule
],
declarations: [ViewOncesImagePage]
})
@@ -11,6 +11,14 @@
<ion-content>
<div class="justify-center align-center d-flex width-100 height-100">
<img [src]="params.imageDataUrl">
<img
*ngIf="blobURl"
[src]="params.imageDataUrl|safehtml"
>
<img
*ngIf="!blobURl"
[src]="params.imageDataUrl"
>
</div>
</ion-content>
@@ -19,19 +19,22 @@ export type ViewOncesImagePageInput = z.infer<typeof ViewOncesImagePageInputSche
export class ViewOncesImagePage implements OnInit {
params: ViewOncesImagePageInput
blobURl: Boolean;
constructor(
private navParams: NavParams,
public modalController: ModalController,
) {
) {
this.params = this.navParams.data
}
ngOnInit() {
// console.log('niceddd')
// this.message = this.navParams.get('message');
// console.log('this.message', this.message)
if(this.params.imageDataUrl.startsWith('blob:http')) {
this.blobURl = true
} else {
this.blobURl = false
}
}
closePage() {