mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
First implementation of ignore user plugin
This commit is contained in:
@@ -35,3 +35,7 @@
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
@@ -5,11 +5,13 @@ import {Slot} from 'plugin-api/beta/client/components';
|
||||
export default ({data, root, asset, comment, contentSlot}) => {
|
||||
if (contentSlot) {
|
||||
return (
|
||||
<Slot
|
||||
fill={contentSlot}
|
||||
data={data}
|
||||
queryData={{asset, root, comment}}
|
||||
/>
|
||||
<div className={styles.menu}>
|
||||
<Slot
|
||||
fill={contentSlot}
|
||||
data={data}
|
||||
queryData={{asset, root, comment}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,6 +23,7 @@ export default ({data, root, asset, comment, contentSlot}) => {
|
||||
queryData={{asset, root, comment}}
|
||||
/>
|
||||
<Slot
|
||||
className={styles.actions}
|
||||
fill={'authorMenuActions'}
|
||||
data={data}
|
||||
queryData={{asset, root, comment}}
|
||||
|
||||
@@ -22,6 +22,9 @@ class AuthorNameContainer extends React.Component {
|
||||
this.setState({
|
||||
menuVisible: false
|
||||
});
|
||||
if (this.props.contentSlot) {
|
||||
this.props.resetContentSlot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +34,7 @@ class AuthorNameContainer extends React.Component {
|
||||
root={this.props.root}
|
||||
asset={this.props.asset}
|
||||
comment={this.props.comment}
|
||||
contentSlot={this.props.contentSlot}
|
||||
menuVisible={this.state.menuVisible}
|
||||
toggleMenu={this.toggleMenu}
|
||||
hideMenu={this.hideMenu}
|
||||
|
||||
Reference in New Issue
Block a user