Переработана страница поиска и добавления треков в плейлист
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@page "/favorites"
|
||||
@using PlaylistShared.Shared.Shared
|
||||
@using PlaylistShared.Shared.SharedPlaylist
|
||||
@attribute [Authorize]
|
||||
@inject HttpClient Http
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<!-- Локальная форма входа -->
|
||||
<MudTextField @bind-Value="_loginModel.Username" Label="Имя пользователя" Variant="Variant.Outlined" FullWidth="true" Class="mb-3" />
|
||||
<MudTextField @bind-Value="_loginModel.Password" Label="Пароль" Variant="Variant.Outlined" FullWidth="true" InputType="InputType.Password" OnKeyUp="@(async (e) => { if (e.Key == "Enter") await LocalLogin(); })" />
|
||||
<MudTextField @bind-Value="_loginModel.Password" Label="Пароль" Variant="Variant.Outlined" FullWidth="true" InputType="InputType.Password" @bind-Value:after="LocalLogin" />
|
||||
|
||||
<MudButton Variant="Variant.Outlined" Color="Color.Secondary" OnClick="LocalLogin" FullWidth="true" Class="mt-4">
|
||||
Войти (локально)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</CardHeaderContent>
|
||||
</MudCardHeader>
|
||||
<MudCardContent>
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;">
|
||||
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="mb-4">
|
||||
<MudText Typo="Typo.body2">
|
||||
Здесь вы можете указать токен доступа к Яндекс.Музыке.
|
||||
</MudText>
|
||||
@@ -22,7 +22,7 @@
|
||||
Color="Color.Info"
|
||||
OnClick="() => _instructionDrawerOpen = true"
|
||||
Title="Как получить токен?" />
|
||||
</div>
|
||||
</MudStack>
|
||||
|
||||
<MudTextField @bind-Value="_token" Label="Токен Яндекс.Музыки" Variant="Variant.Outlined" FullWidth="true" />
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@using PlaylistShared.Shared.DTO
|
||||
@using PlaylistShared.Shared.Enums
|
||||
@using PlaylistShared.Pwa.Services
|
||||
@using PlaylistShared.Shared.Shared
|
||||
@using PlaylistShared.Shared.SharedPlaylist
|
||||
@inject HttpClient Http
|
||||
@inject ISnackbar Snackbar
|
||||
@inject NavigationManager Navigation
|
||||
@@ -34,14 +34,15 @@
|
||||
{
|
||||
<AddTrackSection ShareToken="@Token"
|
||||
OnTrackAdded="LoadTracks"
|
||||
OnTrackRemoved="LoadTracks"
|
||||
/>
|
||||
}
|
||||
|
||||
<!-- Список треков -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
|
||||
<MudStack Row Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center" Class="mb-4">
|
||||
<MudText Typo="Typo.h6">Треки</MudText>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Refresh" OnClick="LoadTracks" Disabled="_tracksLoading" Size="Size.Medium" />
|
||||
</div>
|
||||
</MudStack>
|
||||
|
||||
<TracksTable @ref="_tracksTableRef"
|
||||
ShareToken="@Token"
|
||||
@@ -58,8 +59,6 @@
|
||||
@code {
|
||||
[Parameter] public string Token { get; set; }
|
||||
|
||||
private int _addTrackTabIndex = 0; // 0 - ссылка, 1 - поиск
|
||||
|
||||
private TracksTable? _tracksTableRef;
|
||||
|
||||
private SharedPlaylistDto? _playlist;
|
||||
|
||||
Reference in New Issue
Block a user