diff --git a/frontend/src/components/artists-view/artists-view.ts b/frontend/src/components/artists-view/artists-view.ts
index 1e53b3f..1f02803 100644
--- a/frontend/src/components/artists-view/artists-view.ts
+++ b/frontend/src/components/artists-view/artists-view.ts
@@ -327,12 +327,22 @@ export class ArtistsView
line-height: 1.3;
}
+ .search-bar-row {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 30px;
+ border-bottom: 1px solid
+ var(--yj-border-subtle, #333);
+ flex-shrink: 0;
+ user-select: none;
+ }
+
.search-indicator {
position: absolute;
- top: 8px;
left: 50%;
transform: translateX(-50%);
- z-index: 5;
pointer-events: none;
background: var(
--yj-bg-overlay,
@@ -343,7 +353,7 @@ export class ArtistsView
#b3b3b3
);
font-size: 12px;
- padding: 4px 14px;
+ padding: 2px 14px;
border-radius: 12px;
border: 1px solid
var(--yj-border-subtle, #555);
@@ -1186,9 +1196,19 @@ export class ArtistsView
}
const entries = this.cachedGridEntries;
+ const searchBar = this.searchCtrl.term
+ ? html`
${this.searchCtrl.term
? 'No artists match your search.'
@@ -1198,15 +1218,7 @@ export class ArtistsView
}
return html`
- ${this.searchCtrl.term
- ? html`
- Showing results for
- “${this.searchCtrl
- .term}”
-
`
- : nothing}
+ ${searchBar}
${this.renderSortDropdownPopup()}
`;
@@ -1812,6 +1818,7 @@ export class CoverGrid
if (this.cachedFilteredAlbums.length === 0) {
return html`
+ ${this.renderSortToolbar()}
No albums match your search.
@@ -1824,12 +1831,6 @@ export class CoverGrid
return html`
${this.renderSortToolbar()}
- ${this.searchCtrl.term
- ? html`
- Showing results for
- “${this.searchCtrl.term}”
-
`
- : nothing}
`
+ : nothing;
if (entries.length === 0) {
return html`
+ ${searchBar}
${this.searchCtrl.term
? 'No genres match your search.'
@@ -1150,15 +1170,7 @@ export class GenresView
}
return html`
- ${this.searchCtrl.term
- ? html`
- Showing results for
- “${this.searchCtrl
- .term}”
-
`
- : nothing}
+ ${searchBar}
${this.renderSortDropdownPopup()}
`;
@@ -2532,15 +2540,6 @@ export class PlaylistView
${this.renderSortToolbar()}
- ${this.searchCtrl.term &&
- this.filteredEntries.length > 0
- ? html`
- Showing results for
- “${this.searchCtrl
- .term}”
-
`
- : nothing}
-
${this.creating
? this.renderCreateForm()
: nothing}
diff --git a/frontend/src/components/track-list/track-list.ts b/frontend/src/components/track-list/track-list.ts
index d9af0c9..a89e5b3 100644
--- a/frontend/src/components/track-list/track-list.ts
+++ b/frontend/src/components/track-list/track-list.ts
@@ -897,17 +897,19 @@ export class TrackList extends LitElement implements SelectionHost, ContextMenuH
background-color: var(--yj-text-tertiary, #6c757d);
}
+ .sort-toolbar {
+ position: relative;
+ }
+
.search-indicator {
position: absolute;
- top: 8px;
left: 50%;
transform: translateX(-50%);
- z-index: 5;
pointer-events: none;
background: var(--yj-bg-overlay, #495057);
color: var(--yj-text-secondary, #b3b3b3);
font-size: var(--yj-text-sm);
- padding: 4px 14px;
+ padding: 2px 14px;
border-radius: 12px;
border: 1px solid var(--yj-border-subtle, #555);
white-space: nowrap;
@@ -1640,6 +1642,12 @@ export class TrackList extends LitElement implements SelectionHost, ContextMenuH
`
: nothing}
+ ${this.searchCtrl.term
+ ? html`
+ Showing results for
+ “${this.searchCtrl.term}”
+
`
+ : nothing}
${this.renderSortDropdownPopup()}
`;
@@ -1743,13 +1751,6 @@ export class TrackList extends LitElement implements SelectionHost, ContextMenuH
>
`}
- ${this.searchCtrl.term && visibleTracks.length > 0
- ? html`
- Showing results for
- “${this.searchCtrl.term}”
-
`
- : nothing}
-
${this.colBoundaryPositions.map(
(pos, i) => html`
diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts
index 6f850c9..bb585c6 100755
--- a/frontend/wailsjs/go/models.ts
+++ b/frontend/wailsjs/go/models.ts
@@ -66,6 +66,22 @@ export namespace library {
}
}
+ export class ScanWarning {
+ filePath: string;
+ phase: string;
+ err: any;
+
+ static createFrom(source: any = {}) {
+ return new ScanWarning(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.filePath = source["filePath"];
+ this.phase = source["phase"];
+ this.err = source["err"];
+ }
+ }
export class ScanMetrics {
total: number;
loadExisting: number;
@@ -92,6 +108,7 @@ export namespace library {
updated: number;
skipped: number;
removed: number;
+ warnings: ScanWarning[];
static createFrom(source: any = {}) {
return new ScanMetrics(source);
@@ -124,8 +141,28 @@ export namespace library {
this.updated = source["updated"];
this.skipped = source["skipped"];
this.removed = source["removed"];
+ this.warnings = this.convertValues(source["warnings"], ScanWarning);
}
+
+ convertValues(a: any, classs: any, asMap: boolean = false): any {
+ if (!a) {
+ return a;
+ }
+ if (a.slice && a.map) {
+ return (a as any[]).map(elem => this.convertValues(elem, classs));
+ } else if ("object" === typeof a) {
+ if (asMap) {
+ for (const key of Object.keys(a)) {
+ a[key] = new classs(a[key]);
+ }
+ return a;
+ }
+ return new classs(a);
+ }
+ return a;
+ }
}
+
export class Track {
TrackName: string;
ArtistName: string;