Files
habitica/website/views/options/social/chat-box.jade
T
Matt Handley 705a78e835 Debounce $scope updates when typing in chat. (#8485)
Fixes #6462, by saving a bunch of time per frame. See the issue for evidence of
the win.
2017-02-27 11:19:42 -07:00

28 lines
1.8 KiB
Plaintext

div.chat-form.guidelines-not-accepted(ng-if='!user.flags.communityGuidelinesAccepted')
p!=env.t('requestAcceptGuidelines', {linkStart: '<a target="_blank", href="/static/community-guidelines">', linkEnd: '</a>'})
.chat-controls.clearfix
div
button.btn.btn-warning(ng-click='acceptCommunityGuidelines()')=env.t('iAcceptCommunityGuidelines')
.chat-buttons
button(type="button", ng-click='sync(group)') {{group.type === 'party' ? env.t('syncPartyAndChat') : env.t('toolTipMsg')}}
form.chat-form(ng-if='user.flags.communityGuidelinesAccepted' ng-submit='postChat(group,message.content)')
div(ng-controller='AutocompleteCtrl')
textarea.form-control(rows=4, submit-on-meta-enter, ng-model='message.content', ng-model-options='{debounce: 250}', updateinterval='250', flag='@', at-user, auto-complete placeholder="{{group._id == TAVERN_ID ? env.t('tavernCommunityGuidelinesPlaceholder') : ''}}", ng-disabled='_sending == true')
span.user-list
ul.list-at-user(ng-show="query")
li(ng-repeat='msg in response | filter:filterUser | limitTo: 5', ng-click='performCompletion(msg)')
span.username.label.label-default(ng-class=':: userLevelStyle(msg)') {{::msg.user}}
.chat-controls.clearfix
.chat-buttons
input.btn(type='submit', value=env.t('sendChat'), ng-disabled='_sending', tooltip=env.t('sendChatToolTip'))
button.btn(type="button", ng-click='sync(group)', ng-disabled='_sending') {{group.type === 'party' ? env.t('syncPartyAndChat') : env.t('toolTipMsg')}}
include ../../shared/formatting-help
.chat-controls.clearfix
.chat-buttons
.checkbox
label
input(type='checkbox', ng-model='user.preferences.reverseChatOrder', ng-change='set({"preferences.reverseChatOrder": user.preferences.reverseChatOrder?true: false})')
span=env.t('reverseChatOrder')