replace leave lobby popup with custom popup (#4449)

## Description:
old:
<img width="1009" height="491" alt="image"
src="https://github.com/user-attachments/assets/0b95877c-dac7-4025-bdfa-62ab6879d208"
/>

new:
<img width="1017" height="561" alt="image"
src="https://github.com/user-attachments/assets/cfb49b31-eb46-4d64-bd9e-3f25bb7cd0fb"
/>




## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

w.o.n
This commit is contained in:
Ryan
2026-06-29 16:16:46 -07:00
committed by GitHub
parent e196d399b4
commit dae129c6a3
5 changed files with 81 additions and 20 deletions
+5 -7
View File
@@ -531,11 +531,9 @@ export class HostLobbyModal extends BaseModal {
// Clear clipboard so the host doesn't accidentally share a dead link
void navigator.clipboard.writeText("").catch(() => {});
});
if (this.modalEl) {
this.modalEl.onClose = () => {
this.close();
};
}
// BaseModal.firstUpdated() owns modalEl.onClose so the o-modal close path
// (backdrop / close button) runs confirmBeforeClose(). Don't override it
// here — doing so would bypass the leave-lobby confirmation.
this.loadNationCount();
}
@@ -552,8 +550,8 @@ export class HostLobbyModal extends BaseModal {
);
}
public confirmBeforeClose(): boolean {
return confirm(translateText("host_modal.leave_confirmation"));
public confirmBeforeClose(): boolean | Promise<boolean> {
return this.confirmClose(translateText("host_modal.leave_confirmation"));
}
protected onClose(): void {