fix: label releases search bar grows from right, fixed nav height, homologate back button
This commit is contained in:
1 file changed
+43
-34
@@ -331,11 +331,16 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="label-view" onscroll={handleScroll}>
|
<div class="label-view" onscroll={handleScroll}>
|
||||||
|
<!-- Back button -->
|
||||||
|
<div class="top-bar">
|
||||||
|
<button class="back-btn" onclick={onBack}>
|
||||||
|
<ArrowLeft size={16} />
|
||||||
|
<span>{$t('actions.back')}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<header class="label-header">
|
<header class="label-header">
|
||||||
<button class="back-btn" onclick={onBack} title={$t('actions.back')}>
|
|
||||||
<ArrowLeft size={20} />
|
|
||||||
</button>
|
|
||||||
<div class="label-image-wrapper">
|
<div class="label-image-wrapper">
|
||||||
{#if getLabelImage()}
|
{#if getLabelImage()}
|
||||||
<img src={getLabelImage()} alt={label?.name || labelName} class="label-image" loading="lazy" decoding="async" />
|
<img src={getLabelImage()} alt={label?.name || labelName} class="label-image" loading="lazy" decoding="async" />
|
||||||
@@ -361,6 +366,22 @@
|
|||||||
<!-- Toolbar: Search + Sort + Filter -->
|
<!-- Toolbar: Search + Sort + Filter -->
|
||||||
<nav class="label-nav">
|
<nav class="label-nav">
|
||||||
<div class="nav-left">
|
<div class="nav-left">
|
||||||
|
<span class="nav-title">{$t('label.releases')}</span>
|
||||||
|
{#if apiSearchResults !== null}
|
||||||
|
<span class="nav-count">{processedAlbums.length} {$t('labelReleases.results')}</span>
|
||||||
|
{:else if filterHiRes || groupByArtist || sortBy !== 'newest'}
|
||||||
|
<span class="nav-count">
|
||||||
|
{processedAlbums.length}
|
||||||
|
{#if filterHiRes} Hi-Res{/if}
|
||||||
|
{#if albumsFetched < totalAlbums}
|
||||||
|
— {$t('labelReleases.showingOf', { values: { shown: albumsFetched, total: totalAlbums } })}
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
|
{:else if albumsFetched > 0 && albumsFetched < totalAlbums}
|
||||||
|
<span class="nav-count">{$t('labelReleases.showingOf', { values: { shown: albumsFetched, total: totalAlbums } })}</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
<div class="nav-right">
|
||||||
{#if searchExpanded}
|
{#if searchExpanded}
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
<Search size={15} class="search-icon-inline" />
|
<Search size={15} class="search-icon-inline" />
|
||||||
@@ -378,24 +399,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<span class="nav-title">{$t('label.releases')}</span>
|
|
||||||
{#if apiSearchResults !== null}
|
|
||||||
<span class="nav-count">{processedAlbums.length} {$t('labelReleases.results')}</span>
|
|
||||||
{:else if filterHiRes || groupByArtist || sortBy !== 'newest'}
|
|
||||||
<span class="nav-count">
|
|
||||||
{processedAlbums.length}
|
|
||||||
{#if filterHiRes} Hi-Res{/if}
|
|
||||||
{#if albumsFetched < totalAlbums}
|
|
||||||
— {$t('labelReleases.showingOf', { values: { shown: albumsFetched, total: totalAlbums } })}
|
|
||||||
{/if}
|
|
||||||
</span>
|
|
||||||
{:else if albumsFetched > 0 && albumsFetched < totalAlbums}
|
|
||||||
<span class="nav-count">{$t('labelReleases.showingOf', { values: { shown: albumsFetched, total: totalAlbums } })}</span>
|
|
||||||
{/if}
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<div class="nav-right">
|
|
||||||
{#if !searchExpanded}
|
|
||||||
<button class="toolbar-btn" onclick={() => searchExpanded = true} title={$t('labelReleases.searchAlbums')}>
|
<button class="toolbar-btn" onclick={() => searchExpanded = true} title={$t('labelReleases.searchAlbums')}>
|
||||||
<Search size={16} />
|
<Search size={16} />
|
||||||
</button>
|
</button>
|
||||||
@@ -570,25 +573,28 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-btn {
|
.top-bar {
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: space-between;
|
||||||
background: var(--bg-secondary);
|
margin-bottom: 16px;
|
||||||
border: 1px solid var(--border-subtle);
|
}
|
||||||
border-radius: 8px;
|
|
||||||
color: var(--text-secondary);
|
.back-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 150ms ease;
|
padding: 0;
|
||||||
flex-shrink: 0;
|
transition: color 150ms ease;
|
||||||
margin-top: 72px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-btn:hover {
|
.back-btn:hover {
|
||||||
background: var(--bg-tertiary);
|
color: var(--text-secondary);
|
||||||
color: var(--text-primary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-image-wrapper {
|
.label-image-wrapper {
|
||||||
@@ -662,6 +668,8 @@
|
|||||||
padding: 10px 24px;
|
padding: 10px 24px;
|
||||||
margin: 0 -8px 16px -24px;
|
margin: 0 -8px 16px -24px;
|
||||||
width: calc(100% + 32px);
|
width: calc(100% + 32px);
|
||||||
|
height: 50px;
|
||||||
|
box-sizing: border-box;
|
||||||
background: var(--bg-primary);
|
background: var(--bg-primary);
|
||||||
border-bottom: 1px solid var(--alpha-6);
|
border-bottom: 1px solid var(--alpha-6);
|
||||||
box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.5);
|
box-shadow: 0 4px 8px -4px rgba(0, 0, 0, 0.5);
|
||||||
@@ -705,6 +713,7 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.search-icon-inline) {
|
:global(.search-icon-inline) {
|
||||||
|
|||||||
Reference in new issue
Block a user