This commit is contained in:
Renan LE CARO 2025-04-07 14:08:48 +02:00
parent 9624c5b351
commit e78021ff83
24 changed files with 840 additions and 437 deletions

View file

@ -43,7 +43,7 @@ export async function asyncAlert<t>({
content: (string | AsyncAlertAction<t>)[];
allowClose?: boolean;
className?: string;
}): Promise<t | void|string> {
}): Promise<t | void> {
updateAlertsOpen(+1);
return new Promise((resolve) => {
popupWrap.className = className;
@ -139,11 +139,16 @@ ${icon}
addto.appendChild(button);
});
popup.addEventListener('click', e=>{
if(e.target.getAttribute('data-resolve-to')){
closeWithResult(e.target.getAttribute('data-resolve-to'))
popup.addEventListener(
"click",
(e) => {
const target = e.target as HTMLElement;
if (target.getAttribute("data-resolve-to")) {
closeWithResult(target.getAttribute("data-resolve-to") as t);
}
},true)
},
true,
);
popupWrap.appendChild(popup);
(
popupWrap.querySelector(