From 2d7e280598d7c73131f51aec30d4fe2cc4a5ecb0 Mon Sep 17 00:00:00 2001 From: Mateus Etto Date: Mon, 27 Mar 2017 22:18:03 -0300 Subject: [PATCH] Special message when complete all check-in prizes --- website/client-old/js/services/notificationServices.js | 1 + website/common/locales/en/loginIncentives.json | 3 ++- website/common/script/content/loginIncentives.js | 4 +++- .../views/shared/modals/login-incentives-reward-unlocked.jade | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/website/client-old/js/services/notificationServices.js b/website/client-old/js/services/notificationServices.js index edb08cd4cc..7e380e36fa 100644 --- a/website/client-old/js/services/notificationServices.js +++ b/website/client-old/js/services/notificationServices.js @@ -147,6 +147,7 @@ angular.module("habitrpg").factory("Notification", modalScope.data = rewardData; var nextRewardKey = Shared.content.loginIncentives[user.loginIncentives].nextRewardAt; modalScope.nextReward = Shared.content.loginIncentives[nextRewardKey]; + modalScope.MAX_INCENTIVES = Shared.constants.MAX_INCENTIVES; modalScope.user = user; // modalScope.loadWidgets = Social.loadWidgets; modalScope.loadWidgets = loadWidgets; diff --git a/website/common/locales/en/loginIncentives.json b/website/common/locales/en/loginIncentives.json index 385704ec4c..3297292562 100644 --- a/website/common/locales/en/loginIncentives.json +++ b/website/common/locales/en/loginIncentives.json @@ -12,5 +12,6 @@ "totalCheckinsTitle": "Total Check-Ins", "checkinProgressTitle": "Progress until next", "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." } diff --git a/website/common/script/content/loginIncentives.js b/website/common/script/content/loginIncentives.js index 10bd714174..e7f12e85c8 100644 --- a/website/common/script/content/loginIncentives.js +++ b/website/common/script/content/loginIncentives.js @@ -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. // Create a new array if we want the loginIncentives to be immutable in the future let nextRewardKey; diff --git a/website/views/shared/modals/login-incentives-reward-unlocked.jade b/website/views/shared/modals/login-incentives-reward-unlocked.jade index 91986aa96d..a1a7ac1462 100644 --- a/website/views/shared/modals/login-incentives-reward-unlocked.jade +++ b/website/views/shared/modals/login-incentives-reward-unlocked.jade @@ -18,6 +18,8 @@ script(id='modals/login-incentives-reward-unlocked.html', type='text/ng-template p {{env.t('earnedRewardForDevotion', {reward: data.rewardText})}} .col-md-12.text-center(ng-show="data.nextRewardAt") 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 .row a.btn.btn-primary.col-md-6.col-md-offset-3(ng-click='$close()')=env.t('awesome')