
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@startinblox/component-notifications
Advanced tools
solid-notifications is a component that displays all elements of an inbox, i.e. a notification container.
When the user clicks one of the notifications, a 'navigate' event is triggered with the object of the notification given as the resource parameter.
The component listens to 'read' events. These events details contain a resource. When such an event is triggered, it sets all notifications with that resource as read, and saves these notifications back to the container. To send an event, you can dispatch it like this:
window.dispatchEvent(new CustomEvent('read', {detail: {resource: resource}}))
In your template, insert the following line where you want to display the component.
<solid-notifications bind-user nested-field="inbox"></solid-notifications>
If you want to use the bind-user attribute, do not forget to use sib-oidc for authentication.
| Name | Default | Description |
|---|---|---|
data-src | undefined | URL of the inbox to display. |
nested-field | "" | String added at the end of the data source URL. Useful if you are using bind-user to get the current user URL. |
extra-context | {} | Context to add to let the router know where to navigate after a click on a notification. |
date-format | "DD/MM/YYYY - kk:mm" | Format of the date displayed in the notifications box. For more informations about available formats, look at the moment.js doc. |
To redirect to specific pages when you click on a notification, you should:
rdf-type to a solid-route (ex: <solid-route name="project" rdf-type="doap:project"></solid-route>)extra-context to the sib-conversation component, so it can understands the rdf_type you used before.For more informations, please see the example at index.html
You can customize the template of a notification based on its object type. To do this, use the solid-notifications-template component, and set the data-rdf-type attribute:
<solid-notifications-template
data-rdf-type="hd:circle"
>
<template>
<!-- your template -->
</template>
</solid-notifications-template>
For each notification with an object of type hd:circle, this template will be used.
The following variables are available in your template:
summary: summary of the notificationdate: formatted date of the notificationobject: Proxy of the object of the notification (needs await keyword to access its properties)author: Proxy of the author of the notification (needs await keyword to access its properties)unread: boolean which indicates if the notification is unread/readFor example, your template can look like this:
<solid-notifications-template
data-rdf-type="hd:circle"
>
<template>
<div class="solid-notification__avatar">
<img src="${await author['account.picture']}">
</div>
<div class="solid-notification__content">
<div class="solid-notification__title">${await author.name} in the circle #${await object.name}</div>
<p class="solid-notification__summary">${summary}</p>
<div class="solid-notification__date">${date}</div>
</div>
</template>
</solid-notifications-template>
The default notification template is:
<div class="solid-notification__avatar">
<img src="[author.account.picture]">
</div>
<div class="solid-notification__content">
<solid-display class="solid-notification__title">[notification.object.name]</solid-display>
<p class="solid-notification__summary">[notification.summary]</p>
<div class="solid-notification__date">[notification.date]</div>
</div>
To customize your component, you can set the css variable --solid-notifications-theme anywhere in your stylesheet to the color you want.
For example:
:root{
--solid-notifications-theme: #ffd759;
}
solid-badge is a component that displays the number of unread notifications in the inbox of the logged in user related to a resource or a container.
As it uses the bind-user, you have to make sure to include a valid sib-auth configuration.
In your template, insert the following line where you want to display the component.
<solid-badge data-src="http://server/resourceId"></solid-badge>
| Name | Default | Description |
|---|---|---|
data-src | undefined | URL of the resource or container of which you want to get the unread count. |
data-type | '' | Type of the notifications of which you want to get the unread count. |
data-rdf-type | '' | RDF type of the notification object of which you want to get the unread count. |
nested-field | "" | String added at the end of the data source URL. Useful if you are using bind-resource to get the current displayed resource. |
You can combine the data-src, data-type and data-rdf-type attributes to filter a specific kind of notification. For example, this will count the unread notification of the circle-1, for user additions:
<solid-badge data-src="http://server/circle/1" data-type="New User"></solid-badge>
To customize your component, you can set the css variable --solid-badge-theme anywhere in your stylesheet to the color you want.
For example:
:root{
--solid-badge-theme: #ffd759;
}
FAQs
Notifications component for startinblox
We found that @startinblox/component-notifications demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.