mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
Merge branch 'master' into 138617379_best_comments
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
FROM node:7.6
|
||||
|
||||
# Add node-gyp for bcrypt build support
|
||||
RUN yarn global add node-gyp
|
||||
|
||||
# Create app directory
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
@@ -45,16 +45,15 @@ const session_opts = {
|
||||
secret: process.env.TALK_SESSION_SECRET,
|
||||
httpOnly: true,
|
||||
rolling: true,
|
||||
saveUninitialized: false,
|
||||
resave: false,
|
||||
saveUninitialized: true,
|
||||
resave: true,
|
||||
unset: 'destroy',
|
||||
name: 'talk.sid',
|
||||
cookie: {
|
||||
secure: false,
|
||||
maxAge: 36000000, // 1 hour for expiry.
|
||||
maxAge: 8.64e+7, // 24 hours for session token expiry
|
||||
},
|
||||
store: new RedisStore({
|
||||
ttl: 1800,
|
||||
client: redis.createClient(),
|
||||
})
|
||||
};
|
||||
|
||||
@@ -14,28 +14,35 @@ const CoralHeader = ({handleLogout, restricted = false}) => (
|
||||
<div>
|
||||
<Navigation className={styles.nav}>
|
||||
<IndexLink
|
||||
id='dashboardNav'
|
||||
className={styles.navLink}
|
||||
to="/admin/dashboard"
|
||||
activeClassName={styles.active}>
|
||||
{lang.t('configure.dashboard')}
|
||||
</IndexLink>
|
||||
<Link
|
||||
id='moderateNav'
|
||||
className={styles.navLink}
|
||||
to="/admin/moderate"
|
||||
activeClassName={styles.active}>
|
||||
{lang.t('configure.moderate')}
|
||||
</Link>
|
||||
<Link className={styles.navLink}
|
||||
<Link
|
||||
id='streamsNav'
|
||||
className={styles.navLink}
|
||||
to="/admin/streams"
|
||||
activeClassName={styles.active}>
|
||||
{lang.t('configure.streams')}
|
||||
</Link>
|
||||
<Link className={styles.navLink}
|
||||
<Link
|
||||
id='communityNav'
|
||||
className={styles.navLink}
|
||||
to="/admin/community"
|
||||
activeClassName={styles.active}>
|
||||
{lang.t('configure.community')}
|
||||
</Link>
|
||||
<Link
|
||||
id='configureNav'
|
||||
className={styles.navLink}
|
||||
to="/admin/configure"
|
||||
activeClassName={styles.active}>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
.Reply {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.Comment {
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class Stream extends React.Component {
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div id='stream'>
|
||||
{
|
||||
comments.map(comment =>
|
||||
<Comment
|
||||
|
||||
@@ -31,13 +31,14 @@ function buildStreamIframeUrl(talkBaseUrl, asset_url, comment, asset_id) {
|
||||
function configurePymParent(pymParent, asset_url) {
|
||||
let notificationOffset = 200;
|
||||
let ready = false;
|
||||
let cachedHeight;
|
||||
|
||||
// Resize parent iframe height when child height changes
|
||||
pymParent.onMessage('height', function(height) {
|
||||
|
||||
// TODO: In local testing, this is firing nonstop. Maybe there's a bug on the inside?
|
||||
// Or it's by design of pym... but that's very wasteful of CPU and DOM reflows (jank)
|
||||
pymParent.el.querySelector('iframe').height = `${height }px`;
|
||||
if (height !== cachedHeight) {
|
||||
pymParent.el.firstChild.style.height = `${height}px`;
|
||||
cachedHeight = height;
|
||||
}
|
||||
});
|
||||
|
||||
// Helps child show notifications at the right scrollTop
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/coralproject/talk#readme",
|
||||
"dependencies": {
|
||||
"bcrypt": "^0.8.7",
|
||||
"bcrypt": "^1.0.2",
|
||||
"body-parser": "^1.15.2",
|
||||
"cli-table": "^0.3.1",
|
||||
"commander": "^2.9.0",
|
||||
|
||||
@@ -8,6 +8,8 @@ const embedStreamCommands = {
|
||||
},
|
||||
approveComment() {
|
||||
return this
|
||||
.waitForElementVisible('@moderateNav')
|
||||
.click('@moderateNav')
|
||||
.waitForElementVisible('@moderationList')
|
||||
.waitForElementVisible('@approveButton')
|
||||
.click('@approveButton');
|
||||
@@ -17,6 +19,9 @@ const embedStreamCommands = {
|
||||
module.exports = {
|
||||
commands: [embedStreamCommands],
|
||||
elements: {
|
||||
moderateNav: {
|
||||
selector: '#moderateNav'
|
||||
},
|
||||
moderationList: {
|
||||
selector: '#moderationList'
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@ module.exports = {
|
||||
|
||||
embedStreamPage
|
||||
.flagUsername()
|
||||
.click('@flagButton')
|
||||
.waitForElementVisible('@flagPopUp')
|
||||
.waitForElementVisible('@flagUsernameOption')
|
||||
.click('@flagUsernameOption')
|
||||
|
||||
@@ -41,7 +41,6 @@ module.exports = {
|
||||
.setValue('#password', mockUser.pw)
|
||||
.setValue('#confirmPassword', mockUser.pw)
|
||||
.click('#coralSignUpButton')
|
||||
.pause(5000)
|
||||
.waitForElementVisible('#coralLogInButton', 10000)
|
||||
.click('#coralLogInButton')
|
||||
.waitForElementVisible('.coral-plugin-commentbox-button', 4000)
|
||||
@@ -73,11 +72,7 @@ module.exports = {
|
||||
// Post a comment
|
||||
client.waitForElementVisible('.coral-plugin-commentbox-button', 2000)
|
||||
.setValue('.coral-plugin-commentbox-textarea', mockComment)
|
||||
.click('.coral-plugin-commentbox-button')
|
||||
.waitForElementVisible('#coral-notif', 1000)
|
||||
|
||||
// Verify that it appears
|
||||
.assert.containsText('#coral-notif', 'moderation team');
|
||||
.click('.coral-plugin-commentbox-button');
|
||||
done();
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -102,6 +97,7 @@ module.exports = {
|
||||
.click('.coral-plugin-commentbox-button')
|
||||
|
||||
// Post a reply
|
||||
|
||||
.waitForElementVisible('.embed__stream .coral-plugin-replies-reply-button', 5000)
|
||||
.click('.embed__stream .coral-plugin-replies-reply-button')
|
||||
.waitForElementVisible('#replyText')
|
||||
@@ -171,7 +167,7 @@ module.exports = {
|
||||
|
||||
// Verify that comment count is correct
|
||||
client.waitForElementVisible('.coral-plugin-comment-count-text', 2000)
|
||||
.assert.containsText('.coral-plugin-comment-count-text', '4 Comments');
|
||||
.assert.containsText('.coral-plugin-comment-count-text', '5 Comments');
|
||||
done();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1087,12 +1087,13 @@ bcrypt-pbkdf@^1.0.0:
|
||||
dependencies:
|
||||
tweetnacl "^0.14.3"
|
||||
|
||||
bcrypt@^0.8.7:
|
||||
version "0.8.7"
|
||||
resolved "https://registry.yarnpkg.com/bcrypt/-/bcrypt-0.8.7.tgz#bc3875a9afd0a7b2cd231a6a7f218a5ce156b093"
|
||||
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.3.5"
|
||||
nan "2.5.0"
|
||||
node-pre-gyp "0.6.32"
|
||||
|
||||
big.js@^3.1.3:
|
||||
version "3.1.3"
|
||||
@@ -5014,9 +5015,9 @@ 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.3.0, nan@2.3.5:
|
||||
version "2.3.5"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.3.5.tgz#822a0dc266290ce4cd3a12282ca3e7e364668a08"
|
||||
nan@2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.0.tgz#aa8f1e34531d807e9e27755b234b4a6ec0c152a8"
|
||||
|
||||
natural-compare@^1.4.0:
|
||||
version "1.4.0"
|
||||
@@ -5119,7 +5120,7 @@ node-libs-browser@^2.0.0:
|
||||
util "^0.10.3"
|
||||
vm-browserify "0.0.4"
|
||||
|
||||
node-pre-gyp@^0.6.29:
|
||||
node-pre-gyp@0.6.32, node-pre-gyp@^0.6.29:
|
||||
version "0.6.32"
|
||||
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user