diff options
author | Renard | 2019-09-23 11:36:05 -0300 |
---|---|---|
committer | Renard | 2019-09-23 11:36:05 -0300 |
commit | 4731437a6049c860ece7fc13772860df6be98b9e (patch) | |
tree | 1981d7893694ffb1147947aab77761bfeacfb6ed /src | |
parent | 4ab085fa457af6beaf04076e0bb5305e0dd2c4eb (diff) | |
download | bai-client-4731437a6049c860ece7fc13772860df6be98b9e.tar.gz bai-client-4731437a6049c860ece7fc13772860df6be98b9e.tar.xz bai-client-4731437a6049c860ece7fc13772860df6be98b9e.zip |
Ajustes de respuesta rápida
Diffstat (limited to 'src')
-rw-r--r-- | src/App.css | 4 | ||||
-rw-r--r-- | src/Post.js | 24 | ||||
-rw-r--r-- | src/ReplyForm.js | 9 |
3 files changed, 21 insertions, 16 deletions
diff --git a/src/App.css b/src/App.css index 97d09b3..db9c6fd 100644 --- a/src/App.css +++ b/src/App.css @@ -108,4 +108,8 @@ .homeContainer.inverted { color: #eaeaea !important; background-color: #454647 !important; +} + +.ui.modal>.content.replyModal { + padding: 0 !important; }
\ No newline at end of file diff --git a/src/Post.js b/src/Post.js index 923fea7..ba3f6e8 100644 --- a/src/Post.js +++ b/src/Post.js @@ -52,22 +52,19 @@ const ReportModal = ({ trigger, threadId, postId, dir }) => ( </Modal> ); -const QuickReplyModal = ({ trigger, currentBoard, id, locked }) => ( +const QuickReplyModal = ({ trigger, currentBoard, id, locked, replyIndex }) => ( <Modal trigger={trigger} size="tiny"> <Modal.Header>Respuesta rápida</Modal.Header>. - <Modal.Content> - <Modal.Description> - <ReplyForm - currentBoard={currentBoard} - parent={id} - locked={locked} - nightMode={false} - /> - </Modal.Description> + <Modal.Content className="replyModal"> + <ReplyForm + currentBoard={currentBoard} + parent={id} + locked={locked} + nightMode={false} + quickReply + replyIndex={replyIndex} + /> </Modal.Content> - <Modal.Actions> - <Button secondary>Responder</Button> - </Modal.Actions> </Modal> ); @@ -238,6 +235,7 @@ const Post = ({ index, post, locked, threadId, currentBoard, nightMode }) => { currentBoard={currentBoard} id={post.parentid} locked={locked} + replyIndex={currentBoard.board_type === 0 ? post.id : index + 1} /> )} <ReportModal diff --git a/src/ReplyForm.js b/src/ReplyForm.js index 564ed88..6ef025a 100644 --- a/src/ReplyForm.js +++ b/src/ReplyForm.js @@ -8,7 +8,10 @@ class ReplyForm extends Component { this.state = { name: "", email: "", - message: "", + message: + this.props.replyIndex !== null + ? ">>" + this.props.replyIndex + "\n" + : "", attachment: "", submittedName: "", submittedEmail: "", @@ -73,7 +76,7 @@ class ReplyForm extends Component { render() { const { name, email, message, replyRes, attachment } = this.state; - const { currentBoard, nightMode } = this.props; + const { currentBoard, nightMode, quickReply } = this.props; if (this.props.locked === 1) { return ( <Message negative> @@ -83,7 +86,7 @@ class ReplyForm extends Component { ); } return ( - <Segment inverted={nightMode}> + <Segment inverted={nightMode} basic={quickReply}> {replyRes !== null ? ( replyRes.state === "success" ? ( <Message positive> |