Skip to content

Commit

Permalink
Revert #16 (caused some weird issues)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simyon264 committed Aug 18, 2024
1 parent dd2a3f8 commit 6464d3b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions ReplayBrowser/Pages/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
if (dismissed)
continue;
var markupString = new MarkupString(activeNotice.Message);

<div class="alert alert-info" role="alert">
<h4 class="alert-heading">@activeNotice.Title</h4>
<p>@markupString</p>
Expand All @@ -74,18 +74,18 @@
<p>Your account is set as protected. Your redaction settings were automatically set to true, in order to prevent harassment or similar. Contact the site operator to remove your protection status.</p>
</div>
}

<p id="logged-in-text">Hello <strong>@_user.Claims.Single(c => c.Type == "name").Value!</strong></p>

<a href="/account/logout" class="btn btn-primary" style="margin-right: 10px">Logout</a>
<a href="/account/manage" class="btn btn-primary" style="margin-right: 10px">Manage</a>
<a href="/favourites" class="btn btn-primary" style="margin-right: 10px">Favourites</a>
<a href="/favorites/profiles" class="btn btn-primary" style="margin-right: 10px">Watched profiles</a>
<a class="btn btn-primary" onclick="window.location.href = '/account/manage';" style="margin-right: 10px">Manage</a>
<a class="btn btn-primary" onclick="window.location.href = '/favourites';" style="margin-right: 10px">Favourites</a>
<a class="btn btn-primary" onclick="window.location.href = '/favorites/profiles';" style="margin-right: 10px">Watched profiles</a>

@if (_account?.IsAdmin ?? false)
{
<a href="/favourites" class="btn btn-primary" style="margin-right: 10px">Admin</a>
<a href="/favourites" class="btn btn-primary" style="margin-right: 10px">Manage notices</a>
<a class="btn btn-primary" onclick="window.location.href = '/account/admin';" style="margin-right: 10px">Admin</a>
<a class="btn btn-primary" onclick="window.location.href = '/account/admin/notices';" style="margin-right: 10px">Manage notices</a>
}
}
else
Expand All @@ -94,10 +94,10 @@
}

<br/>
<a href="/" class="btn btn-primary" style="margin-right: 10px; margin-top: 10px">Main page</a>
<a href="/leaderboard" class="btn btn-primary" style="margin-right: 10px; margin-top: 10px">Leaderboard</a>
<a href="/downloads" class="btn btn-primary" style="margin-right: 10px; margin-top: 10px">Current downloads</a>
<a href="/changelog" class="btn btn-primary" style="margin-right: 10px; margin-top: 10px">Changelog</a>
<a class="btn btn-primary" onclick="window.location.href = '/leaderboard'" style="margin-right: 10px; margin-top: 10px">Leaderboard</a>
<a class="btn btn-primary" onclick="window.location.href = '/'" style="margin-right: 10px; margin-top: 10px">Main page</a>
<a class="btn btn-primary" onclick="window.location.href = '/downloads'" style="margin-right: 10px; margin-top: 10px">Current downloads</a>
<a class="btn btn-primary" onclick="window.location.href = '/changelog'" style="margin-right: 10px; margin-top: 10px">Changelog</a>

<p>Warning: Replays recorded before @ReplayParserService.CutOffDateTime.ToLocalTime().ToString("yyyy-MM-dd") (yyyy-MM-dd) are not supported and are not counted</p>

Expand All @@ -110,7 +110,7 @@
<div class="container">
<p>Replay Browser is a project by Simyon and YuNii. Source code available on <a href="https://github.com/Simyon264/ReplayBrowser">GitHub</a>.</p>
</div>

<div class="container">
<p><a href="/contact">Contact</a> | <a href="/privacy">Privacy Policy</a></p>
</div>
Expand All @@ -119,12 +119,12 @@
<script>
const modalRoot = document.getElementById('modal-root');
const pageRoot = document.querySelector('.page');
const modals = document.querySelectorAll('.modal');
modals.forEach(modal => {
modalRoot.appendChild(modal);
});
const observer = new MutationObserver(function(mutations) {
const modals = document.querySelectorAll('.modal');
modals.forEach(modal => {
Expand All @@ -139,7 +139,7 @@
window.location.href = '/account/login'; // horrible code
return;
}
fetch(`/api/replay/favourite/${replayId}`, {
method: 'POST',
headers: {
Expand All @@ -150,7 +150,7 @@
// the response is just a boolean, true if its now favourited, false if its not
response.json().then(isFavourited => {
let button = $(`#favorite-button-${replayId}`)
// we can just get the first child because the button only has one child
// either <i class="fas fa-star"></i> or <i class="far fa-star"></i>
let icon = button.children().first();
Expand Down

0 comments on commit 6464d3b

Please sign in to comment.