Add notification in renderer if lens protocol handler fails to find any routes (#2787)

- Add notifications on missing lens:// handlers, and invalid URIs

- add notifications on unknown entity IDs

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-06-01 08:28:38 -04:00
1 parent 36e8888ecb
commit 5fd2d5501c
8 files changed
+273 -130

No files matched your search

@@ -37,7 +37,7 @@ export class Notifications extends React.Component {
static ok(message: NotificationMessage) {
notificationsStore.add({
message,
timeout: 2500,
timeout: 2_500,
status: NotificationStatus.OK
});
}
@@ -45,12 +45,19 @@ export class Notifications extends React.Component {
static error(message: NotificationMessage, customOpts: Partial<Notification> = {}) {
notificationsStore.add({
message,
timeout: 10000,
timeout: 10_000,
status: NotificationStatus.ERROR,
...customOpts
});
}
static shortInfo(message: NotificationMessage, customOpts: Partial<Notification> = {}) {
this.info(message, {
timeout: 5_000,
...customOpts
});
}
static info(message: NotificationMessage, customOpts: Partial<Notification> = {}) {
return notificationsStore.add({
status: NotificationStatus.INFO,