Skip to content

Commit

Permalink
Fix feedback issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SaphireLattice committed Nov 30, 2024
1 parent 1fc4f96 commit 1e5aa7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ReplayBrowser/Helpers/ReplayHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ReplayBrowser.Helpers;

public class ReplayHelper
{
static readonly string REDACTION_MESSAGE = "The account you are trying to search for is private or deleted. This might happen for various reasons as chosen by the account owner or the site administrative decision";
const string REDACTION_MESSAGE = "The account you are trying to search for is private or deleted. This might happen for various reasons as chosen by the account owner or the site administrative decision";

private readonly IMemoryCache _cache;
private readonly ReplayDbContext _context;
Expand Down Expand Up @@ -306,7 +306,7 @@ public static void CheckAccountAccess(Account? caller, Account? found)
return;

// Is there any redaction to worry about?
if (!found.Settings.RedactInformation && !found.Protected)
if (!found.Settings.RedactInformation)
return;
// Ah shit

Expand Down
1 change: 0 additions & 1 deletion ReplayBrowser/Pages/Search.razor
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@
ErrorMessage = "Invalid search query";
ErrorDetails = "No search items found";
stopWatch.Stop();
NavigationManager.NavigateTo("/");
return;
}

Expand Down
10 changes: 4 additions & 6 deletions ReplayBrowser/Pages/Shared/SearchBar.razor
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<div class="search-bar">
@{
RenderLine(null);
RenderLine(null); // Renders the prefab template so the JS code has something to hydrate later
foreach (var item in Items ?? []) {
RenderLine(item);
}
Expand Down Expand Up @@ -188,13 +188,11 @@
autocompleter._config.filter = null;
}
/** @@param {{searchMode: test}} initialValue */
/** @@param {HTMLDivElement} [searchLine] */
async function createSearchBar(searchLine) {
if (!searchLine) {
/** @@type {HTMLCollectionOf<HTMLDivElement>} */
const searchBarPrefab = document.getElementsByClassName('prefab');
/** @@type {HTMLDivElement} */
searchLine = searchBarPrefab[0].cloneNode(true);
const searchBarPrefab = document.querySelector('.search-form.prefab');
searchLine = searchBarPrefab.cloneNode(true);
searchLine.classList.remove("hidden", "prefab");
document.querySelector('.search-bar').appendChild(searchLine);
}
Expand Down

0 comments on commit 1e5aa7b

Please sign in to comment.