Special message when complete all check-in prizes

This commit is contained in:
Mateus Etto
2017-03-27 22:18:03 -03:00
parent b2225f05e5
commit 2d7e280598
4 changed files with 8 additions and 2 deletions

View File

@@ -147,6 +147,7 @@ angular.module("habitrpg").factory("Notification",
modalScope.data = rewardData; modalScope.data = rewardData;
var nextRewardKey = Shared.content.loginIncentives[user.loginIncentives].nextRewardAt; var nextRewardKey = Shared.content.loginIncentives[user.loginIncentives].nextRewardAt;
modalScope.nextReward = Shared.content.loginIncentives[nextRewardKey]; modalScope.nextReward = Shared.content.loginIncentives[nextRewardKey];
modalScope.MAX_INCENTIVES = Shared.constants.MAX_INCENTIVES;
modalScope.user = user; modalScope.user = user;
// modalScope.loadWidgets = Social.loadWidgets; // modalScope.loadWidgets = Social.loadWidgets;
modalScope.loadWidgets = loadWidgets; modalScope.loadWidgets = loadWidgets;

View File

@@ -12,5 +12,6 @@
"totalCheckinsTitle": "Total Check-Ins", "totalCheckinsTitle": "Total Check-Ins",
"checkinProgressTitle": "Progress until next", "checkinProgressTitle": "Progress until next",
"incentiveBackgroundsUnlockedWithCheckins": "These backgrounds will unlock with Daily Check-Ins.", "incentiveBackgroundsUnlockedWithCheckins": "These backgrounds will unlock with Daily Check-Ins.",
"moreIncentivesComingSoon": "New check-in incentives will be added soon!" "moreIncentivesComingSoon": "New check-in incentives will be added soon!",
"checkinReceivedAllRewardsMessage" : "You have received all the Check-In prizes currently available! More will be added in the future."
} }

View File

@@ -225,8 +225,10 @@ module.exports = function getLoginIncentives (api) {
}, },
}, },
}; };
// When the final check-in prize is added here, change {string name} in website/common/locales/en/loginIncentives.json
// to say "You have received the final Check-In prize!". Confirm the message with Lemoness first.
// Add refence link to next reward and add filler days so we have a map to refernce the next reward from any day // Add reference link to next reward and add filler days so we have a map to reference the next reward from any day
// We could also, use a list, but then we would be cloning each of the rewards. // We could also, use a list, but then we would be cloning each of the rewards.
// Create a new array if we want the loginIncentives to be immutable in the future // Create a new array if we want the loginIncentives to be immutable in the future
let nextRewardKey; let nextRewardKey;

View File

@@ -18,6 +18,8 @@ script(id='modals/login-incentives-reward-unlocked.html', type='text/ng-template
p {{env.t('earnedRewardForDevotion', {reward: data.rewardText})}} p {{env.t('earnedRewardForDevotion', {reward: data.rewardText})}}
.col-md-12.text-center(ng-show="data.nextRewardAt") .col-md-12.text-center(ng-show="data.nextRewardAt")
h4 {{env.t('nextRewardUnlocksIn', {numberOfCheckinsLeft: data.nextRewardAt - user.loginIncentives})}} h4 {{env.t('nextRewardUnlocksIn', {numberOfCheckinsLeft: data.nextRewardAt - user.loginIncentives})}}
.col-md-10.col-md-offset-1.text-center
h4(ng-if="user.loginIncentives === MAX_INCENTIVES")=env.t('checkinReceivedAllRewardsMessage')
.modal-footer .modal-footer
.row .row
a.btn.btn-primary.col-md-6.col-md-offset-3(ng-click='$close()')=env.t('awesome') a.btn.btn-primary.col-md-6.col-md-offset-3(ng-click='$close()')=env.t('awesome')