Skip to content

Commit

Permalink
Merge branch 'develop' into sidebar-viewmode-admin-option
Browse files Browse the repository at this point in the history
  • Loading branch information
karlprieb authored Mar 8, 2018
2 parents 7e13860 + bdad666 commit 12ad2c4
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 70 deletions.
5 changes: 5 additions & 0 deletions imports/message-read-receipt/server/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-file-upload/server/lib/requests.js
Original file line number Diff line number Diff line change
@@ -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);

Expand Down
8 changes: 4 additions & 4 deletions packages/rocketchat-livechat/.app/client/views/loading.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template name="loading">
<div class="loading-animation">
{{_ "Connecting to an Agent"}}
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
<div class="bounce bounce1"></div>
<div class="bounce bounce2"></div>
<div class="bounce bounce3"></div>
</div>
</template>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down
51 changes: 51 additions & 0 deletions packages/rocketchat-theme/client/imports/general/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions packages/rocketchat-theme/server/colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -947,3 +947,7 @@ label.required::after {
.range-slider-range::-moz-range-track {
background-color: @tertiary-background-color;
}

.announcement {
background-color: @primary-background-color;
}
5 changes: 4 additions & 1 deletion packages/rocketchat-ui-account/client/accountPreferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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')) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-account/client/accountProfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<label class="rc-select-avatar__upload-label avatar" for="upload-avatar">
{{> icon block="rc-select-avatar__upload-icon" icon="upload"}}
</label>
<input type="file" name="" value="" id="upload-avatar" style="display:none;">
<input type="file" name="" value="" id="upload-avatar" style="display:none;" accept="image/x-png,image/gif,image/jpeg">
</div>
<div class="rc-select-avatar__list-item rc-tooltip js-select-avatar-url {{selectUrl}}" aria-label="{{_ "Use_url_for_avatar" }}">
<label class="rc-select-avatar__upload-label avatar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const fixCordova = (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;
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-flextab/client/tabs/userEdit.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#unless canEditOrAdd}}
<p class="secondary-font-color">{{_ "You_are_not_authorized_to_view_this_page"}}</p>
{{else}}
<form class="" action="index.html" method="post" >
<form class="" action="index.html" method="post" autocomplete="off">
<div class="rc-input rc-form-group rc-form-group--small">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Name"}}</div>
Expand Down
1 change: 0 additions & 1 deletion packages/rocketchat-ui-master/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ Package.onUse(function(api) {

api.addFiles('server/inject.js', 'server');
api.addAssets('public/icons.svg', 'server');
api.addAssets('public/loading.css', 'server');
});
48 changes: 0 additions & 48 deletions packages/rocketchat-ui-master/public/loading.css

This file was deleted.

11 changes: 4 additions & 7 deletions packages/rocketchat-ui-master/server/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ RocketChat.models.Settings.find({_id:/theme-color-rc/i}, {fields: { value: 1}}).

Inject.rawHead('dynamic', `<script>(${ require('./dynamic-css.js').default.toString().replace(/\/\/.*?\n/g, '') })()</script>`);

Inject.rawHead('page-loading', `<style>${ Assets.getText('public/loading.css') }</style>`);

Inject.rawBody('icons', Assets.getText('public/icons.svg'));

Inject.rawBody('page-loading-div', `
<div id="initial-page-loading" class="page-loading">
<div class="loading-animation">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
<div class="bounce bounce1"></div>
<div class="bounce bounce2"></div>
<div class="bounce bounce3"></div>
</div>
</div>`);

Expand Down Expand Up @@ -71,8 +69,7 @@ RocketChat.settings.get('Assets_SvgFavicon_Enable', (key, value) => {
});

RocketChat.settings.get('theme-color-sidebar-background', (key, value) => {
Inject.rawHead(key, `<style>body { background-color: ${ value };}</style>` +
`<meta name="msapplication-TileColor" content="${ value }" />` +
Inject.rawHead(key, `<meta name="msapplication-TileColor" content="${ value }" />` +
`<meta name="theme-color" content="${ value }" />`);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/chimp-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
// showXolvioMessages: true,

// // - - - - CUCUMBER - - - -
path: 'tests/end-to-end/ui',
path: 'tests/end-to-end',
// format: 'pretty',
// tags: '~@ignore',
// singleSnippetPerFile: true,
Expand Down
1 change: 1 addition & 0 deletions tests/end-to-end/ui/06-messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ describe('[Message]', () => {

describe('[GENERAL Channel]', () => {
before(()=>{
checkIfUserIsValid(username, email, password);
sideNav.spotlightSearchIcon.click();
sideNav.spotlightSearch.waitForVisible(10000);
sideNav.searchChannel('general');
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/ui/11-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('[Administration]', () => {
sideNav.preferencesClose.click();
});

describe.only('[Admin View]', () => {
describe('[Admin View]', () => {
before(() => {
sideNav.sidebarMenu.click();
sideNav.admin.waitForVisible(5000);
Expand Down

0 comments on commit 12ad2c4

Please sign in to comment.