diff --git a/assets/css/game-pane.styl b/assets/css/game-pane.styl index 138b7f9c11..134e0ab345 100644 --- a/assets/css/game-pane.styl +++ b/assets/css/game-pane.styl @@ -4,9 +4,6 @@ .border-right border-right 1px solid #ddd -.game-tabs a - cursor pointer - .tab-notification color #fff background-color #51a351 diff --git a/assets/js/controllers/rootCtrl.js b/assets/js/controllers/rootCtrl.js index 20db696454..31a8776ed7 100644 --- a/assets/js/controllers/rootCtrl.js +++ b/assets/js/controllers/rootCtrl.js @@ -20,9 +20,9 @@ habitrpg.controller("RootCtrl", function($scope, $rootScope, $location, User) { Very simple path-set. `set('preferences.gender','m')` for example. We'll deprecate this once we have a complete API */ $rootScope.set = function(k, v) { - var log = { op: 'set' }; - window.helpers.dotSet(k, v, User.user); - log[k] = v; + var log = { op: 'set', data: {} }; + window.habitrpgShared.helpers.dotSet(k, v, User.user); + log.data[k] = v; User.log(log); }; diff --git a/views/options/achievements.html b/views/options/achievements.html new file mode 100644 index 0000000000..c93e2f01e5 --- /dev/null +++ b/views/options/achievements.html @@ -0,0 +1,77 @@ + +
+ + + + + + + + + + + + + + + +
{{@profile.backer.npc}} NPC
+ Backed the Kickstarter project at the maximum level! +
+ + +
+ {{#if @profile.backer.contributor}} + {{@profile.backer.contributor}} + {{else}} + Contributor + {{/}} +
+ Has contributed to HabitRPG (code, design, pixel art, legal advice, docs, etc). Want this badge? Fix a bug :) +
+ + +
Kickstarter Backer - ${{@profile.backer.tier}} Tier
+ Backed the Kickstarter Project +
+ + +
{#if @profile.achievements.streak}{@profile.achievements.streak}{else}0{/} Streak Achievement(s)
+ Has performed {#if @profile.achievements.streak}{@profile.achievements.streak}{else}0{/} 21-day streaks on Dailies +
+ + +
Original User
+ Goes way back to the Habit's days of yore (bless them for soldiering through bugs!) +
+ + +
Ultimate Gear
+ Has upgraded to the maximum weapon and armor set +
+ + +
Beast Master
+ Has found all 90 pets (insanely difficult, give this user props!) +
+ + +
Helped Habit Grow
+ Has helped HabitRPG grow by filling out this survey. +
+ +
+ + + {#if @unlocked} +
{@content} +
+ {else if @unlockable} + {{#if equal(_user.id,@profile.id)}} + + {@content} + +
+ {{/}} + {/} + diff --git a/views/options/index-old.html b/views/options/index-old.html deleted file mode 100644 index 48b87e4cf9..0000000000 --- a/views/options/index-old.html +++ /dev/null @@ -1,131 +0,0 @@ - -
- - - - - - - -
- -
-
-
- -
-
- -
-
- -
-
-
- -
- -
- -
- -
- -
-
-
-

Inventory

- -
-
-

Market

- -
-
-
- -
- -
- -
- -
- -
- -
- -
- -
-
- -
- - - - -
- - - -
-
-
-

Alexander Augustin

-
Welcome to the Market! I'm the merchant, Alexander. Dying to get that particular pet you're after, but don't want to wait for it to drop? Buy it here!
-
-
- -

Eggs

- {#with _items.pets as :egg} - - - {#with :egg[0]}{/} - {#with :egg[1]}{/} - {#with :egg[2]}{/} - {#with :egg[3]}{/} - - - {#with :egg[4]}{/} - {#with :egg[5]}{/} - {#with :egg[6]}{/} - {#with :egg[7]}{/} - - - {#with :egg[8]}{/} - -
- {/} -

Hatching Potions

- {#with _items.hatchingPotions as :hatchingPotion} - - - {#with :hatchingPotion[0]}{/} - {#with :hatchingPotion[1]}{/} - {#with :hatchingPotion[2]}{/} - {#with :hatchingPotion[3]}{/} - - - {#with :hatchingPotion[4]}{/} - {#with :hatchingPotion[5]}{/} - {#with :hatchingPotion[6]}{/} - {#with :hatchingPotion[7]}{/} - - - {#with :hatchingPotion[8]}{/} - {#with :hatchingPotion[9]}{/} - -
- {/} -
diff --git a/views/options/index.jade b/views/options/index.jade index ceddd31253..b1112b03c6 100644 --- a/views/options/index.jade +++ b/views/options/index.jade @@ -1,50 +1,24 @@ .module.full-width span.option-box.pull-right.wallet app:rewards:user-gems - ul.nav.nav-tabs.game-tabs - li.active - a(data-toggle='tab', data-target='#profile-customize') + + tabset + tab + tab-heading i.icon-user | Profile - li - a#party-tab-link(data-toggle='tab', data-target='#profile-groups') + include ./profile + + tab + tab-heading i.icon-heart | Groups - li(ng-show='user.flags.dropsEnabled') - a(data-toggle='tab', data-target='#profile-inventory') + app:groups:groups-pane + + tab(ng-show='user.flags.dropsEnabled') + tab-heading i.icon-gift | Inventory - li(ng-show='user.flags.dropsEnabled') - a(data-toggle='tab', data-target='#profile-stable') - i.icon-leaf - | Stable - li - a(data-toggle='tab', data-target='#profile-tavern') - i.icon-eye-close - | Tavern - li - a(data-toggle='tab', data-target='#profile-achievements') - i.icon-certificate - | Achievements - //
  • Challenges
  • - li - a(data-toggle='tab', data-target='#profile-settings') - i.icon-wrench - | Settings - .tab-content - #profile-customize.tab-pane.active - .row-fluid - .span4.border-right - app:avatar:customize - .span4.border-right - app:avatar:profile-stats(profile='{_user}') - .span4 - app:avatar:profile-edit - #profile-groups.tab-pane - app:groups:groups-pane - #profile-achievements.tab-pane - app:avatar:achievements(profile='{{_user}}') - #profile-inventory.tab-pane .row-fluid .span6.border-right h2 Inventory @@ -52,11 +26,30 @@ .span6 h2 Market app:game-pane:market - #profile-stable.tab-pane + + tab(ng-show='user.flags.dropsEnabled') + tab-heading + i.icon-leaf + | Stable app:pets:stable - #profile-tavern.tab-pane + + tab + tab-heading + i.icon-eye-close + | Tavern app:groups:group(group='{_habitRPG}') - #profile-challenges.tab-pane - app:challenges:main - #profile-settings.tab-pane - app:settings:settings-pane + + tab + tab-heading + i.icon-certificate + | Achievements + app:avatar:achievements(profile='{{_user}}') + + //
  • Challenges
  • + // app:challenges:main + + tab + tab-heading + i.icon-wrench + | Settings + app:settings:settings-pane \ No newline at end of file diff --git a/views/options/market.html b/views/options/market.html new file mode 100644 index 0000000000..2e81c26d52 --- /dev/null +++ b/views/options/market.html @@ -0,0 +1,57 @@ + + + +
    + + + +
    +
    +
    +

    Alexander Augustin

    +
    Welcome to the Market! I'm the merchant, Alexander. Dying to get that particular pet you're after, but don't want to wait for it to drop? Buy it here!
    +
    +
    + +

    Eggs

    + {#with _items.pets as :egg} + + + {#with :egg[0]}{/} + {#with :egg[1]}{/} + {#with :egg[2]}{/} + {#with :egg[3]}{/} + + + {#with :egg[4]}{/} + {#with :egg[5]}{/} + {#with :egg[6]}{/} + {#with :egg[7]}{/} + + + {#with :egg[8]}{/} + +
    + {/} +

    Hatching Potions

    + {#with _items.hatchingPotions as :hatchingPotion} + + + {#with :hatchingPotion[0]}{/} + {#with :hatchingPotion[1]}{/} + {#with :hatchingPotion[2]}{/} + {#with :hatchingPotion[3]}{/} + + + {#with :hatchingPotion[4]}{/} + {#with :hatchingPotion[5]}{/} + {#with :hatchingPotion[6]}{/} + {#with :hatchingPotion[7]}{/} + + + {#with :hatchingPotion[8]}{/} + {#with :hatchingPotion[9]}{/} + +
    + {/} +
    diff --git a/views/options/profile.jade b/views/options/profile.jade new file mode 100644 index 0000000000..ad10c49170 --- /dev/null +++ b/views/options/profile.jade @@ -0,0 +1,110 @@ +.row-fluid + + // ---- Customize ----- + .span4.border-right + menu(type='list') + // gender + li.customize-menu + menu(label='Head') + button.m_head_0.customize-option(type='button', ng-click='set("preferences.gender","m")') + button.f_head_0.customize-option(type='button', ng-click='set("preferences.gender","f")') + label.checkbox + input(type='checkbox', checked='{{user.preferences.showHelm}}') + | Show Helm + // hair + li.customize-menu + menu(label='Hair') + button(class='{{user.preferences.gender}}_hair_blond customize-option', type='button', ng-click='set("preferences.hair","blond")') + button(class='{{user.preferences.gender}}_hair_black customize-option', type='button', ng-click='set("preferences.hair","black")') + button(class='{{user.preferences.gender}}_hair_brown customize-option', type='button', ng-click='set("preferences.hair","brown")') + button(class='{{user.preferences.gender}}_hair_white customize-option', type='button', ng-click='set("preferences.hair","white")') + // skin + li.customize-menu + menu(label='Skin') + button.customize-option(class='{{user.preferences.gender}}_skin_dead', type='button', ng-click='set("preferences.skin","dead")') + button.customize-option(class='{{user.preferences.gender}}_skin_orc', type='button', ng-click='set("preferences.skin","orc")') + button.customize-option(class='{{user.preferences.gender}}_skin_asian', type='button', ng-click='set("preferences.skin","asian")') + button.customize-option(class='{{user.preferences.gender}}_skin_black', type='button', ng-click='set("preferences.skin","black")') + button.customize-option(class='{{user.preferences.gender}}_skin_white', type='button', ng-click='set("preferences.skin","white")') + menu(ng-show='user.preferences.gender=="f"', type='list') + li.customize-menu + menu(label='Clothing') + button.f_armor_0_v1.customize-option(type='button', ng-click='set("preferences.armorSet","v1")') + button.f_armor_0_v2.customize-option(type='button', ng-click='set("preferences.armorSet","v2")') + + // ------ Stats ------ + .span4.border-right + // + h4 Items + p + strong {{itemText('weapon',profile.items.weapon)}} + | : {{itemStat('weapon',profile.items.weapon)}}% Exp gain + p + strong {{itemText('armor',profile.items.armor)}} + | : {{itemStat('armor',profile.items.armor)}}% Defense + p + strong {{itemText('head',profile.items.head)}} + | : {{itemStat('head',profile.items.head)}}% Defense + p + strong {{itemText('shield',profile.items.shield)}} + | : {{itemStat('shield',profile.items.shield)}}% Defense + h4 Stats + p + strong HP + | : {{floor(profile.stats.hp)}} / 50 + p + strong GP + | : {{floor(profile.stats.gp)}} + p + strong Lvl + | : {{profile.stats.lvl}} + p + strong Exp + | : {{floor(profile.stats.exp)}} / {{tnl(profile.stats.lvl)}} + p + strong Strength + | : {{userStr(profile.stats.lvl)}} + p + strong Defense + | : {{userDef(profile.stats.lvl)}} + p + strong Pets Found + | : {{count(profile.items.pets)}} + hr + p + strong Total Strength + | : {{totalStr(profile.stats.lvl, profile.items.weapon)}} % + p + strong Total Defense + | : {{totalDef(profile.stats.lvl, profile.items.armor, profile.items.head, profile.items.shield)}} % + + + // ------- Edit ------- + .span4 + // + // Save + // TODO use photo-upload instead: https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/xMmADvxBOak + img.pull-right(ng-src='{{user.profile.imageUrl}}') + .control-group + label.control-label(for='profileImageUrl') Photo Url + .controls + input#profileImageUrl(type='url', value='{{user.profile.imageUrl}}', placeholder='Image Url') + .control-group + label.control-label(for='profileFullName') Full Name + .controls + input#profileFullName(type='text', placeholder='Full Name', value='{{user.profile.name}}') + .control-group + label.control-label(for='profileBlurb') Blurb + .controls + textarea#profileBlurb(placeholder='Blurb') {{user.profile.blurb}} + .control-group + label.control-label(for='profileWebsite') Websites + .controls + form(x-bind='submit:profileAddWebsite') + input#profileWebsite(type='url', value='{{_newProfileWebsite}}', placeholder='Add Website') + ul + // would prefer if there were and index in #each, instead using data-website to search with indexOf + li(ng-repeat='website in user.profile.websites') + | {{website}} + a(data-website='{{website}}', x-bind='click:profileRemoveWebsite') + i.icon-remove diff --git a/views/shared/modals/members.html b/views/shared/modals/members.html new file mode 100644 index 0000000000..0561e77c92 --- /dev/null +++ b/views/shared/modals/members.html @@ -0,0 +1,40 @@ +{{#each _membersArray as :member}} + + + + + +

    {{username(@profile.auth, @profile.profile.name)}}

    +
    +
    +
    + {{#if @profile.profile.imageUrl}} + + {{/}} + {{#if @profile.profile.blurb}} +

    {{@profile.profile.blurb}}

    + {{/}} + {{#if @profile.profile.websites}} +
      + {{#each @profile.profile.websites as :website}} +
    • {{:website}}
    • + {{/}} +
    + {{/}} +

    Stats

    + +
    +
    +

    Achievements

    + + +
    +
    + + + + <@footer> + + +
    +{{/}} \ No newline at end of file diff --git a/views/tasks/avatar.html b/views/tasks/avatar.html index d5145bbf15..e69de29bb2 100644 --- a/views/tasks/avatar.html +++ b/views/tasks/avatar.html @@ -1,232 +0,0 @@ - - {{#each _membersArray as :member}} - - - <@footer> - - - - {{/}} - - -

    Items

    -

    {itemText('weapon',@profile.items.weapon)}: {itemStat('weapon',@profile.items.weapon)}% Exp gain

    -

    {itemText('armor',@profile.items.armor)}: {itemStat('armor',@profile.items.armor)}% Defense

    -

    {itemText('head',@profile.items.head)}: {itemStat('head',@profile.items.head)}% Defense

    -

    {itemText('shield',@profile.items.shield)}: {itemStat('shield',@profile.items.shield)}% Defense

    - -

    Stats

    -

    HP: {floor(@profile.stats.hp)} / 50

    -

    GP: {floor(@profile.stats.gp)}

    -

    Lvl: {@profile.stats.lvl}

    -

    Exp: {floor(@profile.stats.exp)} / {tnl(@profile.stats.lvl)}

    -

    Strength: {userStr(@profile.stats.lvl)}

    -

    Defense: {userDef(@profile.stats.lvl)}

    -

    Pets Found: {count(@profile.items.pets)}

    -
    -

    Total Strength: {totalStr(@profile.stats.lvl, @profile.items.weapon)} %

    -

    Total Defense: {totalDef(@profile.stats.lvl, @profile.items.armor, @profile.items.head, @profile.items.shield)} %

    - - - - - - {#with _user.preferences as :p} - - -
  • - - - - - - -
  • - - -
  • - - - - - - -
  • - - -
  • - - - - - - - -
  • -
    - - {#if equal(_user.preferences.gender, 'f')} - -
  • - - - - -
  • -
    - {/} - {/} - - - - - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - -
    - -
    -
    - -
    - -
    -
    - -
    -
    -
      - - {#each _user.profile.websites as :website} -
    • {:website}
    • - {/} -
    - -
    - - -

    {{username(@profile.auth, @profile.profile.name)}}

    -
    -
    -
    - {{#if @profile.profile.imageUrl}} - - {{/}} - {{#if @profile.profile.blurb}} -

    {{@profile.profile.blurb}}

    - {{/}} - {{#if @profile.profile.websites}} -
      - {{#each @profile.profile.websites as :website}} -
    • {{:website}}
    • - {{/}} -
    - {{/}} -

    Stats

    - -
    -
    -

    Achievements

    - - -
    -
    - - -
    - - - - - - - - - - - - - - - -
    {{@profile.backer.npc}} NPC
    - Backed the Kickstarter project at the maximum level! -
    - - -
    - {{#if @profile.backer.contributor}} - {{@profile.backer.contributor}} - {{else}} - Contributor - {{/}} -
    - Has contributed to HabitRPG (code, design, pixel art, legal advice, docs, etc). Want this badge? Fix a bug :) -
    - - -
    Kickstarter Backer - ${{@profile.backer.tier}} Tier
    - Backed the Kickstarter Project -
    - - -
    {#if @profile.achievements.streak}{@profile.achievements.streak}{else}0{/} Streak Achievement(s)
    - Has performed {#if @profile.achievements.streak}{@profile.achievements.streak}{else}0{/} 21-day streaks on Dailies -
    - - -
    Original User
    - Goes way back to the Habit's days of yore (bless them for soldiering through bugs!) -
    - - -
    Ultimate Gear
    - Has upgraded to the maximum weapon and armor set -
    - - -
    Beast Master
    - Has found all 90 pets (insanely difficult, give this user props!) -
    - - -
    Helped Habit Grow
    - Has helped HabitRPG grow by filling out this survey. -
    - -
    - - - {#if @unlocked} -
    {@content} -
    - {else if @unlockable} - {{#if equal(_user.id,@profile.id)}} - - {@content} - -
    - {{/}} - {/} - - - - - -