fix(dashboard): fix twemoji CDN

This commit is contained in:
Jake 2023-01-15 09:24:40 +01:00
parent 4d4852caf6
commit bf3168460b
9 changed files with 20 additions and 20 deletions

View File

@ -20,7 +20,7 @@
} else htmlName = "";
$: if (settings && settings.appearance.twemoji) {
if (nameElement) twemoji.parse(nameElement);
if (nameElement) twemoji.parse(nameElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
}
$: icon_url = item.avatar_url ? item.avatar_url : item.icon ? item.icon : default_avatar;

View File

@ -35,8 +35,8 @@
let displayNameElement: any;
$: if (settings && settings.appearance.twemoji) {
if (descriptionElement) twemoji.parse(descriptionElement);
if (displayNameElement) twemoji.parse(displayNameElement);
if (descriptionElement) twemoji.parse(descriptionElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (displayNameElement) twemoji.parse(displayNameElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
};
let created = moment(group.created).format("MMM D, YYYY");

View File

@ -46,9 +46,9 @@
else htmlName = toHTML(group.name);
}
if (settings && settings.appearance.twemoji) {
if (nameElement) twemoji.parse(nameElement);
if (descElement) twemoji.parse(descElement);
if (dnElement) twemoji.parse(dnElement);
if (nameElement) twemoji.parse(nameElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (descElement) twemoji.parse(descElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (dnElement) twemoji.parse(dnElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
}
let avatarOpen = false;

View File

@ -51,7 +51,7 @@
let listGroupElements: any[] = [];
$: if (settings && settings.appearance.twemoji) {
if (listGroupElements && listGroupElements.length > 0) {
listGroupElements.forEach(element => element && twemoji.parse(element));
listGroupElements.forEach(element => element && twemoji.parse(element), { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
};
}

View File

@ -42,9 +42,9 @@
let pronounElement: any;
$: if (settings && settings.appearance.twemoji) {
if (descriptionElement) twemoji.parse(descriptionElement);
if (displayNameElement) twemoji.parse(displayNameElement);
if (pronounElement) twemoji.parse(pronounElement);
if (descriptionElement) twemoji.parse(descriptionElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (displayNameElement) twemoji.parse(displayNameElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (pronounElement) twemoji.parse(pronounElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
};
let bannerOpen = false;

View File

@ -49,10 +49,10 @@
else htmlName = toHTML(member.name);
}
if (settings && settings.appearance.twemoji) {
if (nameElement) twemoji.parse(nameElement);
if (descElement) twemoji.parse(descElement);
if (dnElement) twemoji.parse(dnElement);
if (prnsElement) twemoji.parse(prnsElement);
if (nameElement) twemoji.parse(nameElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (descElement) twemoji.parse(descElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (dnElement) twemoji.parse(dnElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (prnsElement) twemoji.parse(prnsElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
}
let avatarOpen = false;

View File

@ -52,7 +52,7 @@
let listGroupElements: any[] = [];
$: if (settings && settings.appearance.twemoji) {
if (listGroupElements && listGroupElements.length > 0) {
listGroupElements.forEach(element => element && twemoji.parse(element));
listGroupElements.forEach(element => element && twemoji.parse(element), { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
};
}

View File

@ -42,10 +42,10 @@
let pronounElement: any;
$: if (settings && settings.appearance.twemoji) {
if (descriptionElement) twemoji.parse(descriptionElement);
if (nameElement) twemoji.parse(nameElement);
if (tagElement) twemoji.parse(tagElement);
if (pronounElement) twemoji.parse(pronounElement);
if (descriptionElement) twemoji.parse(descriptionElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (nameElement) twemoji.parse(nameElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (tagElement) twemoji.parse(tagElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
if (pronounElement) twemoji.parse(pronounElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
}
</script>

View File

@ -75,7 +75,7 @@
htmlName = toHTML(user.name);
}
$: if (settings && settings.appearance.twemoji) {
if (welcomeElement) twemoji.parse(welcomeElement);
if (welcomeElement) twemoji.parse(welcomeElement, { base: 'https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/' });
}
</script>