mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 00:09:41 +00:00
* Wikia Links * Update contrib.json (Added comma) * Implement @Alys's Suggestions * conLearnLink -> conLearnURL * add link to plans.jade * Appended "URL" to locale strings with URLs * Add 's'
47 lines
2.6 KiB
Text
47 lines
2.6 KiB
Text
mixin gemButton(isGemsModal)
|
||
a.pull-right.gem-wallet(ng-click=( isGemsModal ? '' : 'openModal("buyGems",{track:"Gems > Wallet"})'), popover-trigger='mouseenter', popover-title=env.t('gemsPopoverTitle'), popover=env.t('gemsWhatFor'), popover-placement='bottom')
|
||
if !isGemsModal
|
||
span.task-action-btn.tile.flush.bright.add-gems-btn +
|
||
span.task-action-btn.tile.flush.neutral(class={"has-add-gems": !isGemsModal})
|
||
.Pet_Currency_Gem2x.Gems
|
||
=env.t('gemButton', {number: '{{user.balance * 4 | number:0}}'})
|
||
|
||
mixin previewMarkdown(text)
|
||
.panel.panel-warning
|
||
.panel-heading=env.t('msgPreviewHeading')
|
||
.panel-body.markdown-preview
|
||
markdown(text='#{text}')
|
||
|
||
mixin ownedQuests(popoverAppend, popoverPlacement)
|
||
menu.inventory-list
|
||
li.customize-menu
|
||
p.muted(ng-show='questCount < 1')=env.t('noScrolls')
|
||
div(ng-repeat='type in Content.userCanOwnQuestCategories track by $index')
|
||
menu.pets-menu(ng-if='Shared.count.questsOfCategory(user.items.quests,type) > 0', label='{{::env.t(type + "Quests")}}')
|
||
div(ng-repeat='(quest_key,points) in ownedItems(user.items.quests)', ng-init='quest = Content.quests[quest_key]', ng-if='Content.quests[quest_key].category === type')
|
||
button.customize-option(ng-class='lockQuest(quest) ? "inventory_quest_scroll_locked inventory_quest_scroll_{{::quest.key}}_locked locked" : "inventory_quest_scroll inventory_quest_scroll_{{::quest.key}}"',
|
||
ng-click='$close(); showQuest(quest_key)',
|
||
data-popover-html="{{::lockQuest(quest) ? env.t('scrollsPre') : questPopover(quest) | markdown}}",
|
||
popover-title='{{::quest.text()}}',
|
||
popover-trigger='mouseenter',
|
||
popover-append-to-body='#{popoverAppend}',
|
||
popover-placement='#{popoverPlacement}')
|
||
.badge.badge-info.stack-count {{points}}
|
||
|
||
mixin statAllocation
|
||
-
|
||
var stats = {
|
||
str: { title:"allocateStr",popover:'strengthText',allocatepop:'allocateStrPop' },
|
||
int: { title:"allocateInt",popover:'intText',allocatepop:'allocateIntPop' },
|
||
con: { title:"allocateCon",popover:'conText',allocatepop:'allocateConPop' },
|
||
per: { title:"allocatePer",popover:'perText',allocatepop:'allocatePerPop' }
|
||
}
|
||
|
||
each statInfo, stat in stats
|
||
tr
|
||
td
|
||
span.hint(popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.popover))
|
||
=env.t(statInfo.title) + ' {{user.stats.' + stat + '}}'
|
||
td
|
||
a.btn.btn-primary(ng-show='user.stats.points', ng-click='allocate("#{stat}")',
|
||
popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.allocatepop)) +
|