diff options
author | crupest <crupest@outlook.com> | 2021-07-01 20:38:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 20:38:28 +0800 |
commit | eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c (patch) | |
tree | 5afe2d654a51c8712aa30a419f6edfa19fe1a234 /FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx | |
parent | 825aac426d87180e62530321320fbb012efbd897 (diff) | |
parent | b456334cedad566bf2c4c66481ec928dc59eda7d (diff) | |
download | timeline-eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c.tar.gz timeline-eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c.tar.bz2 timeline-eb306e98fb94fdfbced7b7e91ffb3d85ecb28c2c.zip |
Merge pull request #649 from crupest/drop-bootstrap
Drop bootstrap!!!
Diffstat (limited to 'FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx')
-rw-r--r-- | FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx b/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx index 14cd50d4..9c48c7c8 100644 --- a/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx +++ b/FrontEnd/src/views/timeline-common/TimelinePostEdit.tsx @@ -1,7 +1,6 @@ import React from "react"; import classnames from "classnames"; import { useTranslation } from "react-i18next"; -import { Row, Col, Form } from "react-bootstrap"; import { UiLogicError } from "@/common"; @@ -16,8 +15,8 @@ import { pushAlert } from "@/services/alert"; import { base64 } from "@/http/common"; import BlobImage from "../common/BlobImage"; -import LoadingButton from "../common/LoadingButton"; -import { PopupMenu } from "../common/Menu"; +import LoadingButton from "../common/button/LoadingButton"; +import PopupMenu from "../common/menu/PopupMenu"; import Card from "../common/Card"; import MarkdownPostEdit from "./MarkdownPostEdit"; import TimelineLine from "./TimelineLine"; @@ -36,8 +35,7 @@ const TimelinePostEditText: React.FC<TimelinePostEditTextProps> = (props) => { const { text, disabled, onChange, className, style } = props; return ( - <Form.Control - as="textarea" + <textarea value={text} disabled={disabled} onChange={(event) => { @@ -81,7 +79,7 @@ const TimelinePostEditImage: React.FC<TimelinePostEditImageProps> = (props) => { return ( <> - <Form.Control + <input type="file" onChange={onInputChange} accept="image/*" @@ -205,20 +203,20 @@ const TimelinePostEdit: React.FC<TimelinePostEditProps> = (props) => { <Card className="timeline-item-card"> {showMarkdown ? ( <MarkdownPostEdit - className="w-100" + className="cru-fill-parent" onClose={() => setShowMarkdown(false)} timeline={timeline.name} onPosted={onPosted} onPostError={onPostError} /> ) : ( - <Row> - <Col className="px-1 py-1"> + <div className="row"> + <div className="col px-1 py-1"> {(() => { if (kind === "text") { return ( <TimelinePostEditText - className="w-100 h-100 timeline-post-edit" + className="cru-fill-parent timeline-post-edit" text={text} disabled={process} onChange={(t) => { @@ -239,9 +237,9 @@ const TimelinePostEdit: React.FC<TimelinePostEditProps> = (props) => { ); } })()} - </Col> - <Col xs="auto" className="align-self-end m-1"> - <div className="d-block text-center mt-1 mb-2"> + </div> + <div className="col col-auto align-self-end m-1"> + <div className="d-block cru-text-center mt-1 mb-2"> <PopupMenu items={(["text", "image", "markdown"] as const).map( (kind) => ({ @@ -267,15 +265,14 @@ const TimelinePostEdit: React.FC<TimelinePostEditProps> = (props) => { </PopupMenu> </div> <LoadingButton - variant="primary" onClick={onSend} disabled={!canSend} loading={process} > {t("timeline.send")} </LoadingButton> - </Col> - </Row> + </div> + </div> )} </Card> </div> |