mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-31 19:20:25 +00:00
initial inventory
This commit is contained in:
parent
53fdca2f5c
commit
a5e8817c85
3 changed files with 20 additions and 11 deletions
|
|
@ -22,4 +22,5 @@
|
|||
//= require controllers/userAvatarCtrl
|
||||
//= require controllers/groupsCtrl
|
||||
//= require controllers/petsCtrl
|
||||
//= require controllers/inventoryCtrl
|
||||
//= require controllers/footerCtrl
|
||||
8
assets/js/controllers/inventoryCtrl.js
Normal file
8
assets/js/controllers/inventoryCtrl.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
habitrpg.controller("InventoryCtrl", ['$scope', 'User',
|
||||
function($scope, User) {
|
||||
|
||||
$scope.hatching = false;
|
||||
$scope.userEggs = User.user.items.eggs;
|
||||
$scope.userHatchingPotions = User.user.items.hatchingPotions;
|
||||
|
||||
}]);
|
||||
|
|
@ -1,22 +1,22 @@
|
|||
.row-fluid
|
||||
div(ng-class='{span6: _hatchEgg}')
|
||||
.row-fluid(ng-controller='InventoryCtrl')
|
||||
div(ng-class='{span6: hatching}')
|
||||
menu.inventory-list(type='list')
|
||||
li.customize-menu
|
||||
menu.pets-menu(label='Eggs')
|
||||
p(ng-show='!user.items.eggs') You don't have any eggs yet.
|
||||
div(ng-repeat='egg in user.items.eggs track by $index')
|
||||
button.customize-option(tooltip='{{egg.text}}', x-bind='click: chooseEgg', class='Pet_Egg_{{egg.name}}')
|
||||
p(ng-show='userEggs.length < 1') You don't have any eggs yet.
|
||||
div(ng-repeat='egg in userEggs track by $index')
|
||||
button.customize-option(tooltip='{{egg.text}}', ng-click='chooseEgg(egg)', class='Pet_Egg_{{egg.name}}')
|
||||
p {{egg.text}}
|
||||
li.customize-menu
|
||||
menu.hatchingPotion-menu(label='Hatching Potions')
|
||||
p(ng-show='!user.items.hatchingPotions') You don't have any hatching potions yet.
|
||||
div(ng-repeat='hatchingPotion in user.items.hatchingPotions track by $index')
|
||||
button.customize-option(tooltip='{{hatchingPotion}}', x-bind='click: chooseHatching Potion', class='Pet_HatchingPotion_{{hatchingPotion}}')
|
||||
p(ng-show='userHatchingPotions.length < 1') You don't have any hatching potions yet.
|
||||
div(ng-repeat='hatchingPotion in userHatchingPotions track by $index')
|
||||
button.customize-option(tooltip='{{hatchingPotion}}', ng-click='chooseHatching(hatchingPotion)', class='Pet_HatchingPotion_{{hatchingPotion}}')
|
||||
p {{hatchingPotion}}
|
||||
.span6(ng-show='_hatchEgg')
|
||||
.span6(ng-show='hatching')
|
||||
h3 Hatch Your Egg
|
||||
p(ng-show='!user.items.hatchingPotions') You don't have any hatching potions yet.
|
||||
div(ng-show='user.items.hatchingPotions')
|
||||
p(ng-show='userHatchingPotions.length < 1') You don't have any hatching potions yet.
|
||||
div(ng-show='userHatchingPotions')
|
||||
p Which hatching potion will you pour on your {{_hatchEgg.text}} egg?
|
||||
form(x-bind='submit:hatchEgg')
|
||||
select
|
||||
|
|
|
|||
Loading…
Reference in a new issue