mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 20:49:41 +00:00
feat(chat): dynamic list of tavern mods (see http://goo.gl/9XhIZ6)
This commit is contained in:
parent
20c165263e
commit
e5c002bcdb
3 changed files with 6 additions and 1 deletions
|
|
@ -168,6 +168,7 @@ module.exports.locals = function(req, res, next) {
|
|||
},
|
||||
siteVersion: siteVersion,
|
||||
Content: shared.content,
|
||||
mods: require('./models/user').mods,
|
||||
|
||||
tavern: tavern, // for world boss
|
||||
worldDmg: (tavern && tavern.quest && tavern.quest.extra && tavern.quest.extra.worldDmg) || {}
|
||||
|
|
|
|||
|
|
@ -442,3 +442,7 @@ UserSchema.methods.unlink = function(options, cb) {
|
|||
|
||||
module.exports.schema = UserSchema;
|
||||
module.exports.model = mongoose.model("User", UserSchema);
|
||||
|
||||
mongoose.model("User").find({'contributor.admin':true},function(err,mods){
|
||||
module.exports.mods = _.map(mods,function(m){return ' '+ m.profile.name});
|
||||
});
|
||||
|
|
@ -129,6 +129,6 @@
|
|||
h3=env.t('tavernTalk')
|
||||
include ./chat-box
|
||||
.alert.alert-info.alert-sm
|
||||
!= ' ' + env.t('tavernAlert1') + ' <a href="https://github.com/HabitRPG/habitrpg/issues/2760" target="_blank">' + env.t('tavernAlert2') + '</a>.<br />' + env.t('moderatorIntro1') + env.t('moderatorList') + env.t('moderatorIntro2')
|
||||
!= ' ' + env.t('tavernAlert1') + ' <a href="https://github.com/HabitRPG/habitrpg/issues/2760" target="_blank">' + env.t('tavernAlert2') + '</a>.<br />' + env.t('moderatorIntro1') + env.mods + env.t('moderatorIntro2')
|
||||
ul.list-unstyled.tavern-chat
|
||||
include ./chat-message
|
||||
|
|
|
|||
Loading…
Reference in a new issue