feat: member manage section in setting dialog

This commit is contained in:
boojack
2022-05-16 22:19:39 +08:00
parent fbf4afff8e
commit c492317ffe
24 changed files with 421 additions and 344 deletions

View File

@ -246,7 +246,7 @@ const MemoEditor: React.FC<Props> = () => {
const file = inputEl.files[0];
const url = await handleUploadFile(file);
if (url) {
editorRef.current?.insertText(url);
editorRef.current?.insertText(url + " ");
}
};
inputEl.click();
@ -259,7 +259,7 @@ const MemoEditor: React.FC<Props> = () => {
}
}, []);
const showEditStatus = Boolean(globalState.editMemoId);
const isEditing = Boolean(globalState.editMemoId);
const editorConfig = useMemo(
() => ({
@ -267,17 +267,17 @@ const MemoEditor: React.FC<Props> = () => {
initialContent: getEditorContentCache(),
placeholder: "Any thoughts...",
showConfirmBtn: true,
showCancelBtn: showEditStatus,
showCancelBtn: isEditing,
onConfirmBtnClick: handleSaveBtnClick,
onCancelBtnClick: handleCancelBtnClick,
onContentChange: handleContentChange,
}),
[showEditStatus]
[isEditing]
);
return (
<div className={"memo-editor-container " + (showEditStatus ? "edit-ing" : "")}>
<p className={"tip-text " + (showEditStatus ? "" : "hidden")}>Editting...</p>
<div className={"memo-editor-container " + (isEditing ? "edit-ing" : "")}>
<p className={"tip-text " + (isEditing ? "" : "hidden")}>Editting...</p>
<Editor
ref={editorRef}
{...editorConfig}