santitize, popup class

This commit is contained in:
_Bastler
2021-10-28 19:15:02 +02:00
parent 24ac439fa1
commit 7fb13cf54b
7 changed files with 43 additions and 19 deletions
+1
View File
@@ -13,6 +13,7 @@ export const isOpenPopupEvent = new tg.IsInterface()
targetObject: tg.isString,
message: tg.isString,
buttons: tg.isArray(isButtonDescriptor),
popupClass : tg.isString,
input: tg.isBoolean
}).get();
+2 -1
View File
@@ -85,7 +85,7 @@ export class WorkAdventureUiCommands extends IframeApiContribution<WorkAdventure
}),
];
openPopup(targetObject: string, message: string, buttons: ButtonDescriptor[], input: boolean = false): Popup {
openPopup(targetObject: string, message: string, buttons: ButtonDescriptor[], popupClass : string = "", input: boolean = false): Popup {
popupId++;
const popup = new Popup(popupId);
const btnMap = new Map<number, () => void>();
@@ -113,6 +113,7 @@ export class WorkAdventureUiCommands extends IframeApiContribution<WorkAdventure
className: button.className,
};
}),
popupClass,
input
},
});