Skip to content

Commit

Permalink
Merge branch 'v2.3.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ellman12 committed Jun 16, 2023
2 parents 1d985ce + 5f25430 commit 38e0e06
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 17 deletions.
4 changes: 2 additions & 2 deletions PSS/PSS/Backend/Connection.cs
Expand Up @@ -717,8 +717,8 @@ public static List<Collection> GetCollectionsTable(bool showAlbums, bool showFol
{
CMSortMode.Title => "name ASC",
CMSortMode.TitleReversed => "name DESC",
CMSortMode.LastModified => "last_updated ASC",
CMSortMode.LastModifiedReversed => "last_updated DESC",
CMSortMode.LastModified => "last_updated DESC",
CMSortMode.LastModifiedReversed => "last_updated ASC",
_ => "name ASC"
};

Expand Down
8 changes: 4 additions & 4 deletions PSS/PSS/Pages/CollectionsMain.razor
Expand Up @@ -27,11 +27,11 @@
<div id="sortDiv" style="visibility: @sortDivVis">
<button class="textBtn" @onclick="@(() => ChangeOrder(CMSortMode.Title))">
<span class="material-icons-outlined" style="@(mode == CMSortMode.Title ? "color: #1a73e8" : "visibility: hidden")">check</span>
<span style="color: @(mode == CMSortMode.Title ? "#1a73e8" : "white")">Album Title</span>
<span style="color: @(mode == CMSortMode.Title ? "#1a73e8" : "white")">Collection Title</span>
</button>
<button class="textBtn" @onclick="@(() => ChangeOrder(CMSortMode.TitleReversed))">
<span class="material-icons-outlined" style="@(mode == CMSortMode.TitleReversed ? "color: #1a73e8" : "visibility: hidden")">check</span>
<span style="color: @(mode == CMSortMode.TitleReversed ? "#1a73e8" : "white")">Album Title Reversed</span>
<span style="color: @(mode == CMSortMode.TitleReversed ? "#1a73e8" : "white")">Collection Title Reversed</span>
</button>
<button class="textBtn" @onclick="@(() => ChangeOrder(CMSortMode.LastModified))">
<span class="material-icons-outlined" style="@(mode == CMSortMode.LastModified ? "color: #1a73e8" : "visibility: hidden")">check</span>
Expand Down Expand Up @@ -62,8 +62,8 @@
private CollectionCreator collectionCreator;

private string sortBtnText, sortDivVis = "hidden";
private CMSortMode mode = CMSortMode.LastModified;
private bool showAlbums = true, showFolders, showReadonly = true;
private static CMSortMode mode = CMSortMode.LastModified;
private static bool showAlbums = true, showFolders, showReadonly = true;

protected override void OnInitialized()
{
Expand Down
18 changes: 15 additions & 3 deletions PSS/PSS/Pages/Import.razor
Expand Up @@ -154,10 +154,14 @@
</div>
}

<ProgressPopUp Message="@popUpMsg" Visible="@addingItems"/>

@code {
private static ElementReference searchInput;

private static bool finishedLoading;
private bool finishedLoading, addingItems;

private string popUpMsg;

public static string pathWidthClass;

Expand Down Expand Up @@ -303,6 +307,13 @@
{
L.LogLine($"Begin {nameof(AddItems)}", LogLevel.Info);

if (selectedItems.Count == 0 || selectedItems.Count == importFiles.Count) popUpMsg = "Adding All Items...";
else if (selectedItems.Count == 1) popUpMsg = "Adding 1 Item...";
else popUpMsg = $"Adding {selectedItems.Count} Items...";

addingItems = true;
await InvokeAsync(StateHasChanged);

List<ImportFile> filesToAdd = selectedItems.Count == 0 || selectedItems.Count == importFiles.Count
? importFiles : importFiles.Where(file => selectedItems.Contains(file.uuid)).ToList();

Expand Down Expand Up @@ -339,9 +350,10 @@
else
importFiles.Clear();

addingItems = false;
OrganizeItems();
StateHasChanged();
await InvokeAsync(StateHasChanged);

L.LogLine($"Finish {nameof(AddItems)}", LogLevel.Info);
}

Expand Down
2 changes: 1 addition & 1 deletion PSS/PSS/Pages/Maintenance/Backups.razor
Expand Up @@ -31,7 +31,7 @@
}
</div>

<ProgressPopUp Message="@popUpMsg" FontSize="22" Visible="@popUpVis"/>
<ProgressPopUp Message="@popUpMsg" Visible="@popUpVis"/>
}

@code{
Expand Down
4 changes: 2 additions & 2 deletions PSS/PSS/Shared/CollectionSelector.razor
Expand Up @@ -32,7 +32,7 @@
<div class="collectionsList">
@for (int i = 0; i < albums.Count; i++)
{
if (!String.IsNullOrWhiteSpace(searchText) && !albums[i].name.Contains(searchText)) continue;
if (!String.IsNullOrWhiteSpace(searchText) && albums[i].name.IndexOf(searchText, StringComparison.InvariantCultureIgnoreCase) == -1) continue;

int ii = i;
<div class="collection" @onclick="@(() => { checkedAlbums[ii] = !checkedAlbums[ii]; ClearFolderChecks(); checkedFolderIndex = -1; })">
Expand All @@ -49,7 +49,7 @@
<div class="collectionsList">
@for (int i = 0; i < folders.Count; i++)
{
if (!String.IsNullOrWhiteSpace(searchText) && !folders[i].name.Contains(searchText)) continue;
if (!String.IsNullOrWhiteSpace(searchText) && folders[i].name.IndexOf(searchText, StringComparison.InvariantCultureIgnoreCase) == -1) continue;

int ii = i;
<div class="collection" @onclick="@(() => { checkedFolderIndex = ii; ClearAlbumChecks(); ClearFolderChecks(); checkedFolders[ii] = true; })">
Expand Down
4 changes: 2 additions & 2 deletions PSS/PSS/Shared/LibraryContentViewer.razor
Expand Up @@ -200,7 +200,7 @@ else
{
<CtrlGInput @ref=@ctrlGInput StartDateChanged="@StartDateChanged"/>
}
<KeyboardShortcuts AltS="@AltSFired" CtrlD="@DeleteBtnClick" Del="@DeleteBtnClick"/>
<KeyboardShortcuts AltS="@AltSFired" CtrlD="@DeleteBtnClick" Del="@DeleteBtnClick" Esc="@(async () => await ClearChecks())"/>
<ShortcutsReference DelText="Delete Selected Item(s)" CtrlDText="Delete Selected Item(s)" CtrlGText="Go to a Specific Point in Your Library" AltCText="Show/Hide CollectionSelector" AltSText="Add/Remove Star to Selected Item(s)"/>

@code{
Expand Down Expand Up @@ -492,7 +492,7 @@ else
}
else
{
foreach (Guid item in SelectedItems) //https://stackoverflow.com/a/604843
foreach (Guid item in SelectedItems)
{
C.MoveToTrash(item);
MediaList.RemoveAll(u => u.uuid == item);
Expand Down
5 changes: 2 additions & 3 deletions PSS/PSS/wwwroot/css/CollectionsMain.css
Expand Up @@ -9,9 +9,8 @@ header {
align-items: center;
position: fixed;
z-index: 999;
top: 5px;
left: 171px;
height: 56px;
left: 170px;
height: 64px;
width: 100%;
padding-bottom: 6px;
border-bottom: 1px solid gray;
Expand Down
1 change: 1 addition & 0 deletions PSS/PSS/wwwroot/css/IndexStarredNoDT.css
Expand Up @@ -13,6 +13,7 @@ header {
left: 145px;
right: 0;
z-index: 999;
height: 60px;
}

header > #buttons {
Expand Down

0 comments on commit 38e0e06

Please sign in to comment.