mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:10:42 +00:00
Don't erase patterns on page load (#1383)
## Description: Even if the player does not appear to have access to a pattern, do not erase their setting. ## 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 - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors
This commit is contained in:
@@ -64,11 +64,6 @@ export class TerritoryPatternsModal extends LitElement {
|
||||
|
||||
async onUserMe(userMeResponse: UserMeResponse | null) {
|
||||
this.patterns = await patterns(userMeResponse);
|
||||
const p = this.patterns.find((p) => p.name === this.selectedPattern);
|
||||
if (p === undefined || p.lockedReason || p.notShown) {
|
||||
console.warn("selected pattern is locked or not shown, resetting");
|
||||
this.selectPattern(undefined);
|
||||
}
|
||||
this.me = userMeResponse;
|
||||
this.requestUpdate();
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
<div class="container__row">
|
||||
<flag-input class="w-[20%] md:w-[15%]"></flag-input>
|
||||
<territory-patterns-modal class="w-[50%] md:w-[12%]">
|
||||
<territory-patterns-modal class="w-[20%] md:w-[15%]">
|
||||
<button
|
||||
id="territory-patterns-input-preview-button"
|
||||
class="w-full border p-[4px] rounded-lg flex cursor-pointer border-black/30 dark:border-gray-300/60 bg-white/70 dark:bg-[rgba(55,65,81,0.7)]"
|
||||
|
||||
Reference in New Issue
Block a user