From 7353d785fbe6bdad3d6dc121d4788cd1d2a0654f Mon Sep 17 00:00:00 2001 From: Ryan <7389646+ryanbarlow97@users.noreply.github.com> Date: Tue, 13 Jan 2026 05:03:02 +0000 Subject: [PATCH] Created ModalHeader and moved/unified all modal headers (#2882) If this PR fixes an issue, link it below. If not, delete these two lines. Resolves #(issue number) ## Description: Moved the Modal Headers into its own class ## 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: w.o.n --- src/client/AccountModal.ts | 41 +---- src/client/FlagInputModal.ts | 59 +++---- src/client/HelpModal.ts | 37 +---- src/client/HostLobbyModal.ts | 208 +++++++++++------------- src/client/JoinPrivateLobbyModal.ts | 208 +++++++++++------------- src/client/LanguageModal.ts | 48 +----- src/client/Matchmaking.ts | 37 +---- src/client/NewsModal.ts | 39 +---- src/client/SinglePlayerModal.ts | 40 +---- src/client/StatsModal.ts | 40 ++--- src/client/TerritoryPatternsModal.ts | 71 +++----- src/client/UserSettingModal.ts | 42 ++--- src/client/components/ui/ModalHeader.ts | 80 +++++++++ 13 files changed, 368 insertions(+), 582 deletions(-) create mode 100644 src/client/components/ui/ModalHeader.ts diff --git a/src/client/AccountModal.ts b/src/client/AccountModal.ts index 2e9781cce..06fe524cf 100644 --- a/src/client/AccountModal.ts +++ b/src/client/AccountModal.ts @@ -14,6 +14,7 @@ import "./components/baseComponents/stats/PlayerStatsTree"; import { BaseModal } from "./components/BaseModal"; import "./components/Difficulties"; import "./components/PatternButton"; +import { modalHeader } from "./components/ui/ModalHeader"; import { copyToClipboard, translateText } from "./Utils"; @customElement("account-modal") @@ -109,37 +110,11 @@ export class AccountModal extends BaseModal {