diff --git a/website/client/components/settings/site.vue b/website/client/components/settings/site.vue index 24957203d6..73691dfb1c 100644 --- a/website/client/components/settings/site.vue +++ b/website/client/components/settings/site.vue @@ -36,9 +36,9 @@ h6(v-once) {{ $t('class') + ': ' }} // @TODO: what is classText span(v-if='classText') {{ classText }}  - button.btn.btn-danger.btn-xs(@click='changeClass(null)', v-once) {{ $t('changeClass') }} - small.cost 3 - span.Pet_Currency_Gem1x.inline-gems + button.btn.btn-danger.btn-xs(@click='changeClassForUser(true)', v-once) {{ $t('changeClass') }} + small.cost   3 {{ $t('gems') }} + // @TODO add icon span.Pet_Currency_Gem1x.inline-gems hr div @@ -82,7 +82,7 @@ button.btn.btn-primary(@click='showBailey()', popover-trigger='mouseenter', popover-placement='right', :popover="$t('showBaileyPop')") {{ $t('showBailey') }} button.btn.btn-primary(@click='openRestoreModal()', popover-trigger='mouseenter', popover-placement='right', :popover="$t('fixValPop')") {{ $t('fixVal') }} - button.btn.btn-primary(v-if='user.preferences.disableClasses == true', @click='changeClass({})', + button.btn.btn-primary(v-if='user.preferences.disableClasses == true', @click='changeClassForUser(false)', popover-trigger='mouseenter', popover-placement='right', :popover="$t('enableClassPop')") {{ $t('enableClass') }} hr @@ -378,8 +378,8 @@ export default { this.$router.go('/tasks'); }, - async changeClass () { - if (!confirm('Are you sure you want to change your class for 3 gems?')) return; + async changeClassForUser (confirmationNeeded) { + if (confirmationNeeded && !confirm(this.$t('changeClassConfirmCost'))) return; try { changeClass(this.user); await axios.post('/api/v3/user/change-class'); diff --git a/website/common/locales/en/character.json b/website/common/locales/en/character.json index 9c6aec8c20..d74a9cf26a 100644 --- a/website/common/locales/en/character.json +++ b/website/common/locales/en/character.json @@ -125,6 +125,7 @@ "mystery": "Mystery", "changeClass": "Change Class, Refund Attribute Points", "lvl10ChangeClass": "To change class you must be at least level 10.", + "changeClassConfirmCost": "Are you sure you want to change your class for 3 Gems?", "invalidClass":"Invalid class. Please specify 'warrior', 'rogue', 'wizard', or 'healer'.", "levelPopover": "Each level earns you one point to assign to an attribute of your choice. You can do so manually, or let the game decide for you using one of the Automatic Allocation options.", "unallocated": "Unallocated Attribute Points", @@ -158,7 +159,7 @@ "respawn": "Respawn!", "youDied": "You Died!", "dieText": "You've lost a Level, all your Gold, and a random piece of Equipment. Arise, Habiteer, and try again! Curb those negative Habits, be vigilant in completion of Dailies, and hold death at arm's length with a Health Potion if you falter!", - "sureReset": "Are you sure? This will reset your character's class and allocated points (you'll get them all back to re-allocate), and costs 3 gems.", + "sureReset": "Are you sure? This will reset your character's class and allocated points (you'll get them all back to re-allocate), and costs 3 Gems.", "purchaseFor": "Purchase for <%= cost %> Gems?", "notEnoughMana": "Not enough mana.", "invalidTarget": "You can't cast a skill on that.",