mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
feat(content): new Gold quests (#8418)
and Wintery Skins, and fixes #8412
This commit is contained in:
@@ -94,12 +94,14 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
|
||||
$scope.getProgressDisplay = function () {
|
||||
var currentLoginDay = Content.loginIncentives[$scope.profile.loginIncentives];
|
||||
var nextRewardAt = currentLoginDay.nextRewardAt;
|
||||
if (!currentLoginDay || !nextRewardAt) return env.t('moreIncentivesComingSoon');
|
||||
if (!currentLoginDay.prevRewardKey) currentLoginDay.prevRewardKey = 0;
|
||||
return ' ' + ($scope.profile.loginIncentives - currentLoginDay.prevRewardKey) + '/' + (nextRewardAt - currentLoginDay.prevRewardKey);
|
||||
return env.t('checkinProgressTitle') + ' ' + ($scope.profile.loginIncentives - currentLoginDay.prevRewardKey) + '/' + (nextRewardAt - currentLoginDay.prevRewardKey);
|
||||
};
|
||||
|
||||
$scope.incentivesProgress = function () {
|
||||
var currentLoginDay = Content.loginIncentives[$scope.profile.loginIncentives];
|
||||
if (!currentLoginDay) return 0;
|
||||
var previousRewardDay = currentLoginDay.prevRewardKey;
|
||||
var nextRewardAt = currentLoginDay.nextRewardAt;
|
||||
return ($scope.profile.loginIncentives - previousRewardDay)/(nextRewardAt - previousRewardDay) * 100;
|
||||
@@ -107,6 +109,6 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
|
||||
|
||||
$scope.achievements = Shared.achievements.getAchievementsForProfile($scope.profile);
|
||||
$scope.achievPopoverPlacement = 'right';
|
||||
$scope.achievAppendToBody = 'true'; // append-to-body breaks popovers in modal windows
|
||||
$scope.achievAppendToBody = 'true'; // append-to-body breaks popovers in modal windows
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user