diff --git a/.docker/Dockerfile b/.docker/Dockerfile index beaccef6157..40e54c7a30c 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:4 -ENV RC_VERSION 0.57.0-develop +ENV RC_VERSION 0.59.0-develop MAINTAINER buildmaster@rocket.chat diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 18487542d65..37465b0ef12 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,40 @@ - + + +### Description: + + + +### Server Setup Information: + +* Version of Rocket.Chat Server: +* Operating System: +* Deployment Method(snap/docker/tar/etc): +* Number of Running Instances: +* DB Replicaset Oplog: +* Node Version: + +### Steps to Reproduce: + +1. +2. +3. + +### Expected behavior: + + + +### Actual behavior: + + + +### Relevant logs: + + diff --git a/.github/changelog.js b/.github/changelog.js index 50edbefe4e8..438d194d23a 100644 --- a/.github/changelog.js +++ b/.github/changelog.js @@ -70,7 +70,7 @@ var writerOpts = { // GitHub issue URLs. commit.subject = commit.subject.replace(/#([0-9]+)/g, function(_, issue) { issues.push(issue); - return '[#' + issue + '](' + gitUrl + '/issue/' + issue + ')'; + return '[#' + issue + '](' + gitUrl + '/issues/' + issue + ')'; }); // GitHub user URLs. commit.subject = commit.subject.replace(/@([a-zA-Z0-9_]+)/g, '[@$1](https://github.com/$1)'); diff --git a/.gitignore b/.gitignore index 644cb6d42cf..3f7fd5b8134 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ .env .externalToolBuilders .idea +.vscode .loadpath .map .metadata diff --git a/.meteor/packages b/.meteor/packages index 50de15d3ab6..16aacf8c6ca 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -4,18 +4,18 @@ # but you can also edit it by hand. rocketchat:cors -accounts-facebook@1.2.0 +accounts-facebook@1.2.1 accounts-github@1.3.0 accounts-google@1.2.0 accounts-meteor-developer@1.3.0 -accounts-password@1.3.6 +accounts-password@1.4.0 accounts-twitter@1.3.0 blaze-html-templates check@1.2.5 ddp-rate-limiter@1.0.7 -ecmascript@0.8.0 +ecmascript@0.8.1 ejson@1.0.13 -email@1.2.1 +email@1.2.3 fastclick@1.0.13 http@1.2.12 jquery@1.11.10 @@ -23,7 +23,7 @@ less@2.7.9 logging@1.1.17 meteor-base@1.1.0 mobile-experience@1.0.4 -mongo@1.1.18 +mongo@1.1.19 random@1.0.10 rate-limit@1.0.8 reactive-dict@1.1.9 @@ -31,9 +31,9 @@ reactive-var@1.0.11 reload@1.1.11 service-configuration@1.0.11 session@1.1.7 -shell-server@0.2.3 +shell-server@0.2.4 spacebars -standard-minifier-js@2.1.0 +standard-minifier-js@2.1.1 tracker@1.1.3 rocketchat:2fa @@ -98,6 +98,7 @@ rocketchat:slackbridge rocketchat:slashcommands-archive rocketchat:slashcommands-asciiarts rocketchat:slashcommands-create +rocketchat:slashcommands-help rocketchat:slashcommands-invite rocketchat:slashcommands-invite-all rocketchat:slashcommands-join @@ -109,6 +110,7 @@ rocketchat:slashcommands-mute rocketchat:slashcommands-open rocketchat:slashcommands-topic rocketchat:slashcommands-unarchive +rocketchat:slider rocketchat:smarsh-connector rocketchat:spotify rocketchat:statistics @@ -149,7 +151,7 @@ jalik:ufs-gridfs jparker:gravatar kadira:blaze-layout kadira:flow-router -kenton:accounts-sandstorm +#kenton:accounts-sandstorm mizzao:autocomplete mizzao:timesync mrt:reactive-store @@ -171,4 +173,4 @@ yasaricli:slugify yasinuslu:blaze-meta deepwell:bootstrap-datepicker2 rocketchat:postcss -dynamic-import +dynamic-import@0.1.1 diff --git a/.meteor/release b/.meteor/release index 025f64e7073..1e7fc5b564c 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.5 +METEOR@1.5.1 diff --git a/.meteor/versions b/.meteor/versions index f55de24ec9d..4fba9b91c17 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,48 +1,49 @@ -accounts-base@1.3.0 -accounts-facebook@1.2.0 +accounts-base@1.3.1 +accounts-facebook@1.2.1 accounts-github@1.3.0 accounts-google@1.2.0 accounts-meteor-developer@1.3.0 accounts-oauth@1.1.15 -accounts-password@1.3.7 +accounts-password@1.4.0 accounts-twitter@1.3.0 aldeed:simple-schema@1.5.3 -allow-deny@1.0.5 +allow-deny@1.0.6 autoupdate@1.3.12 -babel-compiler@6.19.2 +babel-compiler@6.19.4 babel-runtime@1.0.1 base64@1.0.10 binary-heap@1.0.10 blaze@2.3.2 blaze-html-templates@1.1.2 blaze-tools@1.0.10 -boilerplate-generator@1.1.0 +boilerplate-generator@1.1.1 caching-compiler@1.1.9 caching-html-compiler@1.1.2 callback-hook@1.0.10 cfs:http-methods@0.0.32 check@1.2.5 -coffeescript@1.12.6_1 +coffeescript@1.12.7_1 +coffeescript-compiler@1.12.7_1 dandv:caret-position@2.1.1 -ddp@1.2.5 -ddp-client@1.3.4 -ddp-common@1.2.8 +ddp@1.3.0 +ddp-client@2.0.0 +ddp-common@1.2.9 ddp-rate-limiter@1.0.7 -ddp-server@1.3.14 +ddp-server@2.0.0 deepwell:bootstrap-datepicker2@1.3.0 deps@1.0.12 diff-sequence@1.0.7 dispatch:run-as-user@1.1.1 dynamic-import@0.1.1 -ecmascript@0.8.0 +ecmascript@0.8.2 ecmascript-runtime@0.4.1 -ecmascript-runtime-client@0.4.2 +ecmascript-runtime-client@0.4.3 ecmascript-runtime-server@0.4.1 edgee:slingshot@0.7.1 ejson@1.0.13 email@1.2.3 -emojione:emojione@3.0.3 -facebook-oauth@1.3.1 +emojione:emojione@2.2.6 +facebook-oauth@1.3.2 fastclick@1.0.13 francocatena:status@1.5.3 geojson-utils@1.0.10 @@ -62,7 +63,6 @@ jparker:gravatar@0.5.1 jquery@1.11.10 kadira:blaze-layout@2.3.0 kadira:flow-router@2.12.1 -kenton:accounts-sandstorm@0.6.0 konecty:change-case@2.3.0 konecty:delayed-task@1.0.0 konecty:mongo-counter@0.0.5_3 @@ -72,26 +72,26 @@ konecty:user-presence@1.2.9 launch-screen@1.1.1 less@2.7.9 livedata@1.0.18 -localstorage@1.1.0 +localstorage@1.1.1 logging@1.1.17 matb33:collection-hooks@0.8.4 mdg:validation-error@0.5.1 -meteor@1.6.1 +meteor@1.7.1 meteor-base@1.1.0 meteor-developer-oauth@1.2.0 meteorhacks:inject-initial@1.0.4 meteorhacks:meteorx@1.4.1 meteorspark:util@0.2.0 minifier-css@1.2.16 -minifier-js@2.1.0 +minifier-js@2.1.1 minimongo@1.2.1 mizzao:autocomplete@0.5.1 mizzao:timesync@0.3.4 mobile-experience@1.0.4 mobile-status-bar@1.0.14 -modules@0.9.1 +modules@0.9.4 modules-runtime@0.8.0 -mongo@1.1.18 +mongo@1.1.22 mongo-id@1.0.6 mongo-livedata@1.0.12 mrt:reactive-store@0.0.1 @@ -99,14 +99,14 @@ mystor:device-detection@0.2.0 nimble:restivus@0.8.12 nooitaf:colors@1.1.2_1 npm-bcrypt@0.9.3 -npm-mongo@2.2.24 +npm-mongo@2.2.30 oauth@1.1.13 oauth1@1.1.11 oauth2@1.1.11 observe-sequence@1.0.16 ordered-dict@1.0.9 -ostrio:cookies@2.2.1 -pauli:accounts-linkedin@2.1.2 +ostrio:cookies@2.2.2 +pauli:accounts-linkedin@2.1.3 pauli:linkedin-oauth@1.1.0 percolate:synced-cron@1.3.2 promise@0.8.9 @@ -191,6 +191,7 @@ rocketchat:slackbridge@0.0.1 rocketchat:slashcommands-archive@0.0.1 rocketchat:slashcommands-asciiarts@0.0.1 rocketchat:slashcommands-create@0.0.1 +rocketchat:slashcommands-help@0.0.1 rocketchat:slashcommands-invite@0.0.1 rocketchat:slashcommands-invite-all@0.0.1 rocketchat:slashcommands-join@0.0.1 @@ -202,6 +203,7 @@ rocketchat:slashcommands-mute@0.0.1 rocketchat:slashcommands-open@0.0.1 rocketchat:slashcommands-topic@0.0.1 rocketchat:slashcommands-unarchive@0.0.1 +rocketchat:slider@0.0.1 rocketchat:smarsh-connector@0.0.1 rocketchat:sms@0.0.1 rocketchat:spotify@0.0.1 @@ -227,13 +229,13 @@ routepolicy@1.0.12 service-configuration@1.0.11 session@1.1.7 sha@1.0.9 -shell-server@0.2.3 +shell-server@0.2.4 simple:json-routes@2.1.0 smoral:sweetalert@1.1.1 spacebars@1.0.15 -spacebars-compiler@1.1.2 +spacebars-compiler@1.1.3 srp@1.0.10 -standard-minifier-js@2.1.0 +standard-minifier-js@2.1.1 steffo:meteor-accounts-saml@0.0.1 tap:i18n@1.8.2 templating@1.3.2 @@ -249,7 +251,7 @@ ui@1.0.13 underscore@1.0.10 underscorestring:underscore.string@3.3.4 url@1.1.0 -webapp@1.3.16 +webapp@1.3.17 webapp-hashing@1.0.9 yasaricli:slugify@0.0.7 yasinuslu:blaze-meta@0.3.3 diff --git a/.postcssrc b/.postcssrc index 99dbadbdf3f..6a1a99e34df 100644 --- a/.postcssrc +++ b/.postcssrc @@ -2,6 +2,11 @@ "plugins": { "postcss-smart-import": {}, "postcss-cssnext": { + "features": { + "customProperties": { + "preserve": true + } + }, "browsers": [ "ie > 10", "last 2 Edge versions", diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index c794307a7de..6fec056fc80 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -21,7 +21,7 @@ const pkgdef :Spk.PackageDefinition = ( appVersion = 62, # Increment this for every release. - appMarketingVersion = (defaultText = "0.57.0-develop"), + appMarketingVersion = (defaultText = "0.59.0-develop"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.scripts/set-version.js b/.scripts/set-version.js index f237efc1797..1c5037c92cd 100644 --- a/.scripts/set-version.js +++ b/.scripts/set-version.js @@ -56,6 +56,9 @@ git.status() if (status.current === 'master') { return semver.inc(pkgJson.version, 'patch'); } + if (status.current === 'develop') { + return semver.inc(semver.inc(pkgJson.version, 'minor'), 'minor')+'-develop'; + } return Promise.reject(`No release action for branch ${ status.current }`); }) .then(nextVersion => inquirer.prompt([{ diff --git a/.snapcraft/candidate/snapcraft.yaml b/.snapcraft/candidate/snapcraft.yaml index 567d2e47900..2a4d3c71975 100644 --- a/.snapcraft/candidate/snapcraft.yaml +++ b/.snapcraft/candidate/snapcraft.yaml @@ -39,7 +39,7 @@ apps: parts: node: plugin: nodejs - node-engine: 4.8.1 + node-engine: 4.8.3 node-packages: - promise - fibers diff --git a/.snapcraft/edge/snapcraft.yaml b/.snapcraft/edge/snapcraft.yaml index 2934d80e590..d12d69d8393 100644 --- a/.snapcraft/edge/snapcraft.yaml +++ b/.snapcraft/edge/snapcraft.yaml @@ -39,7 +39,7 @@ apps: parts: node: plugin: nodejs - node-engine: 4.8.1 + node-engine: 4.8.3 node-packages: - promise - fibers diff --git a/.snapcraft/stable/snapcraft.yaml b/.snapcraft/stable/snapcraft.yaml index e548ef967a8..f61321281a2 100644 --- a/.snapcraft/stable/snapcraft.yaml +++ b/.snapcraft/stable/snapcraft.yaml @@ -39,7 +39,7 @@ apps: parts: node: plugin: nodejs - node-engine: 4.8.1 + node-engine: 4.8.3 node-packages: - promise - fibers diff --git a/.stylelintrc b/.stylelintrc index 2bbb45133d8..9aa65ea7a9a 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,5 +1,8 @@ { - "rules": { + "plugins": [ + "stylelint-order" + ], + "rules": { "at-rule-empty-line-before": [ "always", { except: [ "blockless-after-same-name-blockless", @@ -43,7 +46,6 @@ "declaration-colon-newline-after": "always-multi-line", "declaration-colon-space-after": "always-single-line", "declaration-colon-space-before": "never", - "declaration-empty-line-before": "never", "font-family-no-duplicate-names": true, "function-calc-no-unspaced-operator": true, "function-comma-newline-after": "always-multi-line", @@ -107,5 +109,220 @@ "value-list-comma-space-after": "always-single-line", "value-list-comma-space-before": "never", "value-list-max-empty-lines": 0, + "order/properties-order": [ + [ + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "position", + "z-index", + "top", + "right", + "bottom", + "left" + ] + }, + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "display", + "visibility", + "float", + "clear", + "overflow", + "overflow-x", + "overflow-y", + "clip", + "zoom", + "flex-direction", + "flex-order", + "flex-pack", + "flex-align", + "flex" + ] + }, + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "box-sizing", + "width", + "min-width", + "max-width", + "height", + "min-height", + "max-height", + "margin", + "margin-top", + "margin-right", + "margin-bottom", + "margin-left", + "padding", + "padding-top", + "padding-right", + "padding-bottom", + "padding-left" + ] + }, + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "table-layout", + "empty-cells", + "caption-side", + "border-spacing", + "border-collapse", + "list-style", + "list-style-position", + "list-style-type", + "list-style-image" + ] + }, + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "content", + "quotes", + "counter-reset", + "counter-increment", + "resize", + "cursor", + "user-select", + "nav-index", + "nav-up", + "nav-right", + "nav-down", + "nav-left", + "transition", + "transition-delay", + "transition-timing-function", + "transition-duration", + "transition-property", + "transform", + "transform-origin", + "animation", + "animation-name", + "animation-duration", + "animation-play-state", + "animation-timing-function", + "animation-delay", + "animation-iteration-count", + "animation-direction", + "text-align", + "text-align-last", + "vertical-align", + "white-space", + "text-decoration", + "text-emphasis", + "text-emphasis-color", + "text-emphasis-style", + "text-emphasis-position", + "text-indent", + "text-justify", + "text-transform", + "letter-spacing", + "word-spacing", + "text-outline", + "text-transform", + "text-wrap", + "text-overflow", + "text-overflow-ellipsis", + "text-overflow-mode", + "word-wrap", + "word-break", + "tab-size", + "hyphens", + "pointer-events" + ] + }, + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "opacity", + "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity", + "color", + "border", + "border-collapse", + "border-width", + "border-style", + "border-color", + "border-top", + "border-top-width", + "border-top-style", + "border-top-color", + "border-right", + "border-right-width", + "border-right-style", + "border-right-color", + "border-bottom", + "border-bottom-width", + "border-bottom-style", + "border-bottom-color", + "border-left", + "border-left-width", + "border-left-style", + "border-left-color", + "border-radius", + "border-top-left-radius", + "border-top-right-radius", + "border-bottom-right-radius", + "border-bottom-left-radius", + "border-image", + "border-image-source", + "border-image-slice", + "border-image-width", + "border-image-outset", + "border-image-repeat", + "outline", + "outline-width", + "outline-style", + "outline-color", + "outline-offset", + "background", + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader", + "background-color", + "background-image", + "background-repeat", + "background-attachment", + "background-position", + "background-position-x", + "background-position-y", + "background-clip", + "background-origin", + "background-size", + "box-decoration-break", + "box-shadow", + "filter:progid:DXImageTransform.Microsoft.gradient", + "text-shadow" + ] + }, + { + "emptyLineBefore": "always", + "order": "strict", + "properties": [ + "font", + "font-family", + "font-size", + "font-weight", + "font-style", + "font-variant", + "font-size-adjust", + "font-stretch", + "font-effect", + "font-emphasize", + "font-emphasize-position", + "font-emphasize-style", + "font-smooth", + "line-height" + ] + } + ], + { unspecified: "bottomAlphabetical" } + ] } } diff --git a/.travis/snap.sh b/.travis/snap.sh index 8b602fa558c..d22718a199b 100755 --- a/.travis/snap.sh +++ b/.travis/snap.sh @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then RC_VERSION=$TRAVIS_TAG else CHANNEL=edge - RC_VERSION=0.57.0-develop + RC_VERSION=0.59.0-develop fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 4cb22ca5c63..b0dd35a2e5f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,10 +1,277 @@ - -# NEXT + +## 0.57.2 (2017-07-14) + + +### Bug Fixes + +- [#7472](https://github.com/RocketChat/Rocket.Chat/pull/7472) Always set LDAP properties on login +- [#7431](https://github.com/RocketChat/Rocket.Chat/pull/7431) Fix Emails in User Admin View +- [#7469](https://github.com/RocketChat/Rocket.Chat/pull/7469) Fix file upload on Slack import +- [#7432](https://github.com/RocketChat/Rocket.Chat/pull/7432) Fix Private Channel List Submit +- [#7403](https://github.com/RocketChat/Rocket.Chat/pull/7403) Fix Unread Bar Disappearing +- [#7443](https://github.com/RocketChat/Rocket.Chat/pull/7443) S3 uploads not working for custom URLs + + + + +## 0.57.1 (2017-07-06) +- :hand: [#7428](https://github.com/RocketChat/Rocket.Chat/pull/7428) Fix migration of avatars from version 0.57.0 + +
+Others + +- [#7428](https://github.com/RocketChat/Rocket.Chat/pull/7428) Run avatar migration on startup +
+ + + + +# 0.57.0 (2017-07-03) ### Breaking Changes -- [#7095](https://github.com/RocketChat/Rocket.Chat/pull/7095) Internal hubot does not load [hubot-scripts](https://github.com/github/hubot-scripts) anymore. +- :hand: [#7095](https://github.com/RocketChat/Rocket.Chat/pull/7095) Internal hubot does not load [hubot-scripts](https://github.com/github/hubot-scripts) anymore. + +### New Features + +- [#7085](https://github.com/RocketChat/Rocket.Chat/pull/7085) API method and REST Endpoint for getting a single message by id +- [#6919](https://github.com/RocketChat/Rocket.Chat/pull/6919) Feature/delete any message permission +- [#6938](https://github.com/RocketChat/Rocket.Chat/pull/6938) Improve CI/Docker build/release +- [#7059](https://github.com/RocketChat/Rocket.Chat/pull/7059) Increase unread message count on [@here](https://github.com/here) mention +- [#6921](https://github.com/RocketChat/Rocket.Chat/pull/6921) LDAP: Use variables in User_Data_FieldMap for name mapping +- [#6857](https://github.com/RocketChat/Rocket.Chat/pull/6857) Make channel/group delete call answer to roomName +- [#7080](https://github.com/RocketChat/Rocket.Chat/pull/7080) Migration to add tags to email header and footer +- [#6788](https://github.com/RocketChat/Rocket.Chat/pull/6788) New avatar storage types +- [#6690](https://github.com/RocketChat/Rocket.Chat/pull/6690) Show full name in mentions if use full name setting enabled +- [#6953](https://github.com/RocketChat/Rocket.Chat/pull/6953) Show info about multiple instances at admin page +- [#6605](https://github.com/RocketChat/Rocket.Chat/pull/6605) Start running unit tests +- [#7311](https://github.com/RocketChat/Rocket.Chat/pull/7311) Force use of MongoDB for spotlight queries + +### Bug Fixes + +- [#7025](https://github.com/RocketChat/Rocket.Chat/pull/7025) Add and to header and footer +- [#7084](https://github.com/RocketChat/Rocket.Chat/pull/7084) Add option to ignore TLS in SMTP server settings +- [#7072](https://github.com/RocketChat/Rocket.Chat/pull/7072) Add support for carriage return in markdown code blocks +- [#6910](https://github.com/RocketChat/Rocket.Chat/pull/6910) Allow image insert from slack through slackbridge +- [#6904](https://github.com/RocketChat/Rocket.Chat/pull/6904) Bugs in `isUserFromParams` helper +- [#6840](https://github.com/RocketChat/Rocket.Chat/pull/6840) Check that username is not in the room when being muted / unmuted +- [#7103](https://github.com/RocketChat/Rocket.Chat/pull/7103) clipboard (permalink, copy, pin, star buttons) +- [#7030](https://github.com/RocketChat/Rocket.Chat/pull/7030) do only store password if LDAP_Login_Fallback is on +- [#7105](https://github.com/RocketChat/Rocket.Chat/pull/7105) edit button on firefox +- [#6935](https://github.com/RocketChat/Rocket.Chat/pull/6935) Error when trying to show preview of undefined filetype +- [#7045](https://github.com/RocketChat/Rocket.Chat/pull/7045) Fix avatar upload via users.setAvatar REST endpoint +- [#6950](https://github.com/RocketChat/Rocket.Chat/pull/6950) Fix badge counter on iOS push notifications +- [#7121](https://github.com/RocketChat/Rocket.Chat/pull/7121) fix bug in preview image +- [#6972](https://github.com/RocketChat/Rocket.Chat/pull/6972) Fix error handling for non-valid avatar URL +- [#6974](https://github.com/RocketChat/Rocket.Chat/pull/6974) Fix login with Meteor saving an object as email address +- [#7104](https://github.com/RocketChat/Rocket.Chat/pull/7104) Fix missing CSS files on production builds +- [#6986](https://github.com/RocketChat/Rocket.Chat/pull/6986) Fix the other tests failing due chimp update +- [#7049](https://github.com/RocketChat/Rocket.Chat/pull/7049) Improve Tests +- [#6968](https://github.com/RocketChat/Rocket.Chat/pull/6968) make channels.create API check for create-c +- [#7044](https://github.com/RocketChat/Rocket.Chat/pull/7044) New screen sharing Chrome extension checking method +- [#6999](https://github.com/RocketChat/Rocket.Chat/pull/6999) overlapping text for users-typing-message +- [#7014](https://github.com/RocketChat/Rocket.Chat/pull/7014) Parse HTML on admin setting's descriptions +- [#6997](https://github.com/RocketChat/Rocket.Chat/pull/6997) Parse markdown links last +- [#7033](https://github.com/RocketChat/Rocket.Chat/pull/7033) Prevent Ctrl key on message field from reloading messages list +- [#6912](https://github.com/RocketChat/Rocket.Chat/pull/6912) Remove room from roomPick setting +- [#6961](https://github.com/RocketChat/Rocket.Chat/pull/6961) SAML: Only set KeyDescriptor when non empty +- [#7023](https://github.com/RocketChat/Rocket.Chat/pull/7023) Sidenav roomlist +- [#6913](https://github.com/RocketChat/Rocket.Chat/pull/6913) Slackbridge text replacements +- [#6903](https://github.com/RocketChat/Rocket.Chat/pull/6903) Updating Incoming Integration Post As Field Not Allowed +- [#6947](https://github.com/RocketChat/Rocket.Chat/pull/6947) Use AWS Signature Version 4 signed URLs for uploads +- [#7012](https://github.com/RocketChat/Rocket.Chat/pull/7012) video message recording dialog is shown in an incorrect position +- [#7157](https://github.com/RocketChat/Rocket.Chat/pull/7157) Fix all reactions having the same username +- [#7215](https://github.com/RocketChat/Rocket.Chat/pull/7215/) Fix the Zapier oAuth return url to the new one +- [#7209](https://github.com/RocketChat/Rocket.Chat/pull/7209) "requirePasswordChange" property not being saved when set to false +- [#7208](https://github.com/RocketChat/Rocket.Chat/pull/7208) Fix oembed previews not being shown +- [#7200](https://github.com/RocketChat/Rocket.Chat/pull/7200) Fix editing others messages +- [#7160](https://github.com/RocketChat/Rocket.Chat/pull/7160) Removing the kadira package install from example build script. +- [#7345](https://github.com/RocketChat/Rocket.Chat/pull/7345) click on image in a message +- [#7207](https://github.com/RocketChat/Rocket.Chat/pull/7207) Fix Block Delete Message After (n) Minutes +- [#7320](https://github.com/RocketChat/Rocket.Chat/pull/7320) Fix jump to unread button +- [#7321](https://github.com/RocketChat/Rocket.Chat/pull/7321) Fix Secret Url +- [#7358](https://github.com/RocketChat/Rocket.Chat/pull/7358) Fix user's customFields not being saved correctly +- [#7352](https://github.com/RocketChat/Rocket.Chat/pull/7352) Improve avatar migration +- [#7304](https://github.com/RocketChat/Rocket.Chat/pull/7304) Proxy upload to correct instance +- [#7379](https://github.com/RocketChat/Rocket.Chat/pull/7379) Message being displayed unescaped + + +
+Others + +- [#7094](https://github.com/RocketChat/Rocket.Chat/pull/7094) [FIX]Fix the failing tests +- [#7092](https://github.com/RocketChat/Rocket.Chat/pull/7092) [FIX]Fixed typo hmtl -> html +- [#7145](https://github.com/RocketChat/Rocket.Chat/pull/7145) Convert file unsubscribe.coffee to js +- [#7146](https://github.com/RocketChat/Rocket.Chat/pull/7146) Convert hipchat importer to js +- [#7022](https://github.com/RocketChat/Rocket.Chat/pull/7022) Convert irc package to js +- [#7096](https://github.com/RocketChat/Rocket.Chat/pull/7096) Convert Livechat from Coffeescript to JavaScript +- [#6936](https://github.com/RocketChat/Rocket.Chat/pull/6936) Convert meteor-autocomplete package to js +- [#7017](https://github.com/RocketChat/Rocket.Chat/pull/7017) Convert oauth2-server-config package to js +- [#6795](https://github.com/RocketChat/Rocket.Chat/pull/6795) Convert Ui Account Package to Js +- [#6911](https://github.com/RocketChat/Rocket.Chat/pull/6911) Convert ui-admin package to js +- [#6775](https://github.com/RocketChat/Rocket.Chat/pull/6775) Convert WebRTC Package to Js +- [#7018](https://github.com/RocketChat/Rocket.Chat/pull/7018) converted rocketchat-importer +- [#6836](https://github.com/RocketChat/Rocket.Chat/pull/6836) converted rocketchat-ui coffee to js part 2 +- [#6976](https://github.com/RocketChat/Rocket.Chat/pull/6976) fix the crashing tests +- [#7055](https://github.com/RocketChat/Rocket.Chat/pull/7055) Ldap: User_Data_FieldMap description +- [#7114](https://github.com/RocketChat/Rocket.Chat/pull/7114) LingoHub based on develop +- [#7005](https://github.com/RocketChat/Rocket.Chat/pull/7005) LingoHub based on develop +- [#6978](https://github.com/RocketChat/Rocket.Chat/pull/6978) LingoHub based on develop +- [#7062](https://github.com/RocketChat/Rocket.Chat/pull/7062) Remove Useless Jasmine Tests +- [#6914](https://github.com/RocketChat/Rocket.Chat/pull/6914) Rocketchat ui message +- [#7006](https://github.com/RocketChat/Rocket.Chat/pull/7006) Rocketchat ui3 +- [#6987](https://github.com/RocketChat/Rocket.Chat/pull/6987) rocketchat-importer-slack coffee to js +- [#6735](https://github.com/RocketChat/Rocket.Chat/pull/6735) rocketchat-lib[4] coffee to js +- [#7154](https://github.com/RocketChat/Rocket.Chat/pull/7154) Remove missing CoffeeScript dependencies +- [#7308](https://github.com/RocketChat/Rocket.Chat/pull/7308) Escape error messages +- [#7102](https://github.com/RocketChat/Rocket.Chat/pull/7102) add server methods getRoomNameById +
+ + +
+Details + +## 0.57.0-rc.3 (2017-06-28) + + +### New Features + +- [#7311](https://github.com/RocketChat/Rocket.Chat/pull/7311) Force use of MongoDB for spotlight queries + + +### Bug Fixes + +- [#7345](https://github.com/RocketChat/Rocket.Chat/pull/7345) click on image in a message +- [#7207](https://github.com/RocketChat/Rocket.Chat/pull/7207) Fix Block Delete Message After (n) Minutes +- [#7320](https://github.com/RocketChat/Rocket.Chat/pull/7320) Fix jump to unread button +- [#7321](https://github.com/RocketChat/Rocket.Chat/pull/7321) Fix Secret Url +- [#7358](https://github.com/RocketChat/Rocket.Chat/pull/7358) Fix user's customFields not being saved correctly +- [#7352](https://github.com/RocketChat/Rocket.Chat/pull/7352) Improve avatar migration +- [#7304](https://github.com/RocketChat/Rocket.Chat/pull/7304) Proxy upload to correct instance + + +
+Others + +- [#7308](https://github.com/RocketChat/Rocket.Chat/pull/7308) Escape error messages +
+ + + +## 0.57.0-rc.2 (2017-06-12) + + +### Bug Fixes + +- [#7215](https://github.com/RocketChat/Rocket.Chat/pull/7215/) Fix the Zapier oAuth return url to the new one +- [#7209](https://github.com/RocketChat/Rocket.Chat/pull/7209) "requirePasswordChange" property not being saved when set to false +- [#7208](https://github.com/RocketChat/Rocket.Chat/pull/7208) Fix oembed previews not being shown +- [#7200](https://github.com/RocketChat/Rocket.Chat/pull/7200) Fix editing others messages +- [#7160](https://github.com/RocketChat/Rocket.Chat/pull/7160) Removing the kadira package install from example build script. + + + +## 0.57.0-rc.1 (2017-06-02) + + +### Bug Fixes + +- [#7157](https://github.com/RocketChat/Rocket.Chat/pull/7157) Fix all reactions having the same username + + +
+Others + +- [#7154](https://github.com/RocketChat/Rocket.Chat/pull/7154) Remove missing CoffeeScript dependencies +
+ + +## 0.57.0-rc.0 (2017-06-01) + + +### New Features + +- [#7085](https://github.com/RocketChat/Rocket.Chat/pull/7085) API method and REST Endpoint for getting a single message by id +- [#6919](https://github.com/RocketChat/Rocket.Chat/pull/6919) Feature/delete any message permission +- [#6938](https://github.com/RocketChat/Rocket.Chat/pull/6938) Improve CI/Docker build/release +- [#7059](https://github.com/RocketChat/Rocket.Chat/pull/7059) Increase unread message count on [@here](https://github.com/here) mention +- [#6921](https://github.com/RocketChat/Rocket.Chat/pull/6921) LDAP: Use variables in User_Data_FieldMap for name mapping +- [#6857](https://github.com/RocketChat/Rocket.Chat/pull/6857) Make channel/group delete call answer to roomName +- [#7080](https://github.com/RocketChat/Rocket.Chat/pull/7080) Migration to add tags to email header and footer +- [#6788](https://github.com/RocketChat/Rocket.Chat/pull/6788) New avatar storage types +- [#6690](https://github.com/RocketChat/Rocket.Chat/pull/6690) Show full name in mentions if use full name setting enabled +- [#6953](https://github.com/RocketChat/Rocket.Chat/pull/6953) Show info about multiple instances at admin page +- [#6605](https://github.com/RocketChat/Rocket.Chat/pull/6605) Start running unit tests + + +### Bug Fixes + +- [#7025](https://github.com/RocketChat/Rocket.Chat/pull/7025) Add and to header and footer +- [#7084](https://github.com/RocketChat/Rocket.Chat/pull/7084) Add option to ignore TLS in SMTP server settings +- [#7072](https://github.com/RocketChat/Rocket.Chat/pull/7072) Add support for carriage return in markdown code blocks +- [#6910](https://github.com/RocketChat/Rocket.Chat/pull/6910) Allow image insert from slack through slackbridge +- [#6904](https://github.com/RocketChat/Rocket.Chat/pull/6904) Bugs in `isUserFromParams` helper +- [#6840](https://github.com/RocketChat/Rocket.Chat/pull/6840) Check that username is not in the room when being muted / unmuted +- [#7103](https://github.com/RocketChat/Rocket.Chat/pull/7103) clipboard (permalink, copy, pin, star buttons) +- [#7030](https://github.com/RocketChat/Rocket.Chat/pull/7030) do only store password if LDAP_Login_Fallback is on +- [#7105](https://github.com/RocketChat/Rocket.Chat/pull/7105) edit button on firefox +- [#6935](https://github.com/RocketChat/Rocket.Chat/pull/6935) Error when trying to show preview of undefined filetype +- [#7045](https://github.com/RocketChat/Rocket.Chat/pull/7045) Fix avatar upload via users.setAvatar REST endpoint +- [#6950](https://github.com/RocketChat/Rocket.Chat/pull/6950) Fix badge counter on iOS push notifications +- [#7121](https://github.com/RocketChat/Rocket.Chat/pull/7121) fix bug in preview image +- [#6972](https://github.com/RocketChat/Rocket.Chat/pull/6972) Fix error handling for non-valid avatar URL +- [#6974](https://github.com/RocketChat/Rocket.Chat/pull/6974) Fix login with Meteor saving an object as email address +- [#7104](https://github.com/RocketChat/Rocket.Chat/pull/7104) Fix missing CSS files on production builds +- [#6986](https://github.com/RocketChat/Rocket.Chat/pull/6986) Fix the other tests failing due chimp update +- [#7049](https://github.com/RocketChat/Rocket.Chat/pull/7049) Improve Tests +- [#6968](https://github.com/RocketChat/Rocket.Chat/pull/6968) make channels.create API check for create-c +- [#7044](https://github.com/RocketChat/Rocket.Chat/pull/7044) New screen sharing Chrome extension checking method +- [#6999](https://github.com/RocketChat/Rocket.Chat/pull/6999) overlapping text for users-typing-message +- [#7014](https://github.com/RocketChat/Rocket.Chat/pull/7014) Parse HTML on admin setting's descriptions +- [#6997](https://github.com/RocketChat/Rocket.Chat/pull/6997) Parse markdown links last +- [#7033](https://github.com/RocketChat/Rocket.Chat/pull/7033) Prevent Ctrl key on message field from reloading messages list +- [#6912](https://github.com/RocketChat/Rocket.Chat/pull/6912) Remove room from roomPick setting +- [#6961](https://github.com/RocketChat/Rocket.Chat/pull/6961) SAML: Only set KeyDescriptor when non empty +- [#7023](https://github.com/RocketChat/Rocket.Chat/pull/7023) Sidenav roomlist +- [#6913](https://github.com/RocketChat/Rocket.Chat/pull/6913) Slackbridge text replacements +- [#6903](https://github.com/RocketChat/Rocket.Chat/pull/6903) Updating Incoming Integration Post As Field Not Allowed +- [#6947](https://github.com/RocketChat/Rocket.Chat/pull/6947) Use AWS Signature Version 4 signed URLs for uploads +- [#7012](https://github.com/RocketChat/Rocket.Chat/pull/7012) video message recording dialog is shown in an incorrect position + + +
+Others + +- [#7094](https://github.com/RocketChat/Rocket.Chat/pull/7094) [FIX]Fix the failing tests +- [#7092](https://github.com/RocketChat/Rocket.Chat/pull/7092) [FIX]Fixed typo hmtl -> html +- [#7145](https://github.com/RocketChat/Rocket.Chat/pull/7145) Convert file unsubscribe.coffee to js +- [#7146](https://github.com/RocketChat/Rocket.Chat/pull/7146) Convert hipchat importer to js +- [#7022](https://github.com/RocketChat/Rocket.Chat/pull/7022) Convert irc package to js +- [#7096](https://github.com/RocketChat/Rocket.Chat/pull/7096) Convert Livechat from Coffeescript to JavaScript +- [#6936](https://github.com/RocketChat/Rocket.Chat/pull/6936) Convert meteor-autocomplete package to js +- [#7017](https://github.com/RocketChat/Rocket.Chat/pull/7017) Convert oauth2-server-config package to js +- [#6795](https://github.com/RocketChat/Rocket.Chat/pull/6795) Convert Ui Account Package to Js +- [#6911](https://github.com/RocketChat/Rocket.Chat/pull/6911) Convert ui-admin package to js +- [#6775](https://github.com/RocketChat/Rocket.Chat/pull/6775) Convert WebRTC Package to Js +- [#7018](https://github.com/RocketChat/Rocket.Chat/pull/7018) converted rocketchat-importer +- [#6836](https://github.com/RocketChat/Rocket.Chat/pull/6836) converted rocketchat-ui coffee to js part 2 +- [#6976](https://github.com/RocketChat/Rocket.Chat/pull/6976) fix the crashing tests +- [#7055](https://github.com/RocketChat/Rocket.Chat/pull/7055) Ldap: User_Data_FieldMap description +- [#7114](https://github.com/RocketChat/Rocket.Chat/pull/7114) LingoHub based on develop +- [#7005](https://github.com/RocketChat/Rocket.Chat/pull/7005) LingoHub based on develop +- [#6978](https://github.com/RocketChat/Rocket.Chat/pull/6978) LingoHub based on develop +- [#7062](https://github.com/RocketChat/Rocket.Chat/pull/7062) Remove Useless Jasmine Tests +- [#6914](https://github.com/RocketChat/Rocket.Chat/pull/6914) Rocketchat ui message +- [#7006](https://github.com/RocketChat/Rocket.Chat/pull/7006) Rocketchat ui3 +- [#6987](https://github.com/RocketChat/Rocket.Chat/pull/6987) rocketchat-importer-slack coffee to js +- [#6735](https://github.com/RocketChat/Rocket.Chat/pull/6735) rocketchat-lib[4] coffee to js +
+ +
+ + + # 0.56.0 (2017-05-15) ### New Features diff --git a/README.md b/README.md index 1ef374f3383..3431a885810 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ * [Ubuntu 16.04](#ubuntu-1604) * [Cloudron.io](#cloudronio) * [Heroku](#heroku) + * [Helm Kubernetes](#helm-kubernetes) * [Scalingo](#scalingo) * [Sloppy.io](#sloppyio) * [Docker](#docker) @@ -84,7 +85,7 @@ Install Rocket.Chat in seconds on Linux (Ubuntu and others) with: sudo snap install rocketchat-server ``` -[![Rocket.Chat Snap is recommended for Linux deployments](https://github.com/Sing-Li/bbug/raw/master/images/ubuntulogo.png)](https://uappexplorer.com/app/rocketchat-server.rocketchat) +[![Rocket.Chat Snap is recommended for Linux deployments](https://github.com/Sing-Li/bbug/raw/master/images/ubuntulogo.png)](https://uappexplorer.com/snap/ubuntu/rocketchat-server) Installing snaps is very quick. By running that command you have your full Rocket.Chat server up and running. Snaps are secure. They are isolated with all of their dependencies. Snaps also auto update when we release new versions. @@ -118,7 +119,7 @@ Get your Rocket.Chat instance hosted in a "as a Service" style. You register and [![Rocket.Chat on IndieHosters](https://indie.host/signup.png)](https://indiehosters.net/shop/product/rocket-chat-21) ## Ubuntu 16.04 -[![Ubuntu Apps Explorer](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/uappexplorer.png)](https://uappexplorer.com/app/rocketchat-server.rocketchat) +[![Ubuntu Apps Explorer](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/uappexplorer.png)](https://uappexplorer.com/snap/ubuntu/rocketchat-server) Deploy from shell: @@ -137,6 +138,9 @@ Host your own Rocket.Chat server for **FREE** with [One-Click Deploy](https://he [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/RocketChat/Rocket.Chat/tree/master) +## Helm Kubernetes +Deploy on Kubernetes using the official [helm chart](https://github.com/kubernetes/charts/pull/752). + ## Scalingo Deploy your own Rocket.Chat server instantly on [Scalingo](https://scalingo.com) diff --git a/app.json b/app.json index 1fe42a0e97e..ea31755dbbb 100644 --- a/app.json +++ b/app.json @@ -6,7 +6,6 @@ "keywords": ["meteor", "social", "community", "chat"], "website": "https://rocket.chat", "env": { - "NODE_ENV": "production", "BUILDPACK_URL": "https://github.com/RocketChat/meteor-buildpack-horse.git", "HEROKU_APP_NAME": { "description": "Please re-enter your App Name from the top.", diff --git a/client/lib/handleError.js b/client/lib/handleError.js index 703524a1bfd..821d7e7cb0d 100644 --- a/client/lib/handleError.js +++ b/client/lib/handleError.js @@ -9,8 +9,8 @@ this.handleError = function(error, useToastr = true) { } if (useToastr) { - return toastr.error(TAPi18n.__(error.error, error.details), error.details && error.details.errorTitle ? TAPi18n.__(error.details.errorTitle) : null); + return toastr.error(_.escapeHTML(TAPi18n.__(error.error, error.details)), error.details && error.details.errorTitle ? _.escapeHTML(TAPi18n.__(error.details.errorTitle)) : null); } - return TAPi18n.__(error.error, error.details); + return _.escapeHTML(TAPi18n.__(error.error, error.details)); }; diff --git a/client/methods/deleteMessage.js b/client/methods/deleteMessage.js index 8a86f3affc2..1827726fb85 100644 --- a/client/methods/deleteMessage.js +++ b/client/methods/deleteMessage.js @@ -1,5 +1,4 @@ import moment from 'moment'; -import toastr from 'toastr'; Meteor.methods({ deleteMessage(message) { @@ -22,17 +21,14 @@ Meteor.methods({ return false; } const blockDeleteInMinutes = RocketChat.settings.get('Message_AllowDeleting_BlockDeleteInMinutes'); - if (!(forceDelete) || (_.isNumber(blockDeleteInMinutes) && blockDeleteInMinutes !== 0)) { - if (message.ts) { - const msgTs = moment(message.ts); - if (msgTs) { - const currentTsDiff = moment().diff(msgTs, 'minutes'); - if (currentTsDiff > blockDeleteInMinutes) { - toastr.error(t('error-message-deleting-blocked')); - return false; - } - } + if (!forceDelete && _.isNumber(blockDeleteInMinutes) && blockDeleteInMinutes !== 0) { + const msgTs = moment(message.ts); + const currentTsDiff = moment().diff(msgTs, 'minutes'); + if (currentTsDiff > blockDeleteInMinutes) { + return false; } + + } Tracker.nonreactive(function() { diff --git a/client/routes/router.js b/client/routes/router.js index f70a5ff6eba..beea6092bee 100644 --- a/client/routes/router.js +++ b/client/routes/router.js @@ -68,14 +68,6 @@ FlowRouter.route('/home', { } }); -FlowRouter.route('/changeavatar', { - name: 'changeAvatar', - - action() { - BlazeLayout.render('main', {center: 'avatarPrompt'}); - } -}); - FlowRouter.route('/account/:group?', { name: 'account', @@ -85,7 +77,10 @@ FlowRouter.route('/account/:group?', { } params.group = _.capitalize(params.group, true); BlazeLayout.render('main', { center: `account${ params.group }` }); - } + }, + triggersExit: [function() { + $('.main-content').addClass('rc-old'); + }] }); FlowRouter.route('/history/private', { diff --git a/example-build-run.sh b/example-build-run.sh new file mode 100755 index 00000000000..ddd41734de8 --- /dev/null +++ b/example-build-run.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -x +set -euvo pipefail +IFS=$'\n\t' + +# Requies Node.js version 4.x +# Do not run as root + +DEPLOY_DIR=/var/www/rocket.chat + +### BUILD +meteor npm install + +# on the very first build, meteor build command should fail due to a bug on emojione package (related to phantomjs installation) +# the command below forces the error to happen before build command (not needed on subsequent builds) +set +e +meteor add rocketchat:lib +set -e + +meteor build --server-only --directory $DEPLOY_DIR + +### RUN +cd $DEPLOY_DIR/bundle/programs/server +npm install + +cd $DEPLOY_DIR/bundle +NODE_ENV=production \ +PORT=3000 \ +ROOT_URL=http://localhost:3000 \ +MONGO_URL=mongodb://localhost:27017/rocketchat \ +MONGO_OPLOG_URL=mongodb://localhost:27017/local \ +node main.js diff --git a/example-build.sh b/example-build.sh deleted file mode 100755 index 06ac6246124..00000000000 --- a/example-build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -x -set -euvo pipefail -IFS=$'\n\t' - -# Build -export NODE_ENV=production -meteor add rocketchat:internal-hubot -meteor build --server https://demo.rocket.chat --directory /var/www/rocket.chat - -# Run -export METEOR_SETTINGS=$(cat settings.json) -cd /var/www/rocket.chat/bundle/programs/server -npm install -cd /var/www/rocket.chat/current -pm2 startOrRestart /var/www/rocket.chat/current/pm2.json diff --git a/package-lock.json b/package-lock.json index c62356e1666..00125aae0d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4062,7 +4062,7 @@ "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" }, "phantomjs-prebuilt": { - "version": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.13.tgz", + "version": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz", "integrity": "sha1-ZlVq2ell2JPKWn3J52PffoaX920=", "dev": true, "dependencies": { diff --git a/package.json b/package.json index f7d366b5bab..07711bd921f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.57.0-develop", + "version": "0.59.0-develop", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" @@ -23,6 +23,14 @@ "name": "Gabriel Engel", "email": "gabriel.engel@rocket.chat" }, + { + "name": "Guilherme Gazzo", + "email": "guilherme.gazzo@rocket.chat" + }, + { + "name": "Karl Prieb", + "email": "karl.priebk@rocket.chat" + }, { "name": "Marcelo Schmidt", "email": "marcelo.schmidt@rocket.chat" @@ -54,7 +62,7 @@ "start": "meteor npm i && meteor", "lint": "eslint .", "lint-fix": "eslint . --fix", - "stylelint": "stylelint packages/**/*.{less,css}", + "stylelint": "stylelint packages/**/*.css", "test": "node .scripts/start.js", "deploy": "npm run build && pm2 startOrRestart pm2.json", "chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests/end-to-end", @@ -79,31 +87,33 @@ "devDependencies": { "babel-mocha-es6-compiler": "^0.1.0", "babel-plugin-array-includes": "^2.0.3", - "chimp": "^0.49.0", - "conventional-changelog-cli": "^1.3.1", - "eslint": "^4.0.0", + "chimp": "^0.49.1", + "conventional-changelog-cli": "^1.3.2", + "eslint": "^4.5.0", "postcss-cssnext": "^2.11.0", - "postcss-smart-import": "^0.7.4", - "simple-git": "^1.73.0", - "stylelint": "^7.11.1", + "postcss-smart-import": "^0.7.5", + "simple-git": "^1.75.0", + "stylelint": "^8.0.0", + "stylelint-order": "^0.6.0", "supertest": "^3.0.0" }, "dependencies": { - "@google-cloud/storage": "^1.1.1", - "aws-sdk": "^2.73.0", - "babel-runtime": "^6.23.0", + "@google-cloud/storage": "^1.2.1", + "aws-sdk": "^2.100.0", + "babel-runtime": "^6.26.0", "bcrypt": "^1.0.2", - "codemirror": "^5.26.0", - "file-type": "^5.2.0", + "codemirror": "^5.28.0", + "file-type": "^6.1.0", "highlight.js": "^9.12.0", "jquery": "^3.2.1", - "mime-db": "^1.28.0", + "mime-db": "^1.29.0", "mime-type": "^3.0.5", "moment": "^2.18.1", "moment-timezone": "^0.5.13", "photoswipe": "^4.1.2", - "prom-client": "^9.1.1", - "semver": "^5.3.0", - "toastr": "^2.1.2" + "prom-client": "^10.0.3", + "semver": "^5.4.1", + "toastr": "^2.1.2", + "wolfy87-eventemitter": "^5.2.2" } } diff --git a/packages/meteor-autocomplete/client/autocomplete-client.js b/packages/meteor-autocomplete/client/autocomplete-client.js index eecd217c0de..ae872d9ac5b 100755 --- a/packages/meteor-autocomplete/client/autocomplete-client.js +++ b/packages/meteor-autocomplete/client/autocomplete-client.js @@ -1,5 +1,5 @@ /* globals Deps, getCaretCoordinates*/ -const AutoCompleteRecords = new Mongo.Collection('autocompleteRecords'); +import AutoCompleteRecords from './collection'; const isServerSearch = function(rule) { return _.isString(rule.collection); @@ -74,6 +74,11 @@ this.AutoComplete = class { this.limit = settings.limit || 5; this.position = settings.position || 'bottom'; this.rules = settings.rules; + this.selector = { + constainer: '.-autocomplete-container', + item: '.-autocomplete-item', + ...settings.selector + }; const rules = this.rules; Object.keys(rules).forEach(key => { @@ -258,8 +263,8 @@ this.AutoComplete = class { } onItemHover(doc, e) { - this.tmplInst.$('.-autocomplete-item').removeClass('selected'); - $(e.target).closest('.-autocomplete-item').addClass('selected'); + this.tmplInst.$(this.selector.item).removeClass('selected'); + $(e.target).closest(this.selector.item).addClass('selected'); } filteredList() { @@ -305,7 +310,7 @@ this.AutoComplete = class { // Replace text with currently selected item select() { - const node = this.tmplInst.find('.-autocomplete-item.selected'); + const node = this.tmplInst.find(`${ this.selector.item }.selected`); if (node == null) { return false; } @@ -376,7 +381,7 @@ this.AutoComplete = class { positionContainer() { // First render; Pick the first item and set css whenever list gets shown - let pos; + let pos = {}; const position = this.$element.position(); const rule = this.matchedRule(); const offset = getCaretCoordinates(this.element, this.element.selectionStart); @@ -384,10 +389,11 @@ this.AutoComplete = class { // In whole-field positioning, we don't move the container and make it the // full width of the field. if (rule && isWholeField(rule)) { - pos = { - left: position.left, - width: this.$element.outerWidth() //position.offsetWidth - }; + pos.left = position.left; + if (rule.doNotChangeWidth !== false) { + pos.width = this.$element.outerWidth(); //position.offsetWidth + + } } else { //Normal positioning, at token word pos = { left: position.left + offset.left }; } @@ -398,36 +404,36 @@ this.AutoComplete = class { } else { pos.top = position.top + offset.top + parseInt(this.$element.css('font-size')); } - this.tmplInst.$('.-autocomplete-container').css(pos); + this.tmplInst.$(this.selector.container).css(pos); } ensureSelection() { // Re-render; make sure selected item is something in the list or none if list empty - const selectedItem = this.tmplInst.$('.-autocomplete-item.selected'); + const selectedItem = this.tmplInst.$(`${ this.selector.item }.selected`); if (!selectedItem.length) { // Select anything - this.tmplInst.$('.-autocomplete-item:first-child').addClass('selected'); + this.tmplInst.$(`${ this.selector.item }:first-child`).addClass('selected'); } } // Select next item in list next() { - const currentItem = this.tmplInst.$('.-autocomplete-item.selected'); + const currentItem = this.tmplInst.$(`${ this.selector.item }.selected`); if (!currentItem.length) { - return; + return this.tmplInst.$(`${ this.selector.item }:first-child`).addClass('selected'); } currentItem.removeClass('selected'); const next = currentItem.next(); if (next.length) { next.addClass('selected'); } else { //End of list or lost selection; Go back to first item - this.tmplInst.$('.-autocomplete-item:first-child').addClass('selected'); + this.tmplInst.$(`${ this.selector.item }:first-child`).addClass('selected'); } } //Select previous item in list prev() { - const currentItem = this.tmplInst.$('.-autocomplete-item.selected'); + const currentItem = this.tmplInst.$(`${ this.selector.item }.selected`); if (!currentItem.length) { return; //Don't try to iterate an empty list } @@ -436,7 +442,7 @@ this.AutoComplete = class { if (prev.length) { prev.addClass('selected'); } else { //Beginning of list or lost selection; Go to end of list - this.tmplInst.$('.-autocomplete-item:last-child').addClass('selected'); + this.tmplInst.$(`${ this.selector.item }:last-child`).addClass('selected'); } } diff --git a/packages/meteor-autocomplete/client/collection.js b/packages/meteor-autocomplete/client/collection.js new file mode 100644 index 00000000000..0e701754b2d --- /dev/null +++ b/packages/meteor-autocomplete/client/collection.js @@ -0,0 +1 @@ +export default new Mongo.Collection('autocompleteRecords'); diff --git a/packages/meteor-autocomplete/client/templates.js b/packages/meteor-autocomplete/client/templates.js index 97b2e259713..5b69d1e69c1 100755 --- a/packages/meteor-autocomplete/client/templates.js +++ b/packages/meteor-autocomplete/client/templates.js @@ -62,7 +62,7 @@ Template._autocompleteContainer.destroyed = function() { Template._autocompleteContainer.events({ // t.data is the AutoComplete instance; `this` is the data item - 'click .-autocomplete-item'(e, t) { + 'click .-autocomplete-item, click [data-autocomplete]'(e, t) { t.data.onItemClick(this, e); }, 'mouseenter .-autocomplete-item'(e, t) { @@ -78,3 +78,4 @@ Template._autocompleteContainer.helpers({ return this.matchedRule().noMatchTemplate || Template._noMatch; } }); +export { acEvents, attributes, autocompleteHelpers }; diff --git a/packages/meteor-autocomplete/package.js b/packages/meteor-autocomplete/package.js index ab887e0432a..a8558288787 100755 --- a/packages/meteor-autocomplete/package.js +++ b/packages/meteor-autocomplete/package.js @@ -25,17 +25,4 @@ Package.onUse(function(api) { ], 'server'); api.export('Autocomplete', 'server'); - api.export('AutocompleteTest', {testOnly: true}); -}); - -Package.onTest(function(api) { - api.use('mizzao:autocomplete'); - - api.use('mongo'); - api.use('tinytest'); - - api.addFiles('tests/rule_tests.coffee', 'client'); - api.addFiles('tests/regex_tests.coffee', 'client'); - api.addFiles('tests/param_tests.coffee', 'client'); - api.addFiles('tests/security_tests.coffee'); }); diff --git a/packages/rocketchat-2fa/client/accountSecurity.html b/packages/rocketchat-2fa/client/accountSecurity.html index 9ed51e09d06..ad8d6a1f231 100644 --- a/packages/rocketchat-2fa/client/accountSecurity.html +++ b/packages/rocketchat-2fa/client/accountSecurity.html @@ -14,7 +14,7 @@
- WARNING: Once you enable this, you will not be able to login on the native mobile apps (Rocket.Chat+) using your password until they implement the 2FA. + {{_ "Two-factor_authentication_native_mobile_app_warning"}}
{{#if isEnabled}} diff --git a/packages/rocketchat-action-links/client/stylesheets/actionLinks.less b/packages/rocketchat-action-links/client/stylesheets/actionLinks.css similarity index 78% rename from packages/rocketchat-action-links/client/stylesheets/actionLinks.less rename to packages/rocketchat-action-links/client/stylesheets/actionLinks.css index 4d6eea113a9..1b5a9977c5f 100644 --- a/packages/rocketchat-action-links/client/stylesheets/actionLinks.less +++ b/packages/rocketchat-action-links/client/stylesheets/actionLinks.css @@ -1,25 +1,31 @@ .message { - .actionLinks { - padding: 0; + & .actionLinks { margin-top: 4px; margin-bottom: 4px; + padding: 0; + text-align: center; - li { - cursor: pointer; + & li { position: relative; + + display: inline; + padding-right: 2px; + list-style: none; - display: inline; - .action-link { + cursor: pointer; + + & .action-link { + margin: 0 2px; padding: 5px; + border-radius: 7px; - margin: 0 2px; } } - li:last-child::after { + & li:last-child::after { content: none; } } diff --git a/packages/rocketchat-action-links/package.js b/packages/rocketchat-action-links/package.js index 9ddda236efa..b85ae7d17bc 100644 --- a/packages/rocketchat-action-links/package.js +++ b/packages/rocketchat-action-links/package.js @@ -11,14 +11,13 @@ Package.onUse(function(api) { api.use('rocketchat:lib'); api.use('rocketchat:theme'); api.use('rocketchat:ui'); - api.use('less'); api.addFiles('both/lib/actionLinks.js'); api.addFiles('client/lib/actionLinks.js', 'client'); api.addFiles('client/init.js', 'client'); - api.addFiles('client/stylesheets/actionLinks.less', 'client'); + api.addFiles('client/stylesheets/actionLinks.css', 'client'); api.addFiles('server/actionLinkHandler.js', 'server'); }); diff --git a/packages/rocketchat-analytics/client/loadScript.js b/packages/rocketchat-analytics/client/loadScript.js index ee5ff00380b..d09d67f7277 100644 --- a/packages/rocketchat-analytics/client/loadScript.js +++ b/packages/rocketchat-analytics/client/loadScript.js @@ -2,6 +2,10 @@ Template.body.onRendered(() => { Tracker.autorun((c) => { const piwikUrl = RocketChat.settings.get('PiwikAnalytics_enabled') && RocketChat.settings.get('PiwikAnalytics_url'); const piwikSiteId = piwikUrl && RocketChat.settings.get('PiwikAnalytics_siteId'); + const piwikPrependDomain = piwikUrl && RocketChat.settings.get('PiwikAnalytics_prependDomain'); + const piwikCookieDomain = piwikUrl && RocketChat.settings.get('PiwikAnalytics_cookieDomain'); + const piwikDomains = piwikUrl && RocketChat.settings.get('PiwikAnalytics_domains'); + const piwikAdditionalTracker = piwikUrl && RocketChat.settings.get('PiwikAdditionalTrackers'); const googleId = RocketChat.settings.get('GoogleAnalytics_enabled') && RocketChat.settings.get('GoogleAnalytics_ID'); if (piwikSiteId || googleId) { c.stop(); @@ -14,7 +18,31 @@ Template.body.onRendered(() => { window._paq.push(['trackPageView']); window._paq.push(['enableLinkTracking']); + if (piwikPrependDomain) { + window._paq.push(['setDocumentTitle', `${ window.location.hostname }/${ document.title }`]); + } + const upperLevelDomain = `*.${ window.location.hostname.split('.').slice(1).join('.') }`; + if (piwikCookieDomain) { + window._paq.push(['setCookieDomain', upperLevelDomain]); + } + if (piwikDomains) { + // array + const domainsArray = piwikDomains.split(/\n/); + const domains = []; + for (let i = 0; i < domainsArray.length; i++) { + // only push domain if it contains a non whitespace character. + if (/\S/.test(domainsArray[i])) { + domains.push(`*.${ domainsArray[i].trim() }`); + } + } + window._paq.push(['setDomains', domains]); + } (() => { + const addTrackers = JSON.parse(piwikAdditionalTracker); + for (let i = 0; i < addTrackers.length; i++) { + const tracker = addTrackers[i]; + window._paq.push(['addTracker', `${ tracker['trackerURL'] }piwik.php`, tracker['siteId']]); + } window._paq.push(['setTrackerUrl', `${ piwikUrl }piwik.php`]); window._paq.push(['setSiteId', Number.parseInt(piwikSiteId)]); const d = document; diff --git a/packages/rocketchat-analytics/client/trackEvents.js b/packages/rocketchat-analytics/client/trackEvents.js index b7f01b72522..72ce8276fb7 100644 --- a/packages/rocketchat-analytics/client/trackEvents.js +++ b/packages/rocketchat-analytics/client/trackEvents.js @@ -8,7 +8,7 @@ function trackEvent(category, action, label) { } if (!window._paq || window.ga) { - //Trigger the trackPageView manually as the page views don't seem to be tracked + //Trigger the trackPageView manually as the page views are only loaded when the loadScript.js code is executed FlowRouter.triggers.enter([(route) => { if (window._paq) { const http = location.protocol; diff --git a/packages/rocketchat-analytics/server/settings.js b/packages/rocketchat-analytics/server/settings.js index e639cf8eafe..3fad08bba1e 100644 --- a/packages/rocketchat-analytics/server/settings.js +++ b/packages/rocketchat-analytics/server/settings.js @@ -18,6 +18,32 @@ RocketChat.settings.addGroup('Analytics', function addSettings() { i18nLabel: 'Client_ID', enableQuery }); + this.add('PiwikAdditionalTrackers', '', { + type: 'string', + multiline: true, + public: true, + i18nLabel: 'PiwikAdditionalTrackers', + enableQuery + }); + this.add('PiwikAnalytics_prependDomain', false, { + type: 'boolean', + public: true, + i18nLabel: 'PiwikAnalytics_prependDomain', + enableQuery + }); + this.add('PiwikAnalytics_cookieDomain', false, { + type: 'boolean', + public: true, + i18nLabel: 'PiwikAnalytics_cookieDomain', + enableQuery + }); + this.add('PiwikAnalytics_domains', '', { + type: 'string', + multiline: true, + public: true, + i18nLabel: 'PiwikAnalytics_domains', + enableQuery + }); }); this.section('Analytics_Google', function() { diff --git a/packages/rocketchat-api/server/v1/channels.js b/packages/rocketchat-api/server/v1/channels.js index 3d2e33387f9..95e10d278eb 100644 --- a/packages/rocketchat-api/server/v1/channels.js +++ b/packages/rocketchat-api/server/v1/channels.js @@ -332,13 +332,22 @@ RocketChat.API.v1.addRoute('channels.leave', { authRequired: true }, { RocketChat.API.v1.addRoute('channels.list', { authRequired: true }, { get: { - //This is like this only to provide an example of how we routes can be defined :X + //This is defined as such only to provide an example of how the routes can be defined :X action() { const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); const ourQuery = Object.assign({}, query, { t: 'c' }); + //Special check for the permissions + if (RocketChat.authz.hasPermission(this.userId, 'view-joined-room')) { + ourQuery.usernames = { + $in: [ this.user.username ] + }; + } else if (!RocketChat.authz.hasPermission(this.userId, 'view-c-room')) { + return RocketChat.API.v1.unauthorized(); + } + const rooms = RocketChat.models.Rooms.find(ourQuery, { sort: sort ? sort : { name: 1 }, skip: offset, diff --git a/packages/rocketchat-api/server/v1/groups.js b/packages/rocketchat-api/server/v1/groups.js index d5c11136d38..f2b38a74761 100644 --- a/packages/rocketchat-api/server/v1/groups.js +++ b/packages/rocketchat-api/server/v1/groups.js @@ -64,6 +64,18 @@ RocketChat.API.v1.addRoute('groups.addOwner', { authRequired: true }, { } }); +RocketChat.API.v1.addRoute('groups.addLeader', { authRequired: true }, { + post() { + const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId }); + const user = this.getUserFromParams(); + Meteor.runAsUser(this.userId, () => { + Meteor.call('addRoomLeader', findResult.rid, user._id); + }); + + return RocketChat.API.v1.success(); + } +}); + //Archives a private group only if it wasn't RocketChat.API.v1.addRoute('groups.archive', { authRequired: true }, { post() { @@ -373,6 +385,20 @@ RocketChat.API.v1.addRoute('groups.removeOwner', { authRequired: true }, { } }); +RocketChat.API.v1.addRoute('groups.removeLeader', { authRequired: true }, { + post() { + const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('removeRoomLeader', findResult.rid, user._id); + }); + + return RocketChat.API.v1.success(); + } +}); + RocketChat.API.v1.addRoute('groups.rename', { authRequired: true }, { post() { if (!this.bodyParams.name || !this.bodyParams.name.trim()) { diff --git a/packages/rocketchat-api/server/v1/users.js b/packages/rocketchat-api/server/v1/users.js index 2a9651c3098..d2fdd1349f4 100644 --- a/packages/rocketchat-api/server/v1/users.js +++ b/packages/rocketchat-api/server/v1/users.js @@ -19,12 +19,17 @@ RocketChat.API.v1.addRoute('users.create', { authRequired: true }, { this.bodyParams.joinDefaultChannels = true; } + if (this.bodyParams.customFields) { + RocketChat.validateCustomFields(this.bodyParams.customFields); + } + const newUserId = RocketChat.saveUser(this.userId, this.bodyParams); if (this.bodyParams.customFields) { - RocketChat.saveCustomFields(newUserId, this.bodyParams.customFields); + RocketChat.saveCustomFieldsWithoutValidation(newUserId, this.bodyParams.customFields); } + if (typeof this.bodyParams.active !== 'undefined') { Meteor.runAsUser(this.userId, () => { Meteor.call('setUserActiveStatus', newUserId, this.bodyParams.active); @@ -105,6 +110,10 @@ RocketChat.API.v1.addRoute('users.info', { authRequired: true }, { RocketChat.API.v1.addRoute('users.list', { authRequired: true }, { get() { + if (!RocketChat.authz.hasPermission(this.userId, 'view-d-room')) { + return RocketChat.API.v1.unauthorized(); + } + const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); @@ -186,7 +195,11 @@ RocketChat.API.v1.addRoute('users.resetAvatar', { authRequired: true }, { RocketChat.API.v1.addRoute('users.setAvatar', { authRequired: true }, { post() { - check(this.bodyParams, { avatarUrl: Match.Maybe(String), userId: Match.Maybe(String) }); + check(this.bodyParams, Match.ObjectIncluding({ + avatarUrl: Match.Maybe(String), + userId: Match.Maybe(String), + username: Match.Maybe(String) + })); let user; if (this.isUserFromParams()) { diff --git a/packages/rocketchat-authorization/client/stylesheets/permissions.less b/packages/rocketchat-authorization/client/stylesheets/permissions.css similarity index 75% rename from packages/rocketchat-authorization/client/stylesheets/permissions.less rename to packages/rocketchat-authorization/client/stylesheets/permissions.css index c970dbf8d1f..5b3fa94211c 100644 --- a/packages/rocketchat-authorization/client/stylesheets/permissions.less +++ b/packages/rocketchat-authorization/client/stylesheets/permissions.css @@ -1,47 +1,61 @@ .permissions-manager { - h2 { - font-weight: bold !important; - font-size: 16px; + & h2 { margin-top: 1em !important; margin-bottom: 1em !important; + border-bottom-width: 1px; + + font-size: 16px; + font-weight: bold !important; } - .permission-grid { - th { - white-space: normal; - text-align: center; + & .permission-grid { + & th { position: relative; + padding-top: 20px; - } - td { text-align: center; + white-space: normal; + } + + & td { width: 10%; + + text-align: center; } - .icon-edit { - font-size: 80%; + & .icon-edit { position: absolute; - padding-left: 2px; top: 0; left: 50%; + + padding-left: 2px; + transform: translateX(-50%); + + font-size: 80%; + } + + & .permission-name { + cursor: default; } } - .empty-role { + & .empty-role { padding: 0.5em !important; } - .form-role { - label { - width: 150px; + & .form-role { + & label { display: inline-block; + + width: 150px; + text-align: right; } - .form-buttons { + & .form-buttons { padding-left: 150px; } } diff --git a/packages/rocketchat-authorization/client/usersNameChanged.js b/packages/rocketchat-authorization/client/usersNameChanged.js new file mode 100644 index 00000000000..f64d2417d2f --- /dev/null +++ b/packages/rocketchat-authorization/client/usersNameChanged.js @@ -0,0 +1,14 @@ +/* globals RoomRoles */ +Meteor.startup(function() { + RocketChat.Notifications.onLogged('Users:NameChanged', function({_id, name}) { + RoomRoles.update({ + 'u._id': _id + }, { + $set: { + 'u.name': name + } + }, { + multi: true + }); + }); +}); diff --git a/packages/rocketchat-authorization/client/views/permissions.html b/packages/rocketchat-authorization/client/views/permissions.html index 3d53eb803e4..e0e47d6b426 100644 --- a/packages/rocketchat-authorization/client/views/permissions.html +++ b/packages/rocketchat-authorization/client/views/permissions.html @@ -19,7 +19,7 @@ {{#each permission}} - {{_id}} + {{_ permissionName}}
[{{_id}}] {{#each role}} diff --git a/packages/rocketchat-authorization/client/views/permissions.js b/packages/rocketchat-authorization/client/views/permissions.js index 90f11510414..6205927af5a 100644 --- a/packages/rocketchat-authorization/client/views/permissions.js +++ b/packages/rocketchat-authorization/client/views/permissions.js @@ -21,6 +21,14 @@ Template.permissions.helpers({ } }, + permissionName() { + return `${ this._id }`; + }, + + permissionDescription() { + return `${ this._id }_description`; + }, + hasPermission() { return RocketChat.authz.hasAllPermission('access-permissions'); } diff --git a/packages/rocketchat-authorization/package.js b/packages/rocketchat-authorization/package.js index 4541d7ac1bd..cc368052e89 100644 --- a/packages/rocketchat-authorization/package.js +++ b/packages/rocketchat-authorization/package.js @@ -10,13 +10,11 @@ Package.onUse(function(api) { api.use([ 'ecmascript', 'underscore', - 'rocketchat:lib', - 'less' + 'rocketchat:lib' ]); api.use('mongo', ['client', 'server']); api.use('kadira:flow-router', 'client'); - api.use('less', 'client'); api.use('tracker', 'client'); api.use('templating', 'client'); @@ -34,6 +32,7 @@ Package.onUse(function(api) { api.addFiles('client/requiresPermission.html', ['client']); api.addFiles('client/route.js', ['client']); + api.addFiles('client/usersNameChanged.js', ['client']); // views api.addFiles('client/views/permissions.html', ['client']); @@ -42,7 +41,7 @@ Package.onUse(function(api) { api.addFiles('client/views/permissionsRole.js', ['client']); // stylesheets - api.addFiles('client/stylesheets/permissions.less', 'client'); + api.addFiles('client/stylesheets/permissions.css', 'client'); api.addFiles('server/models/Permissions.js', ['server']); api.addFiles('server/models/Roles.js', ['server']); diff --git a/packages/rocketchat-authorization/server/startup.js b/packages/rocketchat-authorization/server/startup.js index 3fe7771125d..d372b117ba0 100644 --- a/packages/rocketchat-authorization/server/startup.js +++ b/packages/rocketchat-authorization/server/startup.js @@ -46,6 +46,8 @@ Meteor.startup(function() { { _id: 'run-migration', roles : ['admin'] }, { _id: 'set-moderator', roles : ['admin', 'owner'] }, { _id: 'set-owner', roles : ['admin', 'owner'] }, + { _id: 'send-many-messages', roles : ['admin', 'bot'] }, + { _id: 'set-leader', roles : ['admin', 'owner'] }, { _id: 'unarchive-room', roles : ['admin'] }, { _id: 'view-c-room', roles : ['admin', 'user', 'bot', 'anonymous'] }, { _id: 'user-generate-access-token', roles : ['admin'] }, @@ -73,6 +75,7 @@ Meteor.startup(function() { const defaultRoles = [ { name: 'admin', scope: 'Users', description: 'Admin' }, { name: 'moderator', scope: 'Subscriptions', description: 'Moderator' }, + { name: 'leader', scope: 'Subscriptions', description: 'Leader' }, { name: 'owner', scope: 'Subscriptions', description: 'Owner' }, { name: 'user', scope: 'Users', description: '' }, { name: 'bot', scope: 'Users', description: '' }, diff --git a/packages/rocketchat-autolinker/client.js b/packages/rocketchat-autolinker/client/client.js similarity index 90% rename from packages/rocketchat-autolinker/client.js rename to packages/rocketchat-autolinker/client/client.js index fc4d3fe3354..4c91838d5e0 100644 --- a/packages/rocketchat-autolinker/client.js +++ b/packages/rocketchat-autolinker/client/client.js @@ -23,8 +23,10 @@ function AutoLinker(message) { if (match.getType() === 'url') { if (regUrls.test(match.matchedText)) { if (match.matchedText.indexOf(Meteor.absoluteUrl()) === 0) { - const tag = match.buildTag(); // returns an `Autolinker.HtmlTag` instance for an tag - tag.setAttr('target', ''); // sets target to empty, instead of _blank + // returns an `Autolinker.HtmlTag` instance for an tag + const tag = match.buildTag(); + // sets target to empty, instead of _blank + tag.setAttr('target', ''); return tag; } diff --git a/packages/rocketchat-autolinker/package.js b/packages/rocketchat-autolinker/package.js index 5ce89297d45..4b8c67381d8 100644 --- a/packages/rocketchat-autolinker/package.js +++ b/packages/rocketchat-autolinker/package.js @@ -13,7 +13,7 @@ Package.onUse(function(api) { api.use('ecmascript'); api.use('rocketchat:lib'); - api.addFiles('client.js', 'client'); + api.addFiles('client/client.js', 'client'); - api.addFiles('settings.js', 'server'); + api.addFiles('server/settings.js', 'server'); }); diff --git a/packages/rocketchat-autolinker/settings.js b/packages/rocketchat-autolinker/server/settings.js similarity index 100% rename from packages/rocketchat-autolinker/settings.js rename to packages/rocketchat-autolinker/server/settings.js diff --git a/packages/rocketchat-autotranslate/client/lib/tabBar.js b/packages/rocketchat-autotranslate/client/lib/tabBar.js index 53819c7f000..20afbe1a3a7 100644 --- a/packages/rocketchat-autotranslate/client/lib/tabBar.js +++ b/packages/rocketchat-autotranslate/client/lib/tabBar.js @@ -5,7 +5,7 @@ Meteor.startup(function() { groups: ['channel', 'group', 'direct'], id: 'autotranslate', i18nTitle: 'Auto_Translate', - icon: 'icon-language', + icon: 'language', template: 'autoTranslateFlexTab', order: 20 }); diff --git a/packages/rocketchat-autotranslate/client/stylesheets/autotranslate.less b/packages/rocketchat-autotranslate/client/stylesheets/autotranslate.css similarity index 71% rename from packages/rocketchat-autotranslate/client/stylesheets/autotranslate.less rename to packages/rocketchat-autotranslate/client/stylesheets/autotranslate.css index 9a1905ef017..480502c4371 100644 --- a/packages/rocketchat-autotranslate/client/stylesheets/autotranslate.less +++ b/packages/rocketchat-autotranslate/client/stylesheets/autotranslate.css @@ -1,56 +1,63 @@ .flex-tab { - .autotranslate { - ul { - li { + & .autotranslate { + & ul { + & li { margin-bottom: 20px; } } - form { - label { + & form { + & label { display: block; - font-weight: bold; + margin-bottom: 5px; + + font-weight: bold; } - div span { + & div span { font-size: 14px; - i.icon-pencil { - font-size: 12px; + & i.icon-pencil { margin-left: 3px; + + font-size: 12px; } } } - .submit { + & .submit { margin-top: 30px; + text-align: center; } - [data-edit] { + & [data-edit] { cursor: pointer; } } } .message { - .translated { - border-left: 1px dotted; - padding-left: 3px; + & .translated { margin-left: 3px; + padding-left: 3px; + + border-left: 1px dotted; - i.icon-language.loading { + & i.icon-language.loading { display: inline-block; + animation: spinh 2000ms infinite linear; } } &.sequential { - .translated { - border-left: 0; + & .translated { position: absolute; left: 5px; + + border-left: 0; } } } diff --git a/packages/rocketchat-autotranslate/package.js b/packages/rocketchat-autotranslate/package.js index 24cac3d6431..5724f020580 100644 --- a/packages/rocketchat-autotranslate/package.js +++ b/packages/rocketchat-autotranslate/package.js @@ -9,14 +9,13 @@ Package.onUse(function(api) { api.use([ 'ecmascript', 'ddp-rate-limiter', - 'less', 'rocketchat:lib' ]); api.use('templating', 'client'); api.addFiles([ - 'client/stylesheets/autotranslate.less', + 'client/stylesheets/autotranslate.css', 'client/lib/autotranslate.js', 'client/lib/actionButton.js', 'client/lib/tabBar.js', diff --git a/packages/rocketchat-cas/cas_client.js b/packages/rocketchat-cas/client/cas_client.js similarity index 93% rename from packages/rocketchat-cas/cas_client.js rename to packages/rocketchat-cas/client/cas_client.js index b8d2cc8b0ae..b0521fdba38 100644 --- a/packages/rocketchat-cas/cas_client.js +++ b/packages/rocketchat-cas/client/cas_client.js @@ -33,7 +33,9 @@ Meteor.loginWithCas = function(options, callback) { } const appUrl = Meteor.absoluteUrl().replace(/\/$/, '') + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX; - const loginUrl = `${ login_url }?service=${ appUrl }/_cas/${ credentialToken }`; + // check if the provided CAS URL already has some parameters + const delim = (login_url.split('?').length > 1) ? '&' : '?'; + const loginUrl = `${ login_url }${ delim }service=${ appUrl }/_cas/${ credentialToken }`; const popup = openCenteredPopup( loginUrl, diff --git a/packages/rocketchat-cas/package.js b/packages/rocketchat-cas/package.js index b584f5f9a92..d8919bbbe9e 100644 --- a/packages/rocketchat-cas/package.js +++ b/packages/rocketchat-cas/package.js @@ -18,12 +18,11 @@ Package.onUse(function(api) { api.use('ecmascript'); // Server files - api.add_files('cas_rocketchat.js', 'server'); - api.add_files('cas_server.js', 'server'); + api.add_files('server/cas_rocketchat.js', 'server'); + api.add_files('server/cas_server.js', 'server'); // Client files - api.add_files('cas_client.js', 'client'); - + api.add_files('client/cas_client.js', 'client'); }); Npm.depends({ diff --git a/packages/rocketchat-cas/cas_rocketchat.js b/packages/rocketchat-cas/server/cas_rocketchat.js similarity index 100% rename from packages/rocketchat-cas/cas_rocketchat.js rename to packages/rocketchat-cas/server/cas_rocketchat.js diff --git a/packages/rocketchat-cas/cas_server.js b/packages/rocketchat-cas/server/cas_server.js similarity index 99% rename from packages/rocketchat-cas/cas_server.js rename to packages/rocketchat-cas/server/cas_server.js index d25e257daa7..deeebb39806 100644 --- a/packages/rocketchat-cas/cas_server.js +++ b/packages/rocketchat-cas/server/cas_server.js @@ -249,7 +249,9 @@ Accounts.registerLoginHandler(function(options) { ts: new Date(), open: true, alert: true, - unread: 1 + unread: 1, + userMentions: 1, + groupMentions: 0 }); } }); diff --git a/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js b/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js index 341a5b4c656..5aaed532ae7 100644 --- a/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js +++ b/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js @@ -21,12 +21,13 @@ RocketChat.ChannelSettings = new class { }); } - getOptions(currentData, group) { + getOptions(currentData = {}, group) { const allOptions = _.toArray(this.options.get()); const allowedOptions = _.compact(_.map(allOptions, function(option) { + const ret = {...option}; if (option.validation == null || option.validation()) { - option.data = Object.assign({}, typeof option.data === 'function' ? option.data() : option.data, currentData); - return option; + ret.data = Object.assign({}, typeof option.data === 'function' ? option.data() : option.data, currentData); + return ret; } })).filter(function(option) { return !group || !option.group || option.group.includes(group); diff --git a/packages/rocketchat-channel-settings/client/startup/tabBar.js b/packages/rocketchat-channel-settings/client/startup/tabBar.js index 8728bc01ddd..8fa4e08348b 100644 --- a/packages/rocketchat-channel-settings/client/startup/tabBar.js +++ b/packages/rocketchat-channel-settings/client/startup/tabBar.js @@ -4,7 +4,7 @@ Meteor.startup(() => { id: 'channel-settings', anonymous: true, i18nTitle: 'Room_Info', - icon: 'icon-info-circled', + icon: 'info-circled', template: 'channelSettings', order: 0 }); diff --git a/packages/rocketchat-channel-settings/client/startup/trackSettingsChange.js b/packages/rocketchat-channel-settings/client/startup/trackSettingsChange.js index d3c7a0bf084..8df8addd789 100644 --- a/packages/rocketchat-channel-settings/client/startup/trackSettingsChange.js +++ b/packages/rocketchat-channel-settings/client/startup/trackSettingsChange.js @@ -22,9 +22,11 @@ Meteor.startup(function() { Tracker.nonreactive(() => { if (msg.t === 'r') { if (Session.get('openedRoom') === msg.rid) { - const type = FlowRouter.current().route.name === 'channel' ? 'c' : 'p'; - RoomManager.close(type + FlowRouter.getParam('name')); - FlowRouter.go(FlowRouter.current().route.name, { name: msg.msg }, FlowRouter.current().queryParams); + const room = ChatRoom.findOne(msg.rid); + if (room.name !== FlowRouter.getParam('name')) { + RoomManager.close(room.t + FlowRouter.getParam('name')); + RocketChat.roomTypes.openRouteLink(room.t, room, FlowRouter.current().queryParams); + } } } }); diff --git a/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.less b/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css similarity index 74% rename from packages/rocketchat-channel-settings/client/stylesheets/channel-settings.less rename to packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css index 5bfe3351fd9..1134444d829 100644 --- a/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.less +++ b/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css @@ -1,97 +1,113 @@ .flex-tab { - .channel-settings { - ul { - li { + & .channel-settings { + & ul { + & li { margin-bottom: 20px; } } - label { + & label { display: block; - font-weight: bold; + margin-bottom: 5px; + font-size: 14px; + font-weight: bold; } - .current-setting { - font-size: 14px; - width: calc(~"100% - 38px"); + & .current-setting { display: inline-block; - vertical-align: middle; + + width: calc(100% - 38px); min-height: 20px; - cursor: pointer; margin-top: 3px; + cursor: pointer; + vertical-align: middle; + + font-size: 14px; + &[data-edit="false"] { cursor: inherit; user-select: initial; } } - .editing { + & .editing { + margin: -2px 0 -1px -9px; padding-right: 80px; + font-size: 14px; - margin: -2px 0 -1px -9px; } - .buttons { + & .buttons { position: absolute; top: -1px; - bottom: 0; right: 10px; + bottom: 0; + border-radius: 0 4px 4px 0; - .button { + & .button { padding: 8px; } } - .button.edit { - padding: 8px; - font-size: 12px; - vertical-align: middle; + & .button.edit { display: inline-block; visibility: hidden; + + padding: 8px; + + vertical-align: middle; + + font-size: 12px; } - .submit { + & .submit { margin-top: 30px; + text-align: center; } - .boolean { + & .boolean { font-size: 0; - > label { - width: calc(~"100% - 45px"); + & > label { display: inline-block; + + width: calc(100% - 45px); + vertical-align: middle; } - .setting-block { - width: 40px; + & .setting-block { display: inline-block; - vertical-align: middle; + + width: 40px; margin-left: -5px; + + vertical-align: middle; } } - .setting-block { + & .setting-block { position: relative; + font-size: 0; - .loading-animation { + & .loading-animation { top: 30px; } &:hover { - .button.edit { + & .button.edit { visibility: visible; } } } - nav { + & nav { text-align: right; } } diff --git a/packages/rocketchat-channel-settings/client/views/channelSettings.html b/packages/rocketchat-channel-settings/client/views/channelSettings.html index f4475a56244..e8b3271be88 100644 --- a/packages/rocketchat-channel-settings/client/views/channelSettings.html +++ b/packages/rocketchat-channel-settings/client/views/channelSettings.html @@ -1,106 +1,104 @@ diff --git a/packages/rocketchat-channel-settings/client/views/channelSettings.js b/packages/rocketchat-channel-settings/client/views/channelSettings.js index d24806ba20b..d2ac089a722 100644 --- a/packages/rocketchat-channel-settings/client/views/channelSettings.js +++ b/packages/rocketchat-channel-settings/client/views/channelSettings.js @@ -16,6 +16,9 @@ Template.channelSettings.helpers({ } return true; } + if (this.$value.getValue) { + return this.$value.getValue(obj, key); + } return obj && obj[key]; }, showSetting(setting, room) { @@ -152,22 +155,30 @@ Template.channelSettings.onCreated(function() { canEdit(room) { return RocketChat.authz.hasAllPermission('edit-room', room._id); }, + getValue(room) { + if (RocketChat.settings.get('UI_Allow_room_names_with_special_chars')) { + return room.fname || room.name; + } + return room.name; + }, save(value, room) { let nameValidation; if (!RocketChat.authz.hasAllPermission('edit-room', room._id) || (room.t !== 'c' && room.t !== 'p')) { return toastr.error(t('error-not-allowed')); } - try { - nameValidation = new RegExp(`^${ RocketChat.settings.get('UTF8_Names_Validation') }$`); - } catch (error1) { - nameValidation = new RegExp('^[0-9a-zA-Z-_.]+$'); - } - if (!nameValidation.test(value)) { - return toastr.error(t('error-invalid-room-name', { - room_name: { - name: value - } - })); + if (!RocketChat.settings.get('UI_Allow_room_names_with_special_chars')) { + try { + nameValidation = new RegExp(`^${ RocketChat.settings.get('UTF8_Names_Validation') }$`); + } catch (error1) { + nameValidation = new RegExp('^[0-9a-zA-Z-_.]+$'); + } + if (!nameValidation.test(value)) { + return toastr.error(t('error-invalid-room-name', { + room_name: { + name: value + } + })); + } } Meteor.call('saveRoomSettings', room._id, 'roomName', value, function(err) { if (err) { diff --git a/packages/rocketchat-channel-settings/package.js b/packages/rocketchat-channel-settings/package.js index 6b4a60a42e7..3f35a159bb4 100644 --- a/packages/rocketchat-channel-settings/package.js +++ b/packages/rocketchat-channel-settings/package.js @@ -11,7 +11,6 @@ Package.onUse(function(api) { 'reactive-var', 'tracker', 'templating', - 'less', 'rocketchat:lib' ]); @@ -22,7 +21,7 @@ Package.onUse(function(api) { 'client/startup/trackSettingsChange.js', 'client/views/channelSettings.html', 'client/views/channelSettings.js', - 'client/stylesheets/channel-settings.less' + 'client/stylesheets/channel-settings.css' ], 'client'); api.addFiles([ diff --git a/packages/rocketchat-channel-settings/server/functions/saveRoomName.js b/packages/rocketchat-channel-settings/server/functions/saveRoomName.js index 6eea873affd..2696e1d5f07 100644 --- a/packages/rocketchat-channel-settings/server/functions/saveRoomName.js +++ b/packages/rocketchat-channel-settings/server/functions/saveRoomName.js @@ -1,35 +1,21 @@ -RocketChat.saveRoomName = function(rid, name, user, sendMessage = true) { +RocketChat.saveRoomName = function(rid, displayName, user, sendMessage = true) { const room = RocketChat.models.Rooms.findOneById(rid); if (room.t !== 'c' && room.t !== 'p') { throw new Meteor.Error('error-not-allowed', 'Not allowed', { - 'function': 'RocketChat.saveRoomName' + 'function': 'RocketChat.saveRoomdisplayName' }); } - let nameValidation; - try { - nameValidation = new RegExp(`^${ RocketChat.settings.get('UTF8_Names_Validation') }$`); - } catch (error) { - nameValidation = new RegExp('^[0-9a-zA-Z-_.]+$'); - } - if (!nameValidation.test(name)) { - throw new Meteor.Error('error-invalid-room-name', `${ name } is not a valid room name. Use only letters, numbers, hyphens and underscores`, { - 'function': 'RocketChat.saveRoomName', - room_name: name - }); - } - if (name === room.name) { + if (displayName === room.name) { return; } - if (RocketChat.models.Rooms.findOneByName(name)) { - throw new Meteor.Error('error-duplicate-channel-name', `A channel with name '${ name }' exists`, { - 'function': 'RocketChat.saveRoomName', - channel_name: name - }); - } - const update = RocketChat.models.Rooms.setNameById(rid, name) && RocketChat.models.Subscriptions.updateNameAndAlertByRoomId(rid, name); + + const slugifiedRoomName = RocketChat.getValidRoomName(displayName, rid); + + const update = RocketChat.models.Rooms.setNameById(rid, slugifiedRoomName, displayName) && RocketChat.models.Subscriptions.updateNameAndAlertByRoomId(rid, slugifiedRoomName, displayName); + if (update && sendMessage) { - RocketChat.models.Messages.createRoomRenamedWithRoomIdRoomNameAndUser(rid, name, user); + RocketChat.models.Messages.createRoomRenamedWithRoomIdRoomNameAndUser(rid, displayName, user); } - return name; + return displayName; }; diff --git a/packages/rocketchat-chatops/client/tabBar.js b/packages/rocketchat-chatops/client/tabBar.js index 26acf7590be..90343ff17b0 100644 --- a/packages/rocketchat-chatops/client/tabBar.js +++ b/packages/rocketchat-chatops/client/tabBar.js @@ -2,29 +2,27 @@ Meteor.startup(() => Tracker.autorun(function() { if (RocketChat.TabBar) { if (RocketChat.settings && RocketChat.settings.get('Chatops_Enabled')) { - console.log('Adding chatops to tabbar'); RocketChat.TabBar.addButton({ groups: ['channel', 'group', 'direct'], id: 'chatops-button2', i18nTitle: 'rocketchat-chatops:Chatops_Title', - icon: 'icon-hubot', + icon: 'hubot', template: 'chatops-dynamicUI', order: 4 }); - console.log('Adding chatops to tabbar'); - return RocketChat.TabBar.addButton({ + RocketChat.TabBar.addButton({ groups: ['channel', 'group', 'direct'], id: 'chatops-button3', i18nTitle: 'rocketchat-chatops:Chatops_Title', - icon: 'icon-inbox', + icon: 'inbox', template: 'chatops_droneflight', width: 675, order: 5 }); } else { RocketChat.TabBar.removeButton('chatops-button2'); - return RocketChat.TabBar.removeButton('chatops-button3'); + RocketChat.TabBar.removeButton('chatops-button3'); } } }) diff --git a/packages/rocketchat-colors/client.js b/packages/rocketchat-colors/client/client.js similarity index 100% rename from packages/rocketchat-colors/client.js rename to packages/rocketchat-colors/client/client.js diff --git a/packages/rocketchat-colors/style.css b/packages/rocketchat-colors/client/style.css similarity index 98% rename from packages/rocketchat-colors/style.css rename to packages/rocketchat-colors/client/style.css index e1f3999f69b..a67db45d281 100644 --- a/packages/rocketchat-colors/style.css +++ b/packages/rocketchat-colors/client/style.css @@ -1,16 +1,20 @@ .message-color { display: inline-block; + font-weight: 100; } .message-color-sample { + position: relative; + top: 2px; + + display: inline-block; + width: 14px; height: 14px; - display: inline-block; - border-radius: 3px; margin-right: 3px; margin-left: 2px; + border: 1px solid rgba(0, 0, 0, 0.2); - position: relative; - top: 2px; + border-radius: 3px; } diff --git a/packages/rocketchat-colors/package.js b/packages/rocketchat-colors/package.js index f196ad596f0..2c15bd07395 100644 --- a/packages/rocketchat-colors/package.js +++ b/packages/rocketchat-colors/package.js @@ -9,7 +9,7 @@ Package.onUse(function(api) { api.use('rocketchat:lib'); api.use('ecmascript'); - api.addFiles('client.js', ['client']); - api.addFiles('style.css', ['client']); - api.addFiles('settings.js', ['server']); + api.addFiles('client/client.js', 'client'); + api.addFiles('client/style.css', 'client'); + api.addFiles('server/settings.js', 'server'); }); diff --git a/packages/rocketchat-colors/settings.js b/packages/rocketchat-colors/server/settings.js similarity index 100% rename from packages/rocketchat-colors/settings.js rename to packages/rocketchat-colors/server/settings.js diff --git a/packages/rocketchat-cors/cors.js b/packages/rocketchat-cors/cors.js index 9b07501d8d3..6af8bc10034 100644 --- a/packages/rocketchat-cors/cors.js +++ b/packages/rocketchat-cors/cors.js @@ -2,7 +2,7 @@ import url from 'url'; -WebApp.rawConnectHandlers.use(function(req, res, next) { +WebApp.rawConnectHandlers.use(Meteor.bindEnvironment(function(req, res, next) { if (req._body) { return next(); } @@ -12,7 +12,7 @@ WebApp.rawConnectHandlers.use(function(req, res, next) { if (req.headers['content-type'] !== '' && req.headers['content-type'] !== undefined) { return next(); } - if (req.url.indexOf('/ufs/') === 0) { + if (req.url.indexOf(`${ __meteor_runtime_config__.ROOT_URL_PATH_PREFIX }/ufs/`) === 0) { return next(); } @@ -36,7 +36,7 @@ WebApp.rawConnectHandlers.use(function(req, res, next) { return next(); }); -}); +})); WebApp.rawConnectHandlers.use(function(req, res, next) { if (/^\/(api|_timesync|sockjs|tap-i18n|__cordova)(\/|$)/.test(req.url)) { diff --git a/packages/rocketchat-custom-oauth/custom_oauth_client.js b/packages/rocketchat-custom-oauth/client/custom_oauth_client.js similarity index 100% rename from packages/rocketchat-custom-oauth/custom_oauth_client.js rename to packages/rocketchat-custom-oauth/client/custom_oauth_client.js diff --git a/packages/rocketchat-custom-oauth/package.js b/packages/rocketchat-custom-oauth/package.js index e4a397f479e..ce878e1295d 100644 --- a/packages/rocketchat-custom-oauth/package.js +++ b/packages/rocketchat-custom-oauth/package.js @@ -20,9 +20,9 @@ Package.onUse(function(api) { api.use('http', 'server'); - api.mainModule('custom_oauth_client.js', 'client'); + api.mainModule('client/custom_oauth_client.js', 'client'); - api.mainModule('custom_oauth_server.js', 'server'); + api.mainModule('server/custom_oauth_server.js', 'server'); api.export('CustomOAuth'); }); diff --git a/packages/rocketchat-custom-oauth/custom_oauth_server.js b/packages/rocketchat-custom-oauth/server/custom_oauth_server.js similarity index 100% rename from packages/rocketchat-custom-oauth/custom_oauth_server.js rename to packages/rocketchat-custom-oauth/server/custom_oauth_server.js diff --git a/packages/rocketchat-custom-sounds/assets/stylesheets/customSoundsAdmin.less b/packages/rocketchat-custom-sounds/assets/stylesheets/customSoundsAdmin.css similarity index 80% rename from packages/rocketchat-custom-sounds/assets/stylesheets/customSoundsAdmin.less rename to packages/rocketchat-custom-sounds/assets/stylesheets/customSoundsAdmin.css index 4845388adc8..c96075a621e 100644 --- a/packages/rocketchat-custom-sounds/assets/stylesheets/customSoundsAdmin.less +++ b/packages/rocketchat-custom-sounds/assets/stylesheets/customSoundsAdmin.css @@ -1,83 +1,91 @@ .sound-info { - .icon-play-circled { + & .icon-play-circled { cursor: pointer; } } .sound-view { z-index: 15; - overflow-y: auto; + overflow-x: hidden; + overflow-y: auto; - .thumb { + & .thumb { width: 100%; height: 350px; padding: 20px; } - nav { + & nav { padding: 0 20px; } - .info { - white-space: normal; + & .info { padding: 0 20px; - h3 { - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; + white-space: normal; + + & h3 { + overflow: hidden; + + width: 100%; + margin: 8px 0; + user-select: text; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 24px; - margin: 8px 0; line-height: 27px; - text-overflow: ellipsis; - width: 100%; - overflow: hidden; - white-space: nowrap; - i::after { - content: " "; + & i::after { display: inline-block; + width: 8px; height: 8px; - border-radius: 4px; + + content: " "; vertical-align: middle; + + border-radius: 4px; } } - p { + & p { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; - line-height: 18px; + font-size: 12px; font-weight: 300; + line-height: 18px; } } - .edit-form { + & .edit-form { padding: 20px 20px 0; + white-space: normal; - h3 { - font-size: 24px; + & h3 { margin-bottom: 8px; + + font-size: 24px; line-height: 22px; } - p { - line-height: 18px; + & p { font-size: 12px; font-weight: 300; + line-height: 18px; } - > .input-line { + & > .input-line { margin-top: 20px; } - nav { + & nav { padding: 0; &.buttons { @@ -85,18 +93,19 @@ } } - .form-divisor { - text-align: center; - margin: 2em 0; + & .form-divisor { height: 9px; + margin: 2em 0; + + text-align: center; - > span { + & > span { padding: 0 1em; } } } - .room-info-content > div { + & .room-info-content > div { margin: 0 0 20px; } } diff --git a/packages/rocketchat-custom-sounds/admin/adminSoundEdit.html b/packages/rocketchat-custom-sounds/client/admin/adminSoundEdit.html similarity index 100% rename from packages/rocketchat-custom-sounds/admin/adminSoundEdit.html rename to packages/rocketchat-custom-sounds/client/admin/adminSoundEdit.html diff --git a/packages/rocketchat-custom-sounds/admin/adminSoundInfo.html b/packages/rocketchat-custom-sounds/client/admin/adminSoundInfo.html similarity index 100% rename from packages/rocketchat-custom-sounds/admin/adminSoundInfo.html rename to packages/rocketchat-custom-sounds/client/admin/adminSoundInfo.html diff --git a/packages/rocketchat-custom-sounds/admin/adminSounds.html b/packages/rocketchat-custom-sounds/client/admin/adminSounds.html similarity index 100% rename from packages/rocketchat-custom-sounds/admin/adminSounds.html rename to packages/rocketchat-custom-sounds/client/admin/adminSounds.html diff --git a/packages/rocketchat-custom-sounds/admin/adminSounds.js b/packages/rocketchat-custom-sounds/client/admin/adminSounds.js similarity index 98% rename from packages/rocketchat-custom-sounds/admin/adminSounds.js rename to packages/rocketchat-custom-sounds/client/admin/adminSounds.js index 63972ce1bfd..ec85ea2a7c4 100644 --- a/packages/rocketchat-custom-sounds/admin/adminSounds.js +++ b/packages/rocketchat-custom-sounds/client/admin/adminSounds.js @@ -46,7 +46,7 @@ Template.adminSounds.onCreated(function() { groups: ['custom-sounds', 'custom-sounds-selected'], id: 'add-sound', i18nTitle: 'Custom_Sound_Add', - icon: 'icon-plus', + icon: 'plus', template: 'adminSoundEdit', openClick(/*e, t*/) { instance.tabBarData.set(); @@ -59,7 +59,7 @@ Template.adminSounds.onCreated(function() { groups: ['custom-sounds-selected'], id: 'admin-sound-info', i18nTitle: 'Custom_Sound_Info', - icon: 'icon-cog', + icon: 'customize', template: 'adminSoundInfo', order: 2 }); diff --git a/packages/rocketchat-custom-sounds/admin/route.js b/packages/rocketchat-custom-sounds/client/admin/route.js similarity index 100% rename from packages/rocketchat-custom-sounds/admin/route.js rename to packages/rocketchat-custom-sounds/client/admin/route.js diff --git a/packages/rocketchat-custom-sounds/admin/soundEdit.html b/packages/rocketchat-custom-sounds/client/admin/soundEdit.html similarity index 92% rename from packages/rocketchat-custom-sounds/admin/soundEdit.html rename to packages/rocketchat-custom-sounds/client/admin/soundEdit.html index 4de2d2f8519..3c25ca522b0 100644 --- a/packages/rocketchat-custom-sounds/admin/soundEdit.html +++ b/packages/rocketchat-custom-sounds/client/admin/soundEdit.html @@ -13,7 +13,7 @@
- +