mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-17 03:22:14 +00:00
initial load of bindonce, implementation for chat. performance has improved noticibly, but I think we need to do this in a few other places
This commit is contained in:
parent
8e5edbbef8
commit
2350e3d359
4 changed files with 8 additions and 5 deletions
|
|
@ -25,6 +25,7 @@
|
|||
"angular-bootstrap": "~0.5.0",
|
||||
"angular-ui-router": "ca3b4777a603df8f86cfd653c8f6c38b2ae05d89",
|
||||
"angular-loading-bar": "~0.0.5",
|
||||
"angular-bindonce": "~0.2.1",
|
||||
"bootstrap": "v2.3.2",
|
||||
"bootstrap-datepicker": "~1.2.0",
|
||||
"bootstrap-tour": "0.5.0",
|
||||
|
|
@ -38,7 +39,8 @@
|
|||
},
|
||||
"resolutions": {
|
||||
"jquery": "~2.0.3",
|
||||
"bootstrap": "v2.3.2"
|
||||
"bootstrap": "v2.3.2",
|
||||
"angular": "~1.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "~1.2.1"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ window.env.t = function(string){
|
|||
window.habitrpg = angular.module('habitrpg',
|
||||
['ngResource', 'ngSanitize', 'userServices', 'groupServices', 'memberServices', 'challengeServices',
|
||||
'sharedServices', 'authServices', 'notificationServices', 'guideServices',
|
||||
'ui.bootstrap', 'ui.keypress', 'ui.router', 'chieffancypants.loadingBar', 'At'])
|
||||
'ui.bootstrap', 'ui.keypress', 'ui.router', 'chieffancypants.loadingBar', 'At', 'pasvaz.bindonce'])
|
||||
|
||||
// @see https://github.com/angular-ui/ui-router/issues/110 and https://github.com/HabitRPG/habitrpg/issues/1705
|
||||
// temporary hack until they have a better solution
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
"bower_components/angular-loading-bar/build/loading-bar.js",
|
||||
"bower_components/Angular-At-Directive/src/at.js",
|
||||
"bower_components/Angular-At-Directive/src/caret.js",
|
||||
"bower_components/angular-bindonce/bindonce.js",
|
||||
|
||||
"bower_components/bootstrap/docs/assets/js/bootstrap.js",
|
||||
"bower_components/angular-bootstrap/ui-bootstrap.js",
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
li(ng-repeat='message in group.chat', ng-class='{highlight: isUserMentioned(user,message), "own-message": user._id == message.uuid}')
|
||||
a.label.chat-message(class='label-contributor-{{message.contributor.level}}', ng-class='{"label-npc": message.backer.npc}', ng-click='clickMember(message.uuid, true)')
|
||||
li(bindonce='group.chat', ng-repeat='message in group.chat', bo-class='{highlight: isUserMentioned(user,message), "own-message": user._id == message.uuid}')
|
||||
a.label.chat-message(class='label-contributor-{{message.contributor.level}}', bo-class='{"label-npc": message.backer.npc}', ng-click='clickMember(message.uuid, true)')
|
||||
span(tooltip='{{contribText(message.contributor, message.backer)}}') {{message.user}}
|
||||
|
|
||||
markdown(ng-model='message.text')
|
||||
| -
|
||||
span.muted.time(from-now='message.timestamp')
|
||||
a(ng-show='user.contributor.admin || message.uuid == user.id', ng-click='deleteChatMessage(group, message)')
|
||||
a(bo-show='user.contributor.admin || message.uuid == user.id', ng-click='deleteChatMessage(group, message)')
|
||||
|
|
||||
i.icon-remove(tooltip='Delete')
|
||||
|
|
|
|||
Loading…
Reference in a new issue