Client fixed sept 4 (#9019)

* Fixed background purchasing

* Added challenge export

* Fixed is leader filter

* Fixed staff icon

* Add block to profile modal

* Added initial send gems modal

* Added modal stack

* Fixed lint issues

* Updated notification styles

* Updated level up styles

* Fixed many achievement styles

* Fixed notification navigate to same route with different param

* Added mark chat seen and remove new messages

* Added scroll to notifications

* Updated hall loading
This commit is contained in:
Keith Holliday
2017-09-05 12:34:00 -06:00
committed by GitHub
parent d051bdf2c9
commit 36a933d0c4
33 changed files with 606 additions and 238 deletions

View File

@@ -1,69 +1,73 @@
<template lang="pug">
.row
.row.standard-page
small.muted(v-html="$t('blurbHallContributors')")
.well(v-if='user.contributor.admin')
h2 {{ $t('rewardUser') }}
form(submit='loadHero(heroID)') // @TODO: make click
.form-group
input.form-control(type='text', v-model='heroID', placeholder="$t('UUID')")
.form-group
input.btn.btn-default(type='submit')
| {{ $t('loadUser') }}
form(v-if='hero && hero.profile', submit='saveHero(hero)') // @TODO: make click
a(v-click='clickMember(hero._id, true)')
h3 {{hero.profile.name}}
.form-group
input.form-control(type='text', v-model='hero.contributor.text', placeholder {{ $t('contribTitle') }})
.form-group
label {{ $t('contribLevel') }}
input.form-control(type='number', v-model='hero.contributor.level')
small {{ $t('contribHallText') }}
|&nbsp;
a(target='_blank', href='https://trello.com/c/wkFzONhE/277-contributor-gear') {{ $t('moreDetails') }}
|,&nbsp;
a(target='_blank', href='https://github.com/HabitRPG/habitica/issues/3801') {{ $t('moreDetails2') }}
.form-group
textarea.form-control(cols=5, placeholder {{ $t('contributions') }}, v-model='hero.contributor.contributions')
//include ../../shared/formattiv-help
hr
.form-group
label {{ $t('balance') }}
input.form-control(type='number', step="any", v-model='hero.balance')
small {{ '`user.balance`' + this.$t('notGems') }}
accordion
accordion-group(heading='Items')
h4 Update Item
.form-group.well
input.form-control(type='text',placeholder='Path (eg, items.pets.BearCub-Base)',v-model='hero.itemPath')
small.muted Enter the <strong>item path</strong>. E.g., <code>items.pets.BearCub-Zombie</code> or <code>items.gear.owned.head_special_0</code> or <code>items.gear.equipped.head</code>. You can find all the item paths below.
br
input.form-control(type='text',placeholder='Value (eg, 5)',v-model='hero.itemVal')
small.muted Enter the <strong>item value</strong>. E.g., <code>5</code> or <code>false</code> or <code>head_warrior_3</code>. All values are listed in the All Item Paths section below.
accordion
accordion-group(heading='All Item Paths')
pre {{allItemPaths}}
accordion-group(heading='Current Items')
pre {{toJson(hero.items, true)}}
accordion-group(heading='Auth')
h4 Auth
pre {{toJson(hero.auth)}}
.form-group
.checkbox
label
input(type='checkbox', v-model='hero.flags.chatRevoked')
| Chat Privileges Revoked
.form-group
.checkbox
label
input(type='checkbox', v-model='hero.auth.blocked')
| Blocked
.row
.form.col-6(v-if='!hero.profile')
.form-group
input.form-control(type='text', v-model='heroID', :placeholder="$t('UUID')")
.form-group
button.btn.btn-default(@click='loadHero(heroID)')
| {{ $t('loadUser') }}
// h4 Backer Status
// Add backer stuff like tier, disable adds, etcs
.form-group
input.form-control.btn.btn-primary(type='submit')
| {{ $t('save') }}
.row
.form.col-6(v-if='hero && hero.profile', submit='saveHero(hero)')
a(@click='clickMember(hero._id, true)')
h3 {{hero.profile.name}}
.form-group
input.form-control(type='text', v-model='hero.contributor.text', :placeholder="$t('contribTitle')")
.form-group
label {{ $t('contribLevel') }}
input.form-control(type='number', v-model='hero.contributor.level')
small {{ $t('contribHallText') }}
|&nbsp;
a(target='_blank', href='https://trello.com/c/wkFzONhE/277-contributor-gear') {{ $t('moreDetails') }}
|,&nbsp;
a(target='_blank', href='https://github.com/HabitRPG/habitica/issues/3801') {{ $t('moreDetails2') }}
.form-group
textarea.form-control(cols=5, :placeholder="$t('contributions')", v-model='hero.contributor.contributions')
//include ../../shared/formattiv-help
hr
.form-group
label {{ $t('balance') }}
input.form-control(type='number', step="any", v-model='hero.balance')
small {{ '`user.balance`' + this.$t('notGems') }}
.accordion
.accordion-group(heading='Items')
h4 Update Item
.form-group.well
input.form-control(type='text',placeholder='Path (eg, items.pets.BearCub-Base)',v-model='hero.itemPath')
small.muted Enter the <strong>item path</strong>. E.g., <code>items.pets.BearCub-Zombie</code> or <code>items.gear.owned.head_special_0</code> or <code>items.gear.equipped.head</code>. You can find all the item paths below.
br
input.form-control(type='text',placeholder='Value (eg, 5)',v-model='hero.itemVal')
small.muted Enter the <strong>item value</strong>. E.g., <code>5</code> or <code>false</code> or <code>head_warrior_3</code>. All values are listed in the All Item Paths section below.
.accordion
.accordion-group(heading='All Item Paths')
pre {{allItemPaths}}
.accordion-group(heading='Current Items')
pre {{hero.items}}
.accordion-group(heading='Auth')
h4 Auth
pre {{hero.auth}}
.form-group
.checkbox
label
input(type='checkbox', v-if='hero.flags', v-model='hero.flags.chatRevoked')
| Chat Privileges Revoked
.form-group
.checkbox
label
input(type='checkbox', v-model='hero.auth.blocked')
| Blocked
// h4 Backer Status
// Add backer stuff like tier, disable adds, etcs
.form-group
button.form-control.btn.btn-primary
| {{ $t('save') }}
.table-responsive
table.table.table-striped
@@ -75,25 +79,26 @@
th {{ $t('title') }}
th {{ $t('contributions') }}
tbody
tr(v-for='(hero, $index) in heroes')
tr(v-for='(hero, index) in heroes')
td
span(v-if='hero.contributor && hero.contributor.admin', :popover="$t('gamemaster')", popover-trigger='mouseenter', popover-placement='right')
a.label.label-default(v-class='userLevelStyle(hero)', v-click='clickMember(hero._id, true)')
a.label.label-default(:class='userLevelStyle(hero)', @click='clickMember(hero._id, true)')
| {{hero.profile.name}}&nbsp;
span(v-class='userAdminGlyphiconStyle(hero)')
//- span(v-class='userAdminGlyphiconStyle(hero)')
span(v-if='!hero.contributor || !hero.contributor.admin')
a.label.label-default(v-if='hero.profile', v-class='userLevelStyle(hero)', v-click='clickMember(hero._id, true)') {{hero.profile.name}}
td(v-if='user.contributor.admin', v-click='populateContributorInput(hero._id, $index)').btn-link {{hero._id}}
a.label.label-default(v-if='hero.profile', v-class='userLevelStyle(hero)', @click='clickMember(hero._id, true)') {{hero.profile.name}}
td(v-if='user.contributor.admin', @click='populateContributorInput(hero._id, index)').btn-link {{hero._id}}
td {{hero.contributor.level}}
td {{hero.contributor.text}}
td
markdown(text='hero.contributor.contributions', target='_blank')
div(v-markdown='hero.contributor.contributions', target='_blank')
</template>
<script>
// import keys from 'lodash/keys';
import each from 'lodash/each';
import markdownDirective from 'client/directives/markdown';
import { mapState } from 'client/libs/store';
import quests from 'common/script/content/quests';
import { mountInfo, petInfo } from 'common/script/content/stable';
@@ -117,6 +122,9 @@ export default {
gear,
};
},
directives: {
markdown: markdownDirective,
},
async mounted () {
this.heroes = await this.$store.dispatch('hall:getHeroes');
},
@@ -153,7 +161,6 @@ export default {
},
async loadHero (uuid, heroIndex) {
this.currentHeroIndex = heroIndex;
if (!heroIndex) return;
let hero = await this.$store.dispatch('hall:getHero', { uuid });
this.hero = hero;
},