diff --git a/common/locales/en/settings.json b/common/locales/en/settings.json index 1b931140d8..1f11fbd684 100644 --- a/common/locales/en/settings.json +++ b/common/locales/en/settings.json @@ -10,6 +10,8 @@ "newTaskEditPop": "With this option set, new tasks will immediately open for you to add details like notes and tags.", "dailyDueDefaultView": "Set Dailies default to 'due' tab", "dailyDueDefaultViewPop": "With this option set, the Dailies tasks will default to 'due' instead of 'all'", + "reverseChatOrder": "Show chat messages in reverse order", + "reverseChatOrderPop": "Show the messages in the Tarvern, Guild, and Party chats in reverse order, so that the oldest are on top.", "startCollapsed": "Tag list in tasks starts collapsed", "startCollapsedPop": "With this option set, the list of task tags will be hidden when you first open a task for editing.", "startAdvCollapsed": "Advanced Options in tasks start collapsed", diff --git a/website/src/models/user.js b/website/src/models/user.js index cca59d7719..06e3ae1bde 100644 --- a/website/src/models/user.js +++ b/website/src/models/user.js @@ -360,6 +360,7 @@ var UserSchema = new Schema({ tagsCollapsed: {type: Boolean, 'default': false}, advancedCollapsed: {type: Boolean, 'default': false}, toolbarCollapsed: {type:Boolean, 'default':false}, + reverseChatOrder: {type:Boolean, 'default':false}, background: String, displayInviteToPartyWhenPartyIs1: { type:Boolean, 'default':true}, webhooks: {type: Schema.Types.Mixed, 'default': {}}, diff --git a/website/views/options/social/chat-message.jade b/website/views/options/social/chat-message.jade index de63f5cd98..3231726e82 100644 --- a/website/views/options/social/chat-message.jade +++ b/website/views/options/social/chat-message.jade @@ -1,6 +1,9 @@ mixin chatMessages(inbox) ul.list-unstyled.tavern-chat - - var ngRepeat = inbox ? 'message in user.inbox.messages | toArray:true | orderBy:"sort":true' : 'message in group.chat track by message.id' + - + var ngRepeat = inbox ? + 'message in user.inbox.messages | toArray:true | orderBy:"sort":true' : + 'message in group.chat | orderBy:"timestamp":!user.preferences.reverseChatOrder track by message.id' li.chat-message(ng-repeat=ngRepeat, ng-class=':: {highlight: isUserMentioned(user,message) || message.uuid=="system", "own-message": user._id == message.uuid}') span.pull-right.text-danger(ng-if="user.contributor.admin && message.flagCount > 0") | {{message.flagCount > 1 ? "Message Hidden" : "1 flag"}}