Added voice work image fallback. Added tag/creator/circle chip components. Updated voice work search response to include favorite/blacklisted flags for tags/creators/circles.
Some checks failed
ci / build-test (push) Has been cancelled
ci / publish-image (push) Has been cancelled

This commit is contained in:
2026-02-22 01:56:04 -05:00
parent 9f30ef446a
commit 8348603b13
17 changed files with 521 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
<div class="@ContainerClassees">
<div class="@OverlayClasses"></div>
<img class="@ImageClasses" loading="@LoadingAttribute" src="@Source" @onload="OnImageLoaded">
<img class="@ImageClasses" loading="@LoadingAttribute" src="@currentSource" @onload="OnImageLoaded" @onerror="OnImageError">
</div>
@code {
@@ -8,7 +8,7 @@
public required string Source { get; set; }
[Parameter]
public string FallbackSource { get; set; } = "images/home/no_img_main.gif";
public string FallbackSource { get; set; } = "images/web/home/not_found_img_main.png"; // "images/web/home/no_img_main.gif";
[Parameter]
public bool LazyLoading { get; set; } = true;
@@ -22,6 +22,10 @@
[Parameter]
public string? ImageClass { get; set; }
private string? currentSource;
private bool hasSourceErrored = false;
private bool hasFallbackSourceErrored = false;
private bool _isLoaded;
private string? _lastSource;
@@ -33,6 +37,10 @@
protected override void OnParametersSet()
{
currentSource = Source;
hasSourceErrored = false;
hasFallbackSourceErrored = false;
if (!string.Equals(_lastSource, Source, StringComparison.Ordinal))
{
_lastSource = Source;
@@ -103,4 +111,20 @@
{
_isLoaded = true;
}
private void OnImageError()
{
if (!hasSourceErrored && !string.IsNullOrEmpty(FallbackSource))
{
hasSourceErrored = true;
currentSource = FallbackSource;
StateHasChanged();
}
else if (!hasFallbackSourceErrored)
{
hasFallbackSourceErrored = true;
currentSource = "images/web/home/not_found_img_main.png";
StateHasChanged();
}
}
}