|
@@ -20,7 +20,7 @@
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- <ul class="nav nav-tabs justify-content-center nav-fill" id="RootTab" role="tablist">
|
|
|
+ <ul class="nav nav-tabs justify-content-center nav-fill" id="RootTab" role="tablist">
|
|
|
<li class="nav-item" role="presentation">
|
|
|
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">
|
|
|
Browse
|
|
@@ -40,21 +40,7 @@
|
|
|
<div class="tab-content" id="RootTabContent">
|
|
|
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
|
|
<div class="row justify-content-evenly mt-2">
|
|
|
- <div class="d-flex flex-row bd-highlight mt-2">
|
|
|
- <div style="padding-right:5px;">
|
|
|
- Lobrary (@Libraries.Count) :
|
|
|
- </div>
|
|
|
- <Select2 class="flex-fill" TItem="KeyValuePair<string,Library>"
|
|
|
- TSource="IReadOnlyCollection<KeyValuePair<string,Library>>"
|
|
|
- IdSelector="c => c.Key"
|
|
|
- TextSelector="c =>c.Value.Name+' '+'('+c.Value.Discs.Count+')'"
|
|
|
- FilterFunction="FilterLibrary"
|
|
|
- GetElementById="async (items, id, token) => items.FirstOrDefault(q=>q.Key==id)"
|
|
|
- Datasource="Libraries.OrderBy(p=>p.Key).ToArray()"
|
|
|
- Value="@SelectedLibs"
|
|
|
- Multiselect="false"
|
|
|
- OnValueChanged="SelectedLibraryChanged" />
|
|
|
- </div>
|
|
|
+ <LibSelector Libraries="@Libraries" SelectedLibs="@SelectedLibs" OnValueChanged="SelectedLibraryChanged"></LibSelector>
|
|
|
<div class="row mt-2">
|
|
|
<div class="col-12">
|
|
|
@if (CurrentLibrary != null)
|
|
@@ -63,6 +49,7 @@
|
|
|
@foreach (var d in CurrentLibrary.Discs.OrderByDescending(p => p.Key))
|
|
|
{
|
|
|
<div class="col-md-3">
|
|
|
+ @*TODO: Card Component*@
|
|
|
<div class="card mb-3 shadow-sm" @onclick="()=>SelectDisc(d.Key)">
|
|
|
<img class="card-img-top" src="@ApiClient.ImageUrl(CurrentLibraryKey,d.Key)">
|
|
|
<div class="card-body">
|
|
@@ -92,6 +79,7 @@
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
+ @*TODO: Disc Modal*@
|
|
|
<div class="container-fluid">
|
|
|
<div class="row">
|
|
|
@if (CurrentDisc != null)
|
|
@@ -115,59 +103,20 @@
|
|
|
</ul>
|
|
|
<div class="tab-content" id="ModalDiscTabContent">
|
|
|
<div class="tab-pane fade show active" id="tracks-main" role="tabpanel" aria-labelledby="home-tab">
|
|
|
- <a href="@ApiClient.GetListPageUrl(CurrentLibraryKey,CurrentDiscKey)" target="_fnz_play">Playlist page</a>
|
|
|
- <table class="table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th scope="col">Name</th>
|
|
|
- <th scope="col"></th>
|
|
|
- <th scope="col">Duration</th>
|
|
|
- <th scope="col">Size</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- @foreach (var t in CurrentDisc.MainTracks.OrderBy(p => p.Key))
|
|
|
- {
|
|
|
- <tr>
|
|
|
- <th scope="row">
|
|
|
- <a href="@ApiClient.GetMediaUrl(CurrentLibraryKey,CurrentDiscKey,t.Key)" target="_fnz_play">@t.Value</a>
|
|
|
- </th>
|
|
|
- <td></td>
|
|
|
- <td>TODO</td>
|
|
|
- <td>TODO</td>
|
|
|
- </tr>
|
|
|
- }
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <TrackSetTable
|
|
|
+ LibraryKey="@CurrentLibraryKey"
|
|
|
+ DiscKey="@CurrentDiscKey"
|
|
|
+ TrackSetKey="null"
|
|
|
+ Tracks="@CurrentDisc?.MainTracks"></TrackSetTable>
|
|
|
</div>
|
|
|
@foreach (var subSet in CurrentDisc.SubTracks.OrderBy(p => p.Key).WithIndex())
|
|
|
{
|
|
|
<div class="tab-pane fade show" id="tracks-@subSet.index" role="tabpanel" aria-labelledby="home-tab">
|
|
|
- <a href="@ApiClient.GetListPageUrl(CurrentLibraryKey,CurrentDiscKey,subSet.item.Key)" target="_fnz_play">Playlist page</a>
|
|
|
- <table class="table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th scope="col">Name</th>
|
|
|
- <th scope="col"></th>
|
|
|
- <th scope="col">Duration</th>
|
|
|
- <th scope="col">Size</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- @foreach (var t in subSet.item.Value.Tracks.OrderBy(p => p.Key))
|
|
|
- {
|
|
|
- <tr>
|
|
|
- <th scope="row">
|
|
|
- <a href="@ApiClient.GetMediaUrl(CurrentLibraryKey,CurrentDiscKey,t.Key,subSet.item.Key)" target="_fnz_play">@t.Value</a>
|
|
|
- </th>
|
|
|
- <td></td>
|
|
|
- <td>TODO</td>
|
|
|
- <td>TODO</td>
|
|
|
- </tr>
|
|
|
- }
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
+ <TrackSetTable LibraryKey="@CurrentLibraryKey"
|
|
|
+ DiscKey="@CurrentDiscKey"
|
|
|
+ TrackSetKey="@subSet.item.Key"
|
|
|
+ Tracks="@subSet.item.Value.Tracks"></TrackSetTable>
|
|
|
+ </div>
|
|
|
}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -180,7 +129,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
|
|
|
<div class="container">
|
|
@@ -193,6 +142,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+
|