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> </button>
</div> </div>
<div> <div>
{renderBody ? ( {renderBody && (
richBody ?? ( <p className="toastnotifications-notification-p">
<p className="toastnotifications-notification-p"> {(richBody ?? body).toString().slice(0, 500)}
{body.length > 500 ? body.slice(0, 500) + "..." : body} {(richBody ?? body).toString().length > 500 && "..."}
</p> </p>
) )}
) : null}
{PluginSettings.store.renderImages && image && <img className="toastnotifications-notification-img" src={image} alt="ToastNotification Image" />} {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>} {footer && <p className="toastnotifications-notification-footer">{`${attachments} attachment${attachments > 1 ? "s" : ""} ${attachments > 1 ? "were" : "was"} sent.`}</p>}
</div> </div>
@ -139,7 +137,7 @@ export default ErrorBoundary.wrap(function NotificationComponent({
{AppearanceSettings.timeout !== 0 && !permanent && ( {AppearanceSettings.timeout !== 0 && !permanent && (
<div <div
className="toastnotifications-notification-progressbar" className="toastnotifications-notification-progressbar"
style={{ width: `${(1 - timeoutProgress) * 100}%`, backgroundColor: "var(--brand-experiment)" }} style={{ width: `${(1 - timeoutProgress) * 100}%`, backgroundColor: "var(--toastnotifications-progressbar-color)" }}
/> />
)} )}
</button> </button>

View file

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