|
@@ -22,6 +22,8 @@ import { sentSave as _sentSave } from "./SentCellEditable";
|
|
|
import { IDeleteResponse } from "../../api/Article";
|
|
import { IDeleteResponse } from "../../api/Article";
|
|
|
import { delete_ } from "../../../request";
|
|
import { delete_ } from "../../../request";
|
|
|
|
|
|
|
|
|
|
+import "./style.css";
|
|
|
|
|
+
|
|
|
interface IWidget {
|
|
interface IWidget {
|
|
|
initValue?: ISentence;
|
|
initValue?: ISentence;
|
|
|
value?: ISentence;
|
|
value?: ISentence;
|
|
@@ -257,9 +259,9 @@ const SentCellWidget = ({
|
|
|
display: "flex",
|
|
display: "flex",
|
|
|
flexDirection: compact ? "row" : "column",
|
|
flexDirection: compact ? "row" : "column",
|
|
|
alignItems: "flex-start",
|
|
alignItems: "flex-start",
|
|
|
|
|
+ width: "100%",
|
|
|
}}
|
|
}}
|
|
|
>
|
|
>
|
|
|
- <EditInfo data={sentData} compact={compact} />
|
|
|
|
|
{isEditMode ? (
|
|
{isEditMode ? (
|
|
|
sentData?.contentType === "json" ? (
|
|
sentData?.contentType === "json" ? (
|
|
|
<SentWbwEdit
|
|
<SentWbwEdit
|
|
@@ -295,6 +297,7 @@ const SentCellWidget = ({
|
|
|
/>
|
|
/>
|
|
|
) : (
|
|
) : (
|
|
|
<MdView
|
|
<MdView
|
|
|
|
|
+ className="sentence"
|
|
|
style={{
|
|
style={{
|
|
|
width: "100%",
|
|
width: "100%",
|
|
|
paddingLeft: compact ? 0 : "2em",
|
|
paddingLeft: compact ? 0 : "2em",
|
|
@@ -305,20 +308,29 @@ const SentCellWidget = ({
|
|
|
wordWidget={wordWidget}
|
|
wordWidget={wordWidget}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
-
|
|
|
|
|
- <SuggestionToolbar
|
|
|
|
|
- style={{ marginLeft: "2em" }}
|
|
|
|
|
- compact={compact}
|
|
|
|
|
- data={sentData}
|
|
|
|
|
- isPr={isPr}
|
|
|
|
|
- prOpen={prOpen}
|
|
|
|
|
- onPrClose={() => setPrOpen(false)}
|
|
|
|
|
- onDelete={() => {
|
|
|
|
|
- if (isPr && sentData.id) {
|
|
|
|
|
- deletePr(sentData.id);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style={{
|
|
|
|
|
+ display: "flex",
|
|
|
|
|
+ justifyContent: "space-between",
|
|
|
|
|
+ width: "100%",
|
|
|
|
|
+ paddingRight: 20,
|
|
|
}}
|
|
}}
|
|
|
- />
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ <EditInfo data={sentData} compact={compact} />
|
|
|
|
|
+ <SuggestionToolbar
|
|
|
|
|
+ style={{ marginLeft: "2em", marginBottom: 0 }}
|
|
|
|
|
+ compact={compact}
|
|
|
|
|
+ data={sentData}
|
|
|
|
|
+ isPr={isPr}
|
|
|
|
|
+ prOpen={prOpen}
|
|
|
|
|
+ onPrClose={() => setPrOpen(false)}
|
|
|
|
|
+ onDelete={() => {
|
|
|
|
|
+ if (isPr && sentData.id) {
|
|
|
|
|
+ deletePr(sentData.id);
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
) : undefined}
|
|
) : undefined}
|
|
|
</SentEditMenu>
|
|
</SentEditMenu>
|