mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-14 12:04:51 +00:00
Make "Not Logged In" button open Account modal & fix Account loading state ✨ (#3247)
## Description:
**TerritoryPatternsModal.ts**
- Changed the "Not Logged In" indicator from a static `div` to a
clickable `button`
- Clicking it now closes the skins modal and navigates to the Account
page via `window.showPage("page-account")`
- Added hover effect (`hover:bg-red-500/30`) for visual feedback
**AccountModal.ts**
- Fixed the inline Account modal's loading state ("Fetching account
information...") rendering without a background or header (white text on
light background 💀)
- The loading spinner is now wrapped in `modalContainerClass` (dark
glassmorphic background) with a proper `modalHeader` including the title
and back button, matching the loaded state's appearance
**SinglePlayerModal.ts**
- Changed the "Sign in for achievements" banner from a static `div` to a
clickable `button` that closes the modal and navigates to the Account
page
- Added hover effect for visual feedback
**Matchmaking.ts**
- When the "You must be logged in to play ranked matchmaking" toast
appears, the user is now also navigated to the Account page so they can
log in immediately
## Please complete the following:
- [X] I have added screenshots for all UI updates
- [X] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [X] I have added relevant tests to the test directory
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
## Please put your Discord username so you can be contacted if a bug or
regression is found:
FloPinguin
This commit is contained in:
@@ -67,7 +67,16 @@ export class AccountModal extends BaseModal {
|
||||
: this.renderInner();
|
||||
|
||||
if (this.inline) {
|
||||
return content;
|
||||
return this.isLoadingUser
|
||||
? html`<div class="${this.modalContainerClass}">
|
||||
${modalHeader({
|
||||
title: translateText("account_modal.title"),
|
||||
onBack: () => this.close(),
|
||||
ariaLabel: translateText("common.back"),
|
||||
})}
|
||||
${content}
|
||||
</div>`
|
||||
: content;
|
||||
}
|
||||
|
||||
return html`
|
||||
|
||||
Reference in New Issue
Block a user