Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: memo content availability for visitor mode (#1605)
deeshu3fad71880765
diff --git a/web/src/components/MemoContent.tsx b/web/src/components/MemoContent.tsxindex 05d99ab35..5f650ec4b 100644--- a/web/src/components/MemoContent.tsx+++ b/web/src/components/MemoContent.tsx@@ -32,7 +32,8 @@ const MemoContent: React.FC<Props> = (props: Props) => {//variable for auto-collapseconst userStore = useUserStore();- const { localSetting } = userStore.state.user as User;+ const isVisitorMode = userStore.isVisitorMode();+ const autoCollapse: boolean = isVisitorMode ? true : (userStore.state.user as User).localSetting.enableAutoCollapse;useEffect(() => {if (showFull) {@@ -72,15 +73,13 @@ const MemoContent: React.FC<Props> = (props: Props) => {<div className={`memo-content-wrapper ${className || ""}`}><divref={memoContentContainerRef}- className={`memo-content-text ${- localSetting.enableAutoCollapse && state.expandButtonStatus === 0 ? "max-h-64 overflow-y-hidden" : ""- }`}+ className={`memo-content-text ${autoCollapse && state.expandButtonStatus === 0 ? "max-h-64 overflow-y-hidden" : ""}`}onClick={handleMemoContentClick}onDoubleClick={handleMemoContentDoubleClick}>{marked(content)}</div>- {localSetting.enableAutoCollapse && state.expandButtonStatus !== -1 && (+ {autoCollapse && state.expandButtonStatus !== -1 && (<div className={`expand-btn-container ${state.expandButtonStatus === 0 && "!-mt-7"}`}><div className="absolute top-0 left-0 w-full h-full blur-lg bg-white dark:bg-zinc-700"></div><span className={`btn z-10 ${state.expandButtonStatus === 0 ? "expand-btn" : "fold-btn"}`} onClick={handleExpandBtnClick}>