mirror of
https://github.com/wassname/talk.git
synced 2026-09-14 11:36:51 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c23f72807 | ||
|
|
8c1eaf09bc | ||
|
|
6e82c180f7 | ||
|
|
81f3cc808c | ||
|
|
55928dff08 | ||
|
|
9695db0678 | ||
|
|
655e53a35c | ||
|
|
d61ede2396 | ||
|
|
a40dd04c1b |
@@ -1,4 +1,5 @@
|
||||
import * as actions from '../constants/stream';
|
||||
import * as authActions from 'coral-framework/constants/auth';
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
let query = window.location.search.substring(1);
|
||||
@@ -16,7 +17,6 @@ function getQueryVariable(variable) {
|
||||
|
||||
const initialState = {
|
||||
activeReplyBox: '',
|
||||
commentCountCache: -1,
|
||||
assetId: getQueryVariable('asset_id'),
|
||||
assetUrl: getQueryVariable('asset_url'),
|
||||
commentId: getQueryVariable('comment_id'),
|
||||
@@ -25,16 +25,16 @@ const initialState = {
|
||||
|
||||
export default function stream(state = initialState, action) {
|
||||
switch (action.type) {
|
||||
case authActions.LOGOUT:
|
||||
return {
|
||||
...state,
|
||||
activeReplyBox: '',
|
||||
};
|
||||
case actions.SET_ACTIVE_REPLY_BOX:
|
||||
return {
|
||||
...state,
|
||||
activeReplyBox: action.id,
|
||||
};
|
||||
case actions.SET_COMMENT_COUNT_CACHE:
|
||||
return {
|
||||
...state,
|
||||
commentCountCache: action.amount,
|
||||
};
|
||||
case actions.VIEW_ALL_COMMENTS:
|
||||
return {
|
||||
...state,
|
||||
|
||||
@@ -9,6 +9,10 @@ class ReplyBox extends Component {
|
||||
document.getElementById('replyText').focus();
|
||||
}
|
||||
|
||||
cancelReply = () => {
|
||||
this.props.setActiveReplyBox('');
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
styles,
|
||||
@@ -18,7 +22,6 @@ class ReplyBox extends Component {
|
||||
addNotification,
|
||||
parentId,
|
||||
commentPostedHandler,
|
||||
setActiveReplyBox,
|
||||
maxCharCount,
|
||||
charCountEnable
|
||||
} = this.props;
|
||||
@@ -28,7 +31,7 @@ class ReplyBox extends Component {
|
||||
charCountEnable={charCountEnable}
|
||||
commentPostedHandler={commentPostedHandler}
|
||||
parentId={parentId}
|
||||
cancelButtonClicked={setActiveReplyBox}
|
||||
cancelButtonClicked={this.cancelReply}
|
||||
addNotification={addNotification}
|
||||
authorId={authorId}
|
||||
assetId={assetId}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "talk",
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.1",
|
||||
"description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
"coral-plugin-respect",
|
||||
"coral-plugin-like",
|
||||
"coral-plugin-facebook-auth",
|
||||
"coral-plugin-auth"
|
||||
"coral-plugin-auth",
|
||||
"coral-plugin-offtopic"
|
||||
],
|
||||
"client": [
|
||||
"coral-plugin-respect",
|
||||
"coral-plugin-like",
|
||||
"coral-plugin-auth"
|
||||
"coral-plugin-auth",
|
||||
"coral-plugin-offtopic",
|
||||
"coral-plugin-viewing-options"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user