From 0101e5133cb7a794a33a783513dc04ef014eea3f Mon Sep 17 00:00:00 2001 From: RobinRMC Date: Sat, 3 May 2025 21:29:03 +0200 Subject: [PATCH] Update plugins --- .../components/NotificationComponent.tsx | 9 ++++++++- src/plusplugins/whosWatching/index.tsx | 5 ++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plusplugins/ToastNotifications/components/NotificationComponent.tsx b/src/plusplugins/ToastNotifications/components/NotificationComponent.tsx index ee4b080e..fb8ab93e 100644 --- a/src/plusplugins/ToastNotifications/components/NotificationComponent.tsx +++ b/src/plusplugins/ToastNotifications/components/NotificationComponent.tsx @@ -113,7 +113,14 @@ export default ErrorBoundary.wrap(function NotificationComponent({
- {renderBody ? richBody ??

{body}

: null} + {renderBody ? ( + richBody ?? ( +

+ {body.length > 500 ? body.slice(0, 500) + "..." : body} +

+ ) + ) : null} + {PluginSettings.store.renderImages && image && ToastNotification Image} {footer &&

{`${attachments} attachment${attachments > 1 ? "s" : ""} ${attachments > 1 ? "were" : "was"} sent.`}

}
diff --git a/src/plusplugins/whosWatching/index.tsx b/src/plusplugins/whosWatching/index.tsx index bee56590..a4ddabd7 100644 --- a/src/plusplugins/whosWatching/index.tsx +++ b/src/plusplugins/whosWatching/index.tsx @@ -82,10 +82,9 @@ export default definePlugin({ } }, { - predicate: () => settings.store.showPanel, find: "this.renderEmbeddedActivity()", replacement: { - match: /(?<=children.{0,50})"div"(?=.{0,500}this\.renderEmbeddedActivity\(\))/, + match: /(?<=render\(\).{0,500}children.{0,50})"div"(?=.{0,500}this\.renderEmbeddedActivity\(\))/, replace: "$self.WrapperComponent" } } @@ -118,7 +117,7 @@ export default definePlugin({ return ( <>
{props.children}
-
+
{getIntlMessage("SPECTATORS", { numViewers: userIds.length })}