mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
Merge pull request #368 from coralproject/asset-name-fixes
Asset Name + Profile Tab Bugs
This commit is contained in:
@@ -3,6 +3,11 @@ query myCommentHistory {
|
||||
comments {
|
||||
id
|
||||
body
|
||||
asset {
|
||||
id
|
||||
title
|
||||
url
|
||||
}
|
||||
created_at
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ const Comment = props => {
|
||||
return (
|
||||
<div className={styles.myComment}>
|
||||
<p className="myCommentAsset">
|
||||
<a className={`${styles.assetURL} myCommentAnchor`} href='#' onClick={props.link(`${props.asset.url}#${props.comment.id}`)}>{props.asset.url}</a>
|
||||
<a className={`${styles.assetURL} myCommentAnchor`} href='#' onClick={props.link(`${props.asset.url}#${props.comment.id}`)}>{props.asset.title ? props.asset.title : props.asset.url}</a>
|
||||
</p>
|
||||
<p className={`${styles.commentBody} myCommentBody`}>{props.comment.body}</p>
|
||||
</div>
|
||||
@@ -18,7 +18,8 @@ Comment.propTypes = {
|
||||
body: PropTypes.string
|
||||
}).isRequired,
|
||||
asset: PropTypes.shape({
|
||||
url: PropTypes.string
|
||||
url: PropTypes.string,
|
||||
title: PropTypes.string
|
||||
}).isRequired
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ const CommentHistory = props => {
|
||||
key={i}
|
||||
comment={comment}
|
||||
link={props.link}
|
||||
asset={props.asset} />;
|
||||
asset={comment.asset} />;
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,8 +19,7 @@ const CommentHistory = props => {
|
||||
};
|
||||
|
||||
CommentHistory.propTypes = {
|
||||
comments: PropTypes.array.isRequired,
|
||||
asset: PropTypes.object.isRequired
|
||||
comments: PropTypes.array.isRequired
|
||||
};
|
||||
|
||||
export default CommentHistory;
|
||||
|
||||
@@ -5,9 +5,9 @@ import translations from '../translations';
|
||||
import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
export default ({showSignInDialog}) => (
|
||||
export default ({showSignInDialog, requireEmailConfirmation}) => (
|
||||
<div className={styles.message}>
|
||||
<SignInContainer noButton={true}/>
|
||||
<SignInContainer noButton={true} requireEmailConfirmation={requireEmailConfirmation}/>
|
||||
<div>
|
||||
<a onClick={() => {
|
||||
showSignInDialog();
|
||||
|
||||
@@ -35,7 +35,7 @@ class ProfileContainer extends Component {
|
||||
const {me} = this.props.data;
|
||||
|
||||
if (!loggedIn || !me) {
|
||||
return <NotLoggedIn showSignInDialog={showSignInDialog}/>;
|
||||
return <NotLoggedIn showSignInDialog={showSignInDialog} requireEmailConfirmation={asset.settings.requireEmailConfirmation}/>;
|
||||
}
|
||||
|
||||
if (data.loading) {
|
||||
|
||||
@@ -20,6 +20,10 @@ describe('coral-plugin-history/CommentHistory', () => {
|
||||
'closedAt':null
|
||||
};
|
||||
|
||||
comments.forEach((comment) => {
|
||||
comment.asset = asset;
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
render = shallow(<CommentHistory comments={comments} asset={asset} link={()=>{}}/>);
|
||||
});
|
||||
|
||||
+3
-2
@@ -17,7 +17,7 @@ const buildEmbeds = [
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
devtool: 'cheap-source-map',
|
||||
devtool: '#cheap-module-source-map',
|
||||
entry: Object.assign({}, {
|
||||
'embed': [
|
||||
'babel-polyfill',
|
||||
@@ -58,7 +58,8 @@ module.exports = {
|
||||
exclude: /node_modules/,
|
||||
test: /\.js$/,
|
||||
query: {
|
||||
cacheDirectory: true
|
||||
cacheDirectory: true,
|
||||
sourceMap: true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user