ToastNotifications Updates
Some checks are pending
Test / Test (push) Waiting to run

This commit is contained in:
thororen1234 2025-05-09 18:20:46 -04:00
parent 90eaf70291
commit df6b6a0766
No known key found for this signature in database
2 changed files with 8 additions and 9 deletions

View file

@ -123,14 +123,12 @@ export default ErrorBoundary.wrap(function NotificationComponent({
</button>
</div>
<div>
{renderBody ? (
richBody ?? (
<p className="toastnotifications-notification-p">
{body.length > 500 ? body.slice(0, 500) + "..." : body}
</p>
)
) : null}
{renderBody && (
<p className="toastnotifications-notification-p">
{(richBody ?? body).toString().slice(0, 500)}
{(richBody ?? body).toString().length > 500 && "..."}
</p>
)}
{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>
@ -139,7 +137,7 @@ export default ErrorBoundary.wrap(function NotificationComponent({
{AppearanceSettings.timeout !== 0 && !permanent && (
<div
className="toastnotifications-notification-progressbar"
style={{ width: `${(1 - timeoutProgress) * 100}%`, backgroundColor: "var(--brand-experiment)" }}
style={{ width: `${(1 - timeoutProgress) * 100}%`, backgroundColor: "var(--toastnotifications-progressbar-color)" }}
/>
)}
</button>

View file

@ -25,6 +25,7 @@
/* Progress Bar */
--toastnotifications-progressbar-height: 0.25rem;
--toastnotifications-progressbar-color: var(--brand-500);
/* Position Offset - Global inherited offset by all positions */
--toastnotifications-position-offset: 1rem;