Merge pull request #1892 from lbryio/publish-notification
feat: add publish success notification
This commit is contained in:
commit
dab28339cf
2 changed files with 17 additions and 1 deletions
|
@ -13,13 +13,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|||
* New viewer for human-readable text files ([#1826](https://github.com/lbryio/lbry-desktop/pull/1826))
|
||||
* CSV and JSON viewer ([#1410](https://github.com/lbryio/lbry-desktop/pull/1410))
|
||||
* Recommended content on file viewer page ([#1845](https://github.com/lbryio/lbry-desktop/pull/1845))
|
||||
* Desktop notification when publish is completed ([#1892](https://github.com/lbryio/lbry-desktop/pull/1892))
|
||||
|
||||
### Changed
|
||||
* Pass error message from spee.ch API during thumbnail upload ([#1840](https://github.com/lbryio/lbry-desktop/pull/1840))
|
||||
* Use router pattern for rendering file viewer ([#1544](https://github.com/lbryio/lbry-desktop/pull/1544))
|
||||
* Missing word "to" added to the Bid Help Text (#1854)
|
||||
* Updated to electron@2 ([#1858](https://github.com/lbryio/lbry-desktop/pull/1858))
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
|
|
|
@ -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.value.stream.metadata.title} has been published to lbry://${claim.name}. Click here to view it` ,
|
||||
silent: false,
|
||||
});
|
||||
notif.onclick = () => {
|
||||
dispatch(
|
||||
doNavigate('/show', {
|
||||
uri: claim.name,
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue