feat: float mobile editor (#234)

* feat: float mobile editor

* fix: fix pr comment

* lint: fix golangci-lint
This commit is contained in:
f97
2022-09-20 19:42:14 +07:00
committed by GitHub
parent 02c26d5bb4
commit 7a6eb53e0f
9 changed files with 68 additions and 7 deletions

View File

@ -31,6 +31,7 @@ const MemoEditor = () => {
const prevGlobalStateRef = useRef(editorState);
const tagSeletorRef = useRef<HTMLDivElement>(null);
const editorFontStyle = user?.setting.editorFontStyle || "normal";
const mobileEditorStyle = user?.setting.mobileEditorStyle || "normal";
useEffect(() => {
if (editorState.markMemoId && editorState.markMemoId !== UNKNOWN_ID) {
@ -280,7 +281,7 @@ const MemoEditor = () => {
);
return (
<div className={`memo-editor-container ${isEditing ? "edit-ing" : ""} ${state.fullscreen ? "fullscreen" : ""}`}>
<div className={`memo-editor-container ${mobileEditorStyle} ${isEditing ? "edit-ing" : ""} ${state.fullscreen ? "fullscreen" : ""}`}>
<div className={`tip-container ${isEditing ? "" : "!hidden"}`}>
<span className="tip-text">{t("editor.editing")}</span>
<button className="cancel-btn" onClick={handleCancelEditingBtnClick}>