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: max height of memo content compact mode
Stevenc4b52c68b5f5
diff --git a/web/src/components/MemoContent/Blockquote.tsx b/web/src/components/MemoContent/Blockquote.tsxindex 943867824..9f84ab16b 100644--- a/web/src/components/MemoContent/Blockquote.tsx+++ b/web/src/components/MemoContent/Blockquote.tsx@@ -8,7 +8,7 @@ interface Props extends BaseProps {const Blockquote: React.FC<Props> = ({ children }: Props) => {return (- <blockquote className="p-2 border-s-4 border-gray-300 bg-gray-50 dark:border-gray-500 dark:bg-zinc-700">+ <blockquote className="p-2 border-s-4 rounded border-gray-300 bg-gray-50 dark:border-gray-500 dark:bg-zinc-700">{children.map((child, index) => (<Renderer key={`${child.type}-${index}`} index={String(index)} node={child} />))}diff --git a/web/src/components/MemoContent/CodeBlock.tsx b/web/src/components/MemoContent/CodeBlock.tsxindex 25d056cc0..af30dd72d 100644--- a/web/src/components/MemoContent/CodeBlock.tsx+++ b/web/src/components/MemoContent/CodeBlock.tsx@@ -40,7 +40,7 @@ const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {return <MermaidBlock content={content} />;}- const highlightedCode: string = useMemo(() => {+ const highlightedCode = useMemo(() => {try {const lang = hljs.getLanguage(formatedLanguage);if (lang) {@@ -52,7 +52,7 @@ const CodeBlock: React.FC<Props> = ({ language, content }: Props) => {// Skip error and use default highlighted code.}- // escape any HTML entities when rendering original content+ // Escape any HTML entities when rendering original content.return Object.assign(document.createElement("span"), {textContent: content,}).innerHTML;diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsxindex 201a85742..c98fc9ee7 100644--- a/web/src/components/MemoContent/index.tsx+++ b/web/src/components/MemoContent/index.tsx@@ -80,7 +80,7 @@ const MemoContent: React.FC<Props> = (props: Props) => {ref={memoContentContainerRef}className={clsx("relative w-full max-w-full word-break text-base leading-snug space-y-2 whitespace-pre-wrap",- showCompactMode && "line-clamp-6",+ showCompactMode && "line-clamp-6 max-h-44",contentClassName,)}onClick={handleMemoContentClick}@@ -91,7 +91,6 @@ const MemoContent: React.FC<Props> = (props: Props) => {skipNextLineBreakFlag = false;return null;}-prevNode = node;skipNextLineBreakFlag = true;return <Renderer key={`${node.type}-${index}`} index={String(index)} node={node} />;