change button

This commit is contained in:
Peter Maquiran
2024-01-18 17:17:03 +01:00
parent c862ab9ad7
commit 888467f3de
7 changed files with 101 additions and 53 deletions
@@ -7,13 +7,17 @@ import { IonicModule } from '@ionic/angular';
import { NewPublicationPageRoutingModule } from './new-publication-routing.module';
import { NewPublicationPage } from './new-publication.page';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
NewPublicationPageRoutingModule
NewPublicationPageRoutingModule,
MatProgressBarModule,
FontAwesomeModule,
],
exports: [NewPublicationPage],
declarations: [NewPublicationPage]
@@ -43,22 +43,39 @@
<div *ngIf="seletedContent.length > 0">
<ion-label class="attached-title pb-10">Anexos</ion-label>
<div>
<div class="d-flex">
<div class="d-flex" >
<div *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" lot="start" class="mr-10">
<div>
<div class="text-center cursor-pointer" (click)="deleteFromSeletedContent(i)" style="font-weight: 700;color: #c63527;">
X
</div>
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
name="image" ngDefaultControl [src]="seleted.FileBase64" style="width: 50px;"></ion-img>
name="image" ngDefaultControl [src]="seleted.FileBase64" style="height: 69px;"></ion-img>
<!-- <div class="progress-container" *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'">
<div class="progress-bar" id="myProgressBar"></div>
</div> -->
<!-- <div *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'">
<mat-progress-bar
*ngIf="seleted.chucksManager"
mode="determinate"
style="width: 50%"
></mat-progress-bar>
</div> -->
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
preload="metadata" webkit-playsinline="webkit-playsinline">
<source type="video/mp4" [src]="seleted.FileBase64">
</video>
<div class="text-center cursor-pointer" (click)="deleteFromSeletedContent(i)">
<ion-icon src="assets/images/theme/gov/icons-delete.svg" class="delete md hydrated"></ion-icon>
</div>
</div>
@@ -156,3 +156,24 @@ font-size: rem(25);
display: block;
}
.progress-container {
width: 50%;
background-color: #f1f1f1;
border: 1px solid #ddd;
border-radius: 5px;
overflow: hidden;
}
.progress-bar {
width: 0;
height: 30px;
background-color: #4caf50;
text-align: center;
line-height: 30px;
color: white;
}
@@ -401,12 +401,8 @@ export class NewPublicationPage implements OnInit {
}
let a = this.publication
this.publicationFormMV.setDataToFrom(a)
this.publicationFormMV.uploadVideosFiles()
// this.publicationFormMV.setDataToFrom(this.publication)
// this.publicationFormMV.uploadVideosFiles()
this.publication.Files = this.publication.Files.map( e => ({
FileBase64: e.FileBase64,
@@ -414,7 +410,6 @@ export class NewPublicationPage implements OnInit {
OriginalFileName: 'foto'
}))
const loader = this.toastService.loading()
try {