|
@@ -24,6 +24,7 @@ import { delete_ } from "../../../request";
|
|
|
|
|
|
|
|
import "./style.css";
|
|
import "./style.css";
|
|
|
import StudioName from "../../auth/StudioName";
|
|
import StudioName from "../../auth/StudioName";
|
|
|
|
|
+import CopyToModal from "../../channel/CopyToModal";
|
|
|
|
|
|
|
|
interface IWidget {
|
|
interface IWidget {
|
|
|
initValue?: ISentence;
|
|
initValue?: ISentence;
|
|
@@ -58,6 +59,9 @@ const SentCellWidget = ({
|
|
|
const [prOpen, setPrOpen] = useState(false);
|
|
const [prOpen, setPrOpen] = useState(false);
|
|
|
const discussionMessage = useAppSelector(message);
|
|
const discussionMessage = useAppSelector(message);
|
|
|
const anchorInfo = useAppSelector(anchor);
|
|
const anchorInfo = useAppSelector(anchor);
|
|
|
|
|
+ const [copyOpen, setCopyOpen] = useState<boolean>(false);
|
|
|
|
|
+
|
|
|
|
|
+ const sentId = `${sentData?.book}-${sentData?.para}-${sentData?.wordStart}-${sentData?.wordEnd}`;
|
|
|
const sid = `${sentData?.book}_${sentData?.para}_${sentData?.wordStart}_${sentData?.wordEnd}_${sentData?.channel.id}`;
|
|
const sid = `${sentData?.book}_${sentData?.para}_${sentData?.wordStart}_${sentData?.wordEnd}_${sentData?.channel.id}`;
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
if (
|
|
if (
|
|
@@ -137,6 +141,9 @@ const SentCellWidget = ({
|
|
|
}}
|
|
}}
|
|
|
onMenuClick={(key: string) => {
|
|
onMenuClick={(key: string) => {
|
|
|
switch (key) {
|
|
switch (key) {
|
|
|
|
|
+ case "copy-to":
|
|
|
|
|
+ setCopyOpen(true);
|
|
|
|
|
+ break;
|
|
|
case "suggestion":
|
|
case "suggestion":
|
|
|
setPrOpen(true);
|
|
setPrOpen(true);
|
|
|
break;
|
|
break;
|
|
@@ -353,6 +360,13 @@ const SentCellWidget = ({
|
|
|
) : undefined}
|
|
) : undefined}
|
|
|
</SentEditMenu>
|
|
</SentEditMenu>
|
|
|
{compact ? undefined : <Divider style={{ margin: "10px 0" }} />}
|
|
{compact ? undefined : <Divider style={{ margin: "10px 0" }} />}
|
|
|
|
|
+ <CopyToModal
|
|
|
|
|
+ important
|
|
|
|
|
+ sentencesId={[sentId]}
|
|
|
|
|
+ channel={sentData?.channel}
|
|
|
|
|
+ open={copyOpen}
|
|
|
|
|
+ onClose={() => setCopyOpen(false)}
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|