new client various fixes: Hall of Heroes is visible, Sort gear by Perception, etc (#9070)

* adjust wording and time format for Custom Day Start time confirmation

- explains that this is the EARLIEST possible time for cron
- allows user to see the exact earliest time

* remove unnecessary hyphen from login date in Profile; added whitespace after colons

* allow Hall of Heroes to be seen by non-admin users (except for admin interface)

Also removes a level of code indentation that seemed to be incorrect.

* clarify that Orb of Rebirth costs 0 gems after level 100

Previously, the modal showed just a gem icon with no number, which was misleading.
Now it shows explicitly 0 gems.

* fix spelling mistake (Challeges > Challenges)

* allow equipment to be sorted by Perception

Also change Con > CON, Per > PER, etc for consistency with abbreviations used in other locations.
This commit is contained in:
Alys
2017-09-24 20:06:17 +10:00
committed by GitHub
parent dde63b619f
commit 5aea8def3b
8 changed files with 40 additions and 36 deletions

View File

@@ -1,7 +1,8 @@
<template lang="pug"> <template lang="pug">
.row.standard-page .row.standard-page
small.muted(v-html="$t('blurbHallContributors')") small.muted(v-html="$t('blurbHallContributors')")
.well(v-if='user.contributor.admin') .well
div(v-if='user.contributor.admin')
h2 {{ $t('rewardUser') }} h2 {{ $t('rewardUser') }}
.row .row
@@ -69,29 +70,29 @@
button.form-control.btn.btn-primary(@click='saveHero()') button.form-control.btn.btn-primary(@click='saveHero()')
| {{ $t('save') }} | {{ $t('save') }}
.table-responsive .table-responsive
table.table.table-striped table.table.table-striped
thead thead
tr tr
th {{ $t('name') }} th {{ $t('name') }}
th(v-if='user.contributor && user.contributor.admin') {{ $t('UUID') }} th(v-if='user.contributor && user.contributor.admin') {{ $t('UUID') }}
th {{ $t('contribLevel') }} th {{ $t('contribLevel') }}
th {{ $t('title') }} th {{ $t('title') }}
th {{ $t('contributions') }} th {{ $t('contributions') }}
tbody tbody
tr(v-for='(hero, index) in heroes') tr(v-for='(hero, index) in heroes')
td td
span(v-if='hero.contributor && hero.contributor.admin', :popover="$t('gamemaster')", popover-trigger='mouseenter', popover-placement='right') span(v-if='hero.contributor && hero.contributor.admin', :popover="$t('gamemaster')", popover-trigger='mouseenter', popover-placement='right')
a.label.label-default(:class='userLevelStyle(hero)', @click='clickMember(hero, true)') a.label.label-default(:class='userLevelStyle(hero)', @click='clickMember(hero, true)')
| {{hero.profile.name}}&nbsp; | {{hero.profile.name}}&nbsp;
//- span(v-class='userAdminGlyphiconStyle(hero)') //- span(v-class='userAdminGlyphiconStyle(hero)')
span(v-if='!hero.contributor || !hero.contributor.admin') span(v-if='!hero.contributor || !hero.contributor.admin')
a.label.label-default(v-if='hero.profile', v-class='userLevelStyle(hero)', @click='clickMember(hero, true)') {{hero.profile.name}} a.label.label-default(v-if='hero.profile', v-class='userLevelStyle(hero)', @click='clickMember(hero, true)') {{hero.profile.name}}
td(v-if='user.contributor.admin', @click='populateContributorInput(hero._id, index)').btn-link {{hero._id}} td(v-if='user.contributor.admin', @click='populateContributorInput(hero._id, index)').btn-link {{hero._id}}
td {{hero.contributor.level}} td {{hero.contributor.level}}
td {{hero.contributor.text}} td {{hero.contributor.text}}
td td
div(v-markdown='hero.contributor.contributions', target='_blank') div(v-markdown='hero.contributor.contributions', target='_blank')
</template> </template>
<script> <script>

View File

@@ -156,6 +156,7 @@ const sortGearTypes = ['sortByName', 'sortByCon', 'sortByPer', 'sortByStr', 'sor
const sortGearTypeMap = { const sortGearTypeMap = {
sortByName: (i) => i.text(), sortByName: (i) => i.text(),
sortByCon: 'con', sortByCon: 'con',
sortByPer: 'per',
sortByStr: 'str', sortByStr: 'str',
sortByInt: 'int', sortByInt: 'int',
}; };

View File

@@ -313,12 +313,12 @@ export default {
nextCron = nextCron.add(1, 'day'); nextCron = nextCron.add(1, 'day');
} }
return nextCron.format(this.user.preferences.dateFormat.toUpperCase()); return nextCron.format(`${this.user.preferences.dateFormat.toUpperCase()} @ h:mm a`);
}, },
openDayStartModal () { openDayStartModal () {
let nextCron = this.calculateNextCron(); let nextCron = this.calculateNextCron();
// @TODO: Add generic modal // @TODO: Add generic modal
if (!confirm(`Are you sure you want to change cron? Next cron will be ${nextCron}`)) return; if (!confirm(this.$t('sureChangeCustomDayStartTime', {time: nextCron}))) return;
this.saveDayStart(); this.saveDayStart();
// $rootScope.openModal('change-day-start', { scope: $scope }); // $rootScope.openModal('change-day-start', { scope: $scope });
}, },

View File

@@ -512,7 +512,7 @@ export default {
text: this.$t('rebirthName'), text: this.$t('rebirthName'),
notes: this.$t('rebirthPop'), notes: this.$t('rebirthPop'),
currency: 'gems', currency: 'gems',
value: this.user.stats.lvl < 100 ? 6 : '', value: this.user.stats.lvl < 100 ? 6 : 0,
}); });
} }

View File

@@ -46,13 +46,13 @@ div
.info .info
h2 {{ $t('info') }} h2 {{ $t('info') }}
div div
strong {{ $t('joined') }}: strong {{ $t('joined') }}:&nbsp;
| {{userJoinedDate}} | {{userJoinedDate}}
div div
strong {{ $t('lastLoggedIn') }}: strong {{ $t('latestCheckin') }}:&nbsp;
| {{userLastLoggedIn}} | {{userLastLoggedIn}}
div div
strong {{ $t('totalLogins') }}: strong {{ $t('totalLogins') }}:&nbsp;
span {{ $t('totalCheckins', {count: user.loginIncentives}) }} span {{ $t('totalCheckins', {count: user.loginIncentives}) }}
div div
| {{getProgressDisplay()}} | {{getProgressDisplay()}}

View File

@@ -203,9 +203,10 @@
"photo": "Photo", "photo": "Photo",
"info": "Info", "info": "Info",
"joined": "Joined", "joined": "Joined",
"totalLogins": "Total Log Ins", "totalLogins": "Total Check Ins",
"latestCheckin": "Latest Check In",
"editProfile": "Edit Profile", "editProfile": "Edit Profile",
"challengesWon": "Challeges Won", "challengesWon": "Challenges Won",
"questsCompleted": "Quests Completed", "questsCompleted": "Quests Completed",
"equipment": "Equipment", "equipment": "Equipment",
"costume": "Costume", "costume": "Costume",

View File

@@ -14,10 +14,10 @@
"sortByType": "Type", "sortByType": "Type",
"sortByPrice": "Price", "sortByPrice": "Price",
"sortByCon": "Con", "sortByCon": "CON",
"sortByPer": "Per", "sortByPer": "PER",
"sortByStr": "Str", "sortByStr": "STR",
"sortByInt": "Int", "sortByInt": "INT",
"weapon": "weapon", "weapon": "weapon",
"weaponCapitalized" : "Main-Hand Item", "weaponCapitalized" : "Main-Hand Item",

View File

@@ -47,6 +47,7 @@
"xml": "(XML)", "xml": "(XML)",
"json": "(JSON)", "json": "(JSON)",
"customDayStart": "Custom Day Start", "customDayStart": "Custom Day Start",
"sureChangeCustomDayStartTime": "Are you sure you want to change your Custom Day Start time? Your Dailies will next reset the first time you use Habitica after <%= time %>. Make sure you have completed your Dailies before then!",
"changeCustomDayStart": "Change Custom Day Start?", "changeCustomDayStart": "Change Custom Day Start?",
"sureChangeCustomDayStart": "Are you sure you want to change your custom day start?", "sureChangeCustomDayStart": "Are you sure you want to change your custom day start?",
"customDayStartHasChanged": "Your custom day start has changed.", "customDayStartHasChanged": "Your custom day start has changed.",