-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from Apes2getherStrong/WTG-61-fix-audio-in-ma…
…p-location-modal Done
- Loading branch information
Showing
5 changed files
with
58 additions
and
37 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<div *ngIf="isLoading" class="loading-indicator"> | ||
<p>Loading audio files, please wait...</p> | ||
</div> | ||
<div *ngIf="isError" class="error-indicator"> | ||
<p>Error loading audio files. Please try again later.</p> | ||
</div> | ||
<div *ngIf="audioData.length==0 && !isLoading" class="no-audio-indicator d-flex flex-column align-items-center justify-content-center"> | ||
<i class="fa fa-volume-mute fa-3x mb-3 text-muted"></i> | ||
<p class="text-muted">No audios found</p> | ||
</div> | ||
<ul class="list-group list-group-flush" *ngIf="!isLoading && !isError"> | ||
<li class="list-group-item" *ngFor="let audioItem of audioData"> | ||
<div class="card"> | ||
<div class="card-header d-flex align-items-center"> | ||
{{ audioItem.audio.name }} | ||
</div> | ||
<div class="card-body d-flex justify-content-center"> | ||
<div class="col-12 col-md-6"> | ||
<audio class="w-100" controls> | ||
<source [src]="audioItem.url" type="audio/mpeg"/> | ||
Your browser does not support the audio element. | ||
</audio> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {Component, Input} from '@angular/core'; | ||
import {Audio} from "../audio.model"; | ||
import { DomSanitizer, SafeUrl } from "@angular/platform-browser"; | ||
import {NgClass, NgForOf, NgIf} from "@angular/common"; | ||
|
||
@Component({ | ||
selector: 'app-audio-list', | ||
standalone: true, | ||
imports: [ | ||
NgClass, | ||
NgIf, | ||
NgForOf, | ||
], | ||
templateUrl: './audio-list.component.html', | ||
styleUrl: './audio-list.component.css' | ||
}) | ||
export class AudioListComponent { | ||
@Input() audioData: { audio: Audio, url: SafeUrl }[] = []; | ||
@Input() isLoading: boolean = false; | ||
@Input() isError: boolean = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters