feat: add YouTube rewards (#1147)

This commit is contained in:
Sean Yesmunt 2018-03-20 13:38:50 -07:00 committed by Igor Gassmann
parent 8ad50d5165
commit 01e6c297ff
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
* Notifications when the channel a user subscribes to uploads new content ([#1066](https://github.com/lbryio/lbry-app/pull/1066)) * Notifications when the channel a user subscribes to uploads new content ([#1066](https://github.com/lbryio/lbry-app/pull/1066))
* Codacy support for Github contributions ([#1059](https://github.com/lbryio/lbry-app/pull/1059)) * Codacy support for Github contributions ([#1059](https://github.com/lbryio/lbry-app/pull/1059))
* App category for Linux ([#877](https://github.com/lbryio/lbry-app/pull/877)) * App category for Linux ([#877](https://github.com/lbryio/lbry-app/pull/877))
* Add YouTube Sync reward ([1147](https://github.com/lbryio/lbry-app/pull/1147))
### Changed ### Changed
* Improved privacy by allowing users to turn off the file view counter and better understand privacy settings ([#1074](https://github.com/lbryio/lbry-app/pull/1074)) * Improved privacy by allowing users to turn off the file view counter and better understand privacy settings ([#1074](https://github.com/lbryio/lbry-app/pull/1074))

View file

@ -13,6 +13,7 @@ function rewardMessage(type, amount) {
first_publish: __('You earned %s LBC for making your first publication.', amount), first_publish: __('You earned %s LBC for making your first publication.', amount),
featured_download: __('You earned %s LBC for watching a featured download.', amount), featured_download: __('You earned %s LBC for watching a featured download.', amount),
referral: __('You earned %s LBC for referring someone.', amount), referral: __('You earned %s LBC for referring someone.', amount),
youtube_creator: __('You earned %s LBC for syncing your YouTube channel.', amount),
}[type]; }[type];
} }
@ -27,6 +28,7 @@ rewards.TYPE_MANY_DOWNLOADS = 'many_downloads';
rewards.TYPE_FIRST_PUBLISH = 'first_publish'; rewards.TYPE_FIRST_PUBLISH = 'first_publish';
rewards.TYPE_FEATURED_DOWNLOAD = 'featured_download'; rewards.TYPE_FEATURED_DOWNLOAD = 'featured_download';
rewards.TYPE_REFERRAL = 'referral'; rewards.TYPE_REFERRAL = 'referral';
rewards.YOUTUBE_CREATOR = 'youtube_creator';
rewards.SORT_ORDER = [ rewards.SORT_ORDER = [
rewards.TYPE_NEW_USER, rewards.TYPE_NEW_USER,
rewards.TYPE_CONFIRM_EMAIL, rewards.TYPE_CONFIRM_EMAIL,
@ -37,6 +39,7 @@ rewards.SORT_ORDER = [
rewards.TYPE_MANY_DOWNLOADS, rewards.TYPE_MANY_DOWNLOADS,
rewards.TYPE_REFERRAL, rewards.TYPE_REFERRAL,
rewards.TYPE_NEW_DEVELOPER, rewards.TYPE_NEW_DEVELOPER,
rewards.YOUTUBE_CREATOR
]; ];
rewards.claimReward = type => { rewards.claimReward = type => {