feat: add publish success notification
When a file is confirmed, create a desktop notification with the claim name and ability to click the notification to view the claim
This commit is contained in:
parent
a5bc6adaff
commit
73bc6afa3e
1 changed files with 15 additions and 0 deletions
|
@ -14,6 +14,8 @@ import type {
|
|||
UpdatePublishFormAction,
|
||||
PublishParams,
|
||||
} from 'redux/reducers/publish';
|
||||
import { selectosNotificationsEnabled } from 'redux/selectors/settings';
|
||||
import { doNavigate } from 'redux/actions/navigation';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
|
@ -274,6 +276,19 @@ export const doCheckPendingPublishes = () => (dispatch: Dispatch, getState: GetS
|
|||
});
|
||||
|
||||
delete pendingPublishMap[claim.name];
|
||||
if (selectosNotificationsEnabled(getState())) {
|
||||
const notif = new window.Notification('LBRY Publish Complete', {
|
||||
body: `${claim.name} has been published successfully, click here to view it.` ,
|
||||
silent: false,
|
||||
});
|
||||
notif.onclick = () => {
|
||||
dispatch(
|
||||
doNavigate('/show', {
|
||||
uri: claim.name,
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue