diff --git a/imports/message-read-receipt/server/hooks.js b/imports/message-read-receipt/server/hooks.js index 560ebf449ac4..4039271580e4 100644 --- a/imports/message-read-receipt/server/hooks.js +++ b/imports/message-read-receipt/server/hooks.js @@ -2,6 +2,11 @@ import { ReadReceipt } from './lib/ReadReceipt'; RocketChat.callbacks.add('afterSaveMessage', (message, room) => { + // skips this callback if the message was edited + if (message.editedAt) { + return message; + } + // set subscription as read right after message was sent RocketChat.models.Subscriptions.setAsReadByRoomIdAndUserId(room._id, message.u._id); diff --git a/packages/rocketchat-file-upload/server/lib/requests.js b/packages/rocketchat-file-upload/server/lib/requests.js index 7a47c0496e81..7962e095351f 100644 --- a/packages/rocketchat-file-upload/server/lib/requests.js +++ b/packages/rocketchat-file-upload/server/lib/requests.js @@ -1,6 +1,6 @@ /* globals FileUpload, WebApp */ -WebApp.connectHandlers.use(`${ __meteor_runtime_config__.ROOT_URL_PATH_PREFIX }/file-upload/`, function(req, res, next) { +WebApp.connectHandlers.use('/file-upload/', function(req, res, next) { const match = /^\/([^\/]+)\/(.*)/.exec(req.url); diff --git a/packages/rocketchat-livechat/.app/client/views/loading.html b/packages/rocketchat-livechat/.app/client/views/loading.html index e13a3f77ba1c..77310699f18a 100644 --- a/packages/rocketchat-livechat/.app/client/views/loading.html +++ b/packages/rocketchat-livechat/.app/client/views/loading.html @@ -1,8 +1,8 @@ \ No newline at end of file + diff --git a/packages/rocketchat-message-attachments/client/messageAttachment.js b/packages/rocketchat-message-attachments/client/messageAttachment.js index 8da6606bca34..d0df4d8f3b5f 100644 --- a/packages/rocketchat-message-attachments/client/messageAttachment.js +++ b/packages/rocketchat-message-attachments/client/messageAttachment.js @@ -22,7 +22,7 @@ const fixCordova = function(url) { } else if (navigator.userAgent.indexOf('Electron') > -1) { return __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + url; } else { - return Meteor.absoluteUrl().replace(/\/$/, '') + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + url; + return Meteor.absoluteUrl().replace(/\/$/, '') + url; } }; /*globals renderMessageBody*/ diff --git a/packages/rocketchat-theme/client/imports/general/base.css b/packages/rocketchat-theme/client/imports/general/base.css index 28a4e7342769..f4a7f3adcdab 100644 --- a/packages/rocketchat-theme/client/imports/general/base.css +++ b/packages/rocketchat-theme/client/imports/general/base.css @@ -30,6 +30,8 @@ body { font-size: var(--text-small-size); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + + background-color: var(--rc-color-primary) } :focus { @@ -205,3 +207,52 @@ button { .hidden { display: none; } + +.loading-animation { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + + display: flex; + + text-align: center; + align-items: center; + justify-content: center; +} + +.loading-animation > .bounce { + display: inline-block; + + width: 10px; + height: 10px; + margin: 2px; + + animation: loading-bouncedelay 1.4s infinite ease-in-out both; + + border-radius: 100%; + background-color: rgba(255, 255, 255, 0.6); +} + +.loading-animation .bounce1 { + -webkit-animation-delay: -0.32s; + animation-delay: -0.32s; +} + +.loading-animation .bounce2 { + -webkit-animation-delay: -0.16s; + animation-delay: -0.16s; +} + +@keyframes loading-bouncedelay { + 0%, + 80%, + 100% { + transform: scale(0); + } + + 40% { + transform: scale(1); + } +} diff --git a/packages/rocketchat-theme/client/imports/general/base_old.css b/packages/rocketchat-theme/client/imports/general/base_old.css index f27c433b735f..50df7449b4c6 100644 --- a/packages/rocketchat-theme/client/imports/general/base_old.css +++ b/packages/rocketchat-theme/client/imports/general/base_old.css @@ -1702,8 +1702,7 @@ white-space: nowrap; text-overflow: ellipsis; - color: white; - background-color: #04436a; + color: var(--rc-color-content); font-size: 1.2em; line-height: 40px; diff --git a/packages/rocketchat-theme/server/colors.less b/packages/rocketchat-theme/server/colors.less index 89bfaa2391ac..1f7df2e7b369 100755 --- a/packages/rocketchat-theme/server/colors.less +++ b/packages/rocketchat-theme/server/colors.less @@ -947,3 +947,7 @@ label.required::after { .range-slider-range::-moz-range-track { background-color: @tertiary-background-color; } + +.announcement { + background-color: @primary-background-color; +} diff --git a/packages/rocketchat-ui-account/client/accountPreferences.js b/packages/rocketchat-ui-account/client/accountPreferences.js index 9653e7671291..4e00e3b26247 100644 --- a/packages/rocketchat-ui-account/client/accountPreferences.js +++ b/packages/rocketchat-ui-account/client/accountPreferences.js @@ -134,7 +134,6 @@ Template.accountPreferences.onCreated(function() { data.collapseMediaByDefault = JSON.parse($('input[name=collapseMediaByDefault]:checked').val()); data.muteFocusedConversations = JSON.parse($('#muteFocusedConversations').find('input:checked').val()); data.hideUsernames = JSON.parse($('#hideUsernames').find('input:checked').val()); - data.hideRoles = JSON.parse($('#hideRoles').find('input:checked').val()); data.hideFlexTab = JSON.parse($('#hideFlexTab').find('input:checked').val()); data.hideAvatars = JSON.parse($('#hideAvatars').find('input:checked').val()); data.sendOnEnter = $('#sendOnEnter').find('select').val(); @@ -152,6 +151,10 @@ Template.accountPreferences.onCreated(function() { let reload = false; + if (RocketChat.settings.get('UI_DisplayRoles')) { + data.hideRoles = JSON.parse($('#hideRoles').find('input:checked').val()); + } + // if highlights changed we need page reload const highlights = RocketChat.getUserPreference(Meteor.user(), 'highlights'); if (highlights && highlights.join('\n') !== data.highlights.join('\n')) { diff --git a/packages/rocketchat-ui-account/client/accountProfile.html b/packages/rocketchat-ui-account/client/accountProfile.html index f1a2581b44de..d8300889e5c4 100644 --- a/packages/rocketchat-ui-account/client/accountProfile.html +++ b/packages/rocketchat-ui-account/client/accountProfile.html @@ -42,7 +42,7 @@ - +