diff --git a/Dockerfile b/Dockerfile index 1f67da95b..2dbd7bbbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:7.10.1 +FROM node:8 # Create app directory RUN mkdir -p /usr/src/app @@ -17,7 +17,6 @@ RUN yarn global add node-gyp && \ yarn install --frozen-lockfile && \ cli plugins reconcile && \ yarn build && \ - yarn install --production && \ yarn cache clean # Ensure the runtime of the container is in production mode. diff --git a/circle.yml b/circle.yml index 69f95c9b4..373b45012 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: node: - version: 7.10.1 + version: 8 services: - docker - redis @@ -21,9 +21,8 @@ dependencies: # Install node dependencies. - yarn --version + - yarn global add node-gyp --force - yarn - cache_directories: - - ~/.cache/yarn post: # Build the static assets. - yarn build diff --git a/client/coral-admin/src/routes/Moderation/components/StorySearch.css b/client/coral-admin/src/routes/Moderation/components/StorySearch.css index 2df130ec4..973d97c24 100644 --- a/client/coral-admin/src/routes/Moderation/components/StorySearch.css +++ b/client/coral-admin/src/routes/Moderation/components/StorySearch.css @@ -74,7 +74,7 @@ cursor: pointer; display: block; text-decoration: none; - height: 50px; + min-height: 50px; box-sizing: border-box; transition: background-color 400ms; diff --git a/client/coral-embed-stream/src/components/Comment.css b/client/coral-embed-stream/src/components/Comment.css index 7eb2ece71..713655914 100644 --- a/client/coral-embed-stream/src/components/Comment.css +++ b/client/coral-embed-stream/src/components/Comment.css @@ -16,6 +16,7 @@ } .comment { + position: relative; padding-left: 15px; } diff --git a/models/user.js b/models/user.js index b19a87b0a..450819d53 100644 --- a/models/user.js +++ b/models/user.js @@ -1,5 +1,5 @@ const mongoose = require('../services/mongoose'); -const bcrypt = require('bcrypt'); +const bcrypt = require('bcryptjs'); const Schema = mongoose.Schema; const uuid = require('uuid'); const TagLinkSchema = require('./schema/tag_link'); diff --git a/package.json b/package.json index 663efceaf..7e537bd5f 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "accepts": "^1.3.3", "app-module-path": "^2.2.0", "async": "^2.5.0", - "bcrypt": "^1.0.2", + "bcryptjs": "^2.4.3", "body-parser": "^1.17.1", "bowser": "^1.7.0", "cli-table": "^0.3.1", @@ -216,6 +216,6 @@ "webpack": "^2.3.1" }, "engines": { - "node": "^7.10.1" + "node": "^8" } } diff --git a/plugins/talk-plugin-featured-comments/client/components/Tag.css b/plugins/talk-plugin-featured-comments/client/components/Tag.css index 8874bfa0c..88a019b5d 100644 --- a/plugins/talk-plugin-featured-comments/client/components/Tag.css +++ b/plugins/talk-plugin-featured-comments/client/components/Tag.css @@ -17,4 +17,26 @@ margin: 0px 5px; padding: 5px 5px; border-radius: 2px; +} + +.tag.on { + background-color: #1862a7; + cursor: pointer; +} + +.tooltip { + top: 36px; + left: auto; + right: 10px; +} + +.tooltip::before{ + left: auto; + right: 16px; +} + +.tooltip::after{ + left: auto; + right: 16px; + top: -20px; } \ No newline at end of file diff --git a/plugins/talk-plugin-featured-comments/client/components/Tag.js b/plugins/talk-plugin-featured-comments/client/components/Tag.js index 8e1cb428d..b7ee8cd6b 100644 --- a/plugins/talk-plugin-featured-comments/client/components/Tag.js +++ b/plugins/talk-plugin-featured-comments/client/components/Tag.js @@ -1,16 +1,45 @@ import React from 'react'; +import cn from 'classnames'; import styles from './Tag.css'; +import Tooltip from './Tooltip'; import {t} from 'plugin-api/beta/client/services'; import {isTagged} from 'plugin-api/beta/client/utils'; -export default (props) => ( - - { - isTagged(props.comment.tags, 'FEATURED') ? ( - - {t('talk-plugin-featured-comments.featured')} - - ) : null - } - -); +export default class Tag extends React.Component { + constructor() { + super(); + + this.state = { + tooltip: false + }; + + } + + showTooltip = () => { + this.setState({ + tooltip: true + }); + } + + hideTooltip = () => { + this.setState({ + tooltip: false + }); + } + + render() { + const {tooltip} = this.state; + return( +
+ { + isTagged(this.props.comment.tags, 'FEATURED') ? ( + + {t('talk-plugin-featured-comments.featured')} + + ) : null + } + {tooltip && } +
+ ); + } +} diff --git a/plugins/talk-plugin-featured-comments/client/components/Tooltip.js b/plugins/talk-plugin-featured-comments/client/components/Tooltip.js index c57336d05..f98d4c0d5 100644 --- a/plugins/talk-plugin-featured-comments/client/components/Tooltip.js +++ b/plugins/talk-plugin-featured-comments/client/components/Tooltip.js @@ -1,10 +1,11 @@ import React from 'react'; +import cn from 'classnames'; import styles from './Tooltip.css'; import {t} from 'plugin-api/beta/client/services'; import {Icon} from 'plugin-api/beta/client/components/ui'; -export default () => ( -
+export default ({className = ''}) => ( +

{t('talk-plugin-featured-comments.featured_comments')}: diff --git a/services/users.js b/services/users.js index 13dddaf04..3bdc5148b 100644 --- a/services/users.js +++ b/services/users.js @@ -1,6 +1,6 @@ const assert = require('assert'); const uuid = require('uuid'); -const bcrypt = require('bcrypt'); +const bcrypt = require('bcryptjs'); const url = require('url'); const jwt = require('jsonwebtoken'); const Wordlist = require('./wordlist'); diff --git a/yarn.lock b/yarn.lock index e13fde3ca..255dc7415 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1181,13 +1181,9 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bcrypt@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt/-/bcrypt-1.0.2.tgz#d05fc5d223173e0e28ec381c0f00cc25ffaf2736" - dependencies: - bindings "1.2.1" - nan "2.5.0" - node-pre-gyp "0.6.32" +bcryptjs@^2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.3.tgz#9ab5627b93e60621ff7cdac5da9733027df1d0cb" big.js@^3.1.3: version "3.1.3" @@ -1197,7 +1193,7 @@ binary-extensions@^1.0.0: version "1.8.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" -bindings@1.2.1, bindings@^1.2.1: +bindings@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" @@ -5449,7 +5445,7 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@2.5.0, nan@^2.0.0, nan@^2.3.0, nan@^2.4.0: +nan@^2.0.0, nan@^2.3.0, nan@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.0.tgz#aa8f1e34531d807e9e27755b234b4a6ec0c152a8" @@ -5566,7 +5562,7 @@ node-libs-browser@^2.0.0: util "^0.10.3" vm-browserify "0.0.4" -node-pre-gyp@0.6.32, node-pre-gyp@^0.6.29, node-pre-gyp@^0.6.4: +node-pre-gyp@^0.6.29, node-pre-gyp@^0.6.4: version "0.6.32" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" dependencies: