DSC-1111 Provided buttons next to the logo delete to save changes in the edit community page, also now the file upload is started automatically

This commit is contained in:
Sondissimo
2023-06-05 14:17:34 +02:00
committed by Mattia Vianelli
parent ab52cdb158
commit 2ae82fb07a
3 changed files with 3 additions and 5 deletions

View File

@@ -38,9 +38,6 @@
<button type="button" class="btn btn-danger" title="{{'uploader.delete.btn-title' | translate}}" (click)="uploader.clearQueue()" [disabled]="!uploader.queue.length"> <button type="button" class="btn btn-danger" title="{{'uploader.delete.btn-title' | translate}}" (click)="uploader.clearQueue()" [disabled]="!uploader.queue.length">
<i class="fas fa-trash" aria-hidden="true"></i> <i class="fas fa-trash" aria-hidden="true"></i>
</button> </button>
<button type="submit" class="btn btn-primary" (click)="uploader.uploadAll()">
<i class="fas fa-square-plus"></i> {{ "community.edit.logo.add.title" | translate}}
</button>
</div> </div>
<span *ngIf="uploader.progress < 100 && !(uploader.progress === 0 && !uploader.options.autoUpload)" class="float-right mr-3">{{ uploader.progress }}%</span> <span *ngIf="uploader.progress < 100 && !(uploader.progress === 0 && !uploader.options.autoUpload)" class="float-right mr-3">{{ uploader.progress }}%</span>
<span *ngIf="uploader.progress === 100" class="float-right mr-3">{{'uploader.processing' | translate}}</span> <span *ngIf="uploader.progress === 100" class="float-right mr-3">{{'uploader.processing' | translate}}</span>

View File

@@ -130,6 +130,9 @@ export class UploaderComponent {
ngAfterViewInit() { ngAfterViewInit() {
this.uploader.onAfterAddingAll = ((items) => { this.uploader.onAfterAddingAll = ((items) => {
this.onFileSelected.emit(items); this.onFileSelected.emit(items);
if (this.uploader.queue.length > 0) {
this.uploader.uploadAll();
}
}); });
if (isUndefined(this.onBeforeUpload)) { if (isUndefined(this.onBeforeUpload)) {
this.onBeforeUpload = () => {return;}; this.onBeforeUpload = () => {return;};

View File

@@ -1226,8 +1226,6 @@
"community.edit.logo.delete.title": "Delete logo", "community.edit.logo.delete.title": "Delete logo",
"community.edit.logo.add.title": "Add logo",
"community.edit.logo.delete-undo.title": "Undo delete", "community.edit.logo.delete-undo.title": "Undo delete",
"community.edit.logo.label": "Community logo", "community.edit.logo.label": "Community logo",