feat(sharing): Opt Out WIP

First draft of support for opting out of future modal display on specific events, and adds the second barebones target page for sharing.
This commit is contained in:
Sabe Jones
2015-10-28 16:36:47 -04:00
parent 27e3797307
commit f4ea6c1d5d
10 changed files with 97 additions and 17 deletions

View File

@@ -112,8 +112,10 @@ habitrpg.controller("InventoryCtrl",
var potName = Content.hatchingPotions[potion.key].text();
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
$rootScope.hatchedPet = {egg: eggName, potion: potName, pet: 'Pet-' + egg.key + '-' + potion.key};
$rootScope.openModal('hatchPet', {controller: 'InventoryCtrl', size: 'sm'});
if (!user.preferences.suppressModals.hatchPet) {
$rootScope.hatchedPet = {egg: eggName, potion: potName, pet: 'Pet-' + egg.key + '-' + potion.key};
$rootScope.openModal('hatchPet', {controller: 'InventoryCtrl', size: 'sm'});
}
$scope.selectedEgg = null;
$scope.selectedPotion = null;