Base64 notification images

This commit is contained in:
Natsumi
2021-09-03 16:51:16 +12:00
parent a19c90623f
commit babc6e21f7
5 changed files with 90 additions and 84 deletions

View File

@@ -318,11 +318,11 @@ speechSynthesis.getVoices();
};
$app.methods.playNoty = function (json) {
var {noty, message, imageUrl} = JSON.parse(json);
var {noty, message, image} = JSON.parse(json);
var text = '';
var img = '';
if (imageUrl) {
img = `<img class="noty-img" src="${imageUrl}"></img>`;
if (image) {
img = `<img class="noty-img" src="data:image/png;base64, ${image}"></img>`;
}
switch (noty.type) {
case 'OnPlayerJoined':