mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
refactor(bs3): port rebirth and reroll modals, misc fixes
This commit is contained in:
parent
211be37cfc
commit
3e077fea6d
5 changed files with 13 additions and 14 deletions
|
|
@ -55,13 +55,11 @@ habitrpg.controller('SettingsCtrl',
|
|||
|
||||
$scope.reroll = function(){
|
||||
User.user.ops.reroll({});
|
||||
$rootScope.modals.reroll = false;
|
||||
$rootScope.$state.go('tasks');
|
||||
}
|
||||
|
||||
$scope.rebirth = function(){
|
||||
User.user.ops.rebirth({});
|
||||
$rootScope.modals.rebirth = false;
|
||||
$rootScope.$state.go('tasks');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,13 +139,17 @@ angular.module('guideServices', []).
|
|||
if (User.user.achievements && User.user.achievements.beastMaster) return;
|
||||
if (before >= 90) {
|
||||
User.set({'achievements.beastMaster': true});
|
||||
$('#beastmaster-achievement-modal').modal('show'); // FIXME
|
||||
$modal.open({
|
||||
templateUrl: 'modals/achievements/beastMaster.html'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.$watch('user.flags.rebirthEnabled', function(after, before) {
|
||||
if (alreadyShown(before, after)) return;
|
||||
$rootScope.modals.rebirthEnabled = true;
|
||||
$modal.open({
|
||||
templateUrl: 'modals/rebirthEnabled.html'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
|||
| {{Content.food.Saddle.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
div
|
||||
button.customize-option(popover=env.t('fortifyPop'), popover-title=env.t('fortifyName'), popover-trigger='mouseenter', popover-placement='left', ng-click='modals.reroll = true', class='inventory_special_fortify')
|
||||
button.customize-option(popover=env.t('fortifyPop'), popover-title=env.t('fortifyName'), popover-trigger='mouseenter', popover-placement='left', ng-click='openModal("reroll")', class='inventory_special_fortify')
|
||||
p
|
||||
| 4
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
|
|
@ -133,7 +133,7 @@ script(type='text/ng-template', id='partials/options.inventory.drops.html')
|
|||
| {{Content.spells.special.snowball.value}}
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
div(ng-show='user.flags.rebirthEnabled')
|
||||
button.customize-option(popover=env.t('rebirthPop'), popover-title=env.t('rebirthName'), popover-trigger='mouseenter', popover-placement='left', ng-click='modals.rebirth = true', class='rebirth_orb')
|
||||
button.customize-option(popover=env.t('rebirthPop'), popover-title=env.t('rebirthName'), popover-trigger='mouseenter', popover-placement='left', ng-click='openModal("rebirth")', class='rebirth_orb')
|
||||
p
|
||||
| 8
|
||||
span.Pet_Currency_Gem1x.inline-gems
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Created by Sabe on 12/22/13.
|
||||
|
||||
//div(modal='modals.rebirthEnabled')
|
||||
script(type='text/ng-template', id='modals/rebirthEnabled.html')
|
||||
.modal-header
|
||||
h3=env.t('rebirthNew')
|
||||
|
|
@ -9,9 +8,8 @@ script(type='text/ng-template', id='modals/rebirthEnabled.html')
|
|||
p
|
||||
span=env.t('rebirthUnlock')
|
||||
.modal-footer
|
||||
button.btn.btn-default.cancel(ng-click='modals.rebirthEnabled = false')=env.t('close')
|
||||
button.btn.btn-default.cancel(ng-click='$close()')=env.t('close')
|
||||
|
||||
//div(modal='modals.rebirth')
|
||||
script(type='text/ng-template', id='modals/rebirth.html')
|
||||
.modal-header
|
||||
h3=env.t('rebirthBegin')
|
||||
|
|
@ -37,12 +35,12 @@ script(type='text/ng-template', id='modals/rebirth.html')
|
|||
.achievement-sun.pull-left(style='margin-right: 5px')
|
||||
p=env.t('rebirthEarnAchievement')
|
||||
.modal-footer
|
||||
button.btn.btn-large.cancel(ng-click='modals.rebirth = false')=env.t('neverMind')
|
||||
button.btn.btn-large.cancel(ng-click='$close()')=env.t('neverMind')
|
||||
span(ng-if='user.balance < 2')
|
||||
a.btn.btn-success.btn-large(ng-click='openModal("buyGems")')=env.t('buyMoreGems')
|
||||
span.gem-cost=env.t('notEnoughGems')
|
||||
span(ng-if='user.balance >= 2', ng-controller='SettingsCtrl')
|
||||
a.btn.btn-danger.btn-large(ng-click='rebirth()')=env.t('beReborn')
|
||||
a.btn.btn-danger.btn-large(ng-click='$close(); rebirth()')=env.t('beReborn')
|
||||
span.gem-cost
|
||||
| 8
|
||||
=env.t('gems')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
// Re-Roll modal
|
||||
//div(modal='modals.reroll')
|
||||
script(type='text/ng-template', id='modals/reroll.html')
|
||||
.modal-header
|
||||
h3=env.t('fortify')
|
||||
|
|
@ -8,12 +7,12 @@ script(type='text/ng-template', id='modals/reroll.html')
|
|||
p=env.t('fortifyText')
|
||||
|
||||
.modal-footer
|
||||
button.btn.btn-large.cancel(ng-click='modals.reroll = false')=env.t('neverMind')
|
||||
button.btn.btn-large.cancel(ng-click='$close()')=env.t('neverMind')
|
||||
span(ng-if='user.balance < 1')
|
||||
a.btn.btn-success.btn-large(ng-click='openModal("buyGems")')=env.t('buyMoreGems')
|
||||
span.gem-cost=env.t('notEnoughGems')
|
||||
span(ng-if='user.balance >= 1', ng-controller='SettingsCtrl')
|
||||
a.btn.btn-danger.btn-large(ng-click='reroll()')=env.t('fortify')
|
||||
a.btn.btn-danger.btn-large(ng-click='$close(); reroll()')=env.t('fortify')
|
||||
span.gem-cost
|
||||
| 4
|
||||
= env.t('gems')
|
||||
|
|
|
|||
Loading…
Reference in a new issue