@ -3,7 +3,7 @@ import { escape, indexOf } from "lodash-es";
import { IMAGE_URL_REG , LINK_REG , MEMO_LINK_REG , TAG_REG , UNKNOWN_ID } from "../helpers/consts" ;
import { IMAGE_URL_REG , LINK_REG , MEMO_LINK_REG , TAG_REG , UNKNOWN_ID } from "../helpers/consts" ;
import { DONE_BLOCK_REG , parseMarkedToHtml , TODO_BLOCK_REG } from "../helpers/marked" ;
import { DONE_BLOCK_REG , parseMarkedToHtml , TODO_BLOCK_REG } from "../helpers/marked" ;
import * as utils from "../helpers/utils" ;
import * as utils from "../helpers/utils" ;
import { editorStateService , locationService , memoService } from "../services" ;
import { editorStateService , locationService , memoService , userService } from "../services" ;
import Only from "./common/OnlyWhen" ;
import Only from "./common/OnlyWhen" ;
import Image from "./Image" ;
import Image from "./Image" ;
import showMemoCardDialog from "./MemoCardDialog" ;
import showMemoCardDialog from "./MemoCardDialog" ;
@ -112,7 +112,7 @@ const Memo: React.FC<Props> = (props: Props) => {
} else {
} else {
locationService . setTagQuery ( tagName ) ;
locationService . setTagQuery ( tagName ) ;
}
}
} else if ( targetEl . classList . contains ( "todo-block" ) ) {
} else if ( targetEl . classList . contains ( "todo-block" ) && userService . isNotVisitor ( ) ) {
const status = targetEl . dataset ? . value ;
const status = targetEl . dataset ? . value ;
const todoElementList = [ . . . ( memoContainerRef . current ? . querySelectorAll ( ` span.todo-block[data-value= ${ status } ] ` ) ? ? [ ] ) ] ;
const todoElementList = [ . . . ( memoContainerRef . current ? . querySelectorAll ( ` span.todo-block[data-value= ${ status } ] ` ) ? ? [ ] ) ] ;
for ( const element of todoElementList ) {
for ( const element of todoElementList ) {
@ -158,6 +158,7 @@ const Memo: React.FC<Props> = (props: Props) => {
< span className = "ml-2" > PINNED < / span >
< span className = "ml-2" > PINNED < / span >
< / Only >
< / Only >
< / span >
< / span >
{ userService . isNotVisitor ( ) && (
< div className = "btns-container" >
< div className = "btns-container" >
< span className = "btn more-action-btn" >
< span className = "btn more-action-btn" >
< img className = "icon-img" src = "/icons/more.svg" / >
< img className = "icon-img" src = "/icons/more.svg" / >
@ -190,6 +191,7 @@ const Memo: React.FC<Props> = (props: Props) => {
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
) }
< / div >
< / div >
< div
< div
ref = { memoContainerRef }
ref = { memoContainerRef }