Update plugins

This commit is contained in:
RobinRMC 2025-05-03 21:29:03 +02:00
parent d269d972e6
commit 0101e5133c
No known key found for this signature in database
GPG key ID: AC6D1EDC9ADED07B
2 changed files with 10 additions and 4 deletions

View file

@ -113,7 +113,14 @@ export default ErrorBoundary.wrap(function NotificationComponent({
</button>
</div>
<div>
{renderBody ? richBody ?? <p className="toastnotifications-notification-p">{body}</p> : null}
{renderBody ? (
richBody ?? (
<p className="toastnotifications-notification-p">
{body.length > 500 ? body.slice(0, 500) + "..." : body}
</p>
)
) : null}
{PluginSettings.store.renderImages && image && <img className="toastnotifications-notification-img" src={image} alt="ToastNotification Image" />}
{footer && <p className="toastnotifications-notification-footer">{`${attachments} attachment${attachments > 1 ? "s" : ""} ${attachments > 1 ? "were" : "was"} sent.`}</p>}
</div>

View file

@ -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 (
<>
<div {...props}>{props.children}</div>
<div className={classes(cl("spectators_panel"), Margins.top8)} style={{ marginLeft: 8 }}>
<div className={classes(cl("spectators_panel"), Margins.top8)}>
<Forms.FormTitle tag="h3" style={{ marginTop: 8, marginBottom: 0, textTransform: "uppercase" }}>
{getIntlMessage("SPECTATORS", { numViewers: userIds.length })}
</Forms.FormTitle>