mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
committed by
Blade Barringer
parent
7ea9debe3f
commit
db19dbf49c
@@ -48,6 +48,8 @@
|
|||||||
"leaveQuest": "Leave Quest",
|
"leaveQuest": "Leave Quest",
|
||||||
"sureLeave": "Are you sure you want to leave the active quest? All your quest progress will be lost.",
|
"sureLeave": "Are you sure you want to leave the active quest? All your quest progress will be lost.",
|
||||||
"questOwner": "Quest Owner",
|
"questOwner": "Quest Owner",
|
||||||
|
"questTaskDamage": "+<%= damage %> pending damage to boss",
|
||||||
|
"questTaskCollection": "<%= items %> items collected today",
|
||||||
"questOwnerNotInPendingQuest": "The quest owner has left the quest and can no longer begin it. It is recommended that you cancel it now. The quest owner will retain possession of the quest scroll.",
|
"questOwnerNotInPendingQuest": "The quest owner has left the quest and can no longer begin it. It is recommended that you cancel it now. The quest owner will retain possession of the quest scroll.",
|
||||||
"questOwnerNotInRunningQuest": "The quest owner has left the quest. You can abort the quest if you need to. You can also allow it to keep running and all remaining participants will receive the quest rewards when the quest finishes.",
|
"questOwnerNotInRunningQuest": "The quest owner has left the quest. You can abort the quest if you need to. You can also allow it to keep running and all remaining participants will receive the quest rewards when the quest finishes.",
|
||||||
"questOwnerNotInPendingQuestParty": "The quest owner has left the party and can no longer begin the quest. It is recommended that you cancel it now. The quest scroll will be returned to the quest owner.",
|
"questOwnerNotInPendingQuestParty": "The quest owner has left the party and can no longer begin the quest. It is recommended that you cancel it now. The quest scroll will be returned to the quest owner.",
|
||||||
|
|||||||
@@ -26,6 +26,33 @@ angular.module('habitrpg')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.hasQuestProgress = function() {
|
||||||
|
var user = $scope.user;
|
||||||
|
if (user.party.quest) {
|
||||||
|
var userQuest = $scope.Content.quests[user.party.quest.key];
|
||||||
|
if (userQuest && userQuest.boss && user.party.quest.progress.up > 0) return true;
|
||||||
|
if (userQuest && userQuest.collect && user.party.quest.progress.collectedItems > 0) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.getQuestInfo = function() {
|
||||||
|
var user = $scope.user;
|
||||||
|
var questInfo = {};
|
||||||
|
if (user.party.quest) {
|
||||||
|
var userQuest = $scope.Content.quests[user.party.quest.key];
|
||||||
|
if (userQuest.boss) {
|
||||||
|
questInfo.title = userQuest.boss.name();
|
||||||
|
questInfo.body = window.env.t('questTaskDamage', { damage: user.party.quest.progress.up.toPrecision(2) });
|
||||||
|
}
|
||||||
|
else if (userQuest.collect) {
|
||||||
|
questInfo.title = userQuest.collect.text();
|
||||||
|
questInfo.body = window.env.t('questTaskCollection', { items: user.party.quest.progress.collectedItems });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return questInfo;
|
||||||
|
};
|
||||||
|
|
||||||
$scope.clearMessages = Chat.markChatSeen;
|
$scope.clearMessages = Chat.markChatSeen;
|
||||||
$scope.clearCards = Chat.clearCards;
|
$scope.clearCards = Chat.clearCards;
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,9 @@ nav.toolbar(ng-controller='MenuCtrl')
|
|||||||
li.toolbar-subscribe-button
|
li.toolbar-subscribe-button
|
||||||
button.highlight(ui-sref='options.settings.subscription',popover-trigger='mouseenter',popover-placement='bottom',popover-title=env.t('subscriptions'),popover=env.t('subDescription'),popover-append-to-body='true')=env.t('subscribe')
|
button.highlight(ui-sref='options.settings.subscription',popover-trigger='mouseenter',popover-placement='bottom',popover-title=env.t('subscriptions'),popover=env.t('subDescription'),popover-append-to-body='true')=env.t('subscribe')
|
||||||
ul.toolbar-options
|
ul.toolbar-options
|
||||||
|
li.toolbar-quest-detail(ng-if='hasQuestProgress()')
|
||||||
|
a(ng-click='$state.go("options.social.party");', popover-placement='bottom',popover-trigger='mouseenter',popover-title='{{getQuestInfo().title}}', popover='{{getQuestInfo().body}}',popover-append-to-body='true')
|
||||||
|
span.glyphicon.glyphicon-screenshot
|
||||||
li.toolbar-notifs
|
li.toolbar-notifs
|
||||||
a(data-expand-menu, menu='notifs')
|
a(data-expand-menu, menu='notifs')
|
||||||
span.glyphicon(ng-class='iconClasses()')
|
span.glyphicon(ng-class='iconClasses()')
|
||||||
|
|||||||
Reference in New Issue
Block a user