Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65b2e39af2 | ||
|
|
ba618bfe79 | ||
|
|
6b88b3ad02 | ||
|
|
4e209ac367 | ||
|
|
6be8bbf628 | ||
|
|
6a8bbd5e2f | ||
|
|
54725c7088 | ||
|
|
c21562e2b0 |
No files matched your search
@@ -17,7 +17,7 @@ export function parseTextWithEmojis(text: string): EmojiSegment[] {
|
|||||||
// Use twemoji to parse and replace emojis
|
// Use twemoji to parse and replace emojis
|
||||||
const parsed = twemoji.parse(text, {
|
const parsed = twemoji.parse(text, {
|
||||||
callback: (icon: string, options: any) => {
|
callback: (icon: string, options: any) => {
|
||||||
return `https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${icon}.png`;
|
return `https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/72x72/${icon}.png`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export function parseTextWithEmojis(text: string): EmojiSegment[] {
|
|||||||
|
|
||||||
let node;
|
let node;
|
||||||
let currentText = '';
|
let currentText = '';
|
||||||
|
|
||||||
while ((node = walker.nextNode())) {
|
while ((node = walker.nextNode())) {
|
||||||
if (node.nodeType === Node.TEXT_NODE) {
|
if (node.nodeType === Node.TEXT_NODE) {
|
||||||
if (node.textContent) {
|
if (node.textContent) {
|
||||||
@@ -45,7 +45,7 @@ export function parseTextWithEmojis(text: string): EmojiSegment[] {
|
|||||||
segments.push({ type: 'text', content: currentText });
|
segments.push({ type: 'text', content: currentText });
|
||||||
currentText = '';
|
currentText = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const img = node as HTMLImageElement;
|
const img = node as HTMLImageElement;
|
||||||
segments.push({
|
segments.push({
|
||||||
type: 'emoji',
|
type: 'emoji',
|
||||||
@@ -75,7 +75,7 @@ export function textToTwemojiHtml(text: string, className?: string): string {
|
|||||||
return twemoji.parse(text, {
|
return twemoji.parse(text, {
|
||||||
className: className || 'inline-block align-middle',
|
className: className || 'inline-block align-middle',
|
||||||
callback: (icon: string, options: any) => {
|
callback: (icon: string, options: any) => {
|
||||||
return `https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/${icon}.png`;
|
return `https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/72x72/${icon}.png`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
After Width: | Height: | Size: 21 KiB |
@@ -52,7 +52,7 @@
|
|||||||
"@types/node-fetch": "^2.6.13",
|
"@types/node-fetch": "^2.6.13",
|
||||||
"@types/pg": "^8.15.5",
|
"@types/pg": "^8.15.5",
|
||||||
"bcrypt": "^6.0.0",
|
"bcrypt": "^6.0.0",
|
||||||
"canvas": "^3.2.0",
|
"canvas": "^2.11.2",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"cloudinary": "^2.7.0",
|
"cloudinary": "^2.7.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@@ -125,4 +125,4 @@
|
|||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"bufferutil": "^4.0.8"
|
"bufferutil": "^4.0.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 551 B |
|
Before Width: | Height: | Size: 923 B |
|
Before Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 458 B |
|
Before Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 403 B |
|
Before Width: | Height: | Size: 682 B |
|
Before Width: | Height: | Size: 561 B |
|
Before Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 517 B |
|
Before Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 668 B |
|
Before Width: | Height: | Size: 670 B |
|
Before Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 747 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 989 B |
|
Before Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 723 B |
|
Before Width: | Height: | Size: 481 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 835 B |
|
Before Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 559 B |
|
Before Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 247 B |
|
Before Width: | Height: | Size: 390 B |
|
Before Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 940 B |
|
Before Width: | Height: | Size: 279 B |
|
Before Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 919 B |
|
Before Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 805 B |
|
Before Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 1000 B |
|
Before Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 669 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 706 B |
|
Before Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 389 B |
|
Before Width: | Height: | Size: 356 B |
|
Before Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 961 B |
|
Before Width: | Height: | Size: 394 B |
|
Before Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 569 B |
|
Before Width: | Height: | Size: 574 B |
|
Before Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 539 B |
|
Before Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 643 B |
|
Before Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 524 B |
|
Before Width: | Height: | Size: 454 B |
|
Before Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 688 B |
|
Before Width: | Height: | Size: 247 B |
|
Before Width: | Height: | Size: 461 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 809 B |
|
Before Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 833 B |
|
Before Width: | Height: | Size: 560 B |
|
Before Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 260 B |