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
chore: update editor actions
Stevend44e74bd1e18
diff --git a/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx b/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsxindex 555c1f26a..eba86aa56 100644--- a/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx+++ b/web/src/components/MemoEditor/ActionButton/MarkdownMenu.tsx@@ -1,4 +1,5 @@import { Dropdown, IconButton, Menu, MenuButton, MenuItem } from "@mui/joy";+import toast from "react-hot-toast";import Icon from "@/components/Icon";import showPreviewMarkdownDialog from "@/components/PreviewMarkdownDialog";import { EditorRefActions } from "../Editor";@@ -58,6 +59,12 @@ const MarkdownMenu = (props: Props) => {};const handlePreviewClick = () => {+ const content = editorRef.current?.getContent() ?? "";+ if (content === "") {+ toast.error("Nothing to preview");+ return;+ }+showPreviewMarkdownDialog(editorRef.current?.getContent() ?? "");};@@ -83,7 +90,7 @@ const MarkdownMenu = (props: Props) => {<span>Checkbox</span></MenuItem><MenuItem onClick={handlePreviewClick}>- <Icon.NotebookText className="w-4 h-auto" />+ <Icon.GanttSquare className="w-4 h-auto" /><span>Preview</span></MenuItem></Menu>diff --git a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx b/web/src/components/MemoEditor/ActionButton/TagSelector.tsxindex 24a8b3c9c..049c755e5 100644--- a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx+++ b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx@@ -53,9 +53,9 @@ const TagSelector = (props: Props) => {{tags.map((tag) => {return (<div- className="inline-block w-auto max-w-full cursor-pointer rounded text-sm leading-6 px-2 hover:bg-zinc-100 dark:hover:bg-zinc-800 shrink-0"- onClick={() => handleTagClick(tag)}key={tag}+ className="inline-flex w-auto max-w-full cursor-pointer rounded text-sm leading-5 px-1 text-gray-500 dark:text-gray-400 hover:bg-zinc-100 dark:hover:bg-zinc-800"+ onClick={() => handleTagClick(tag)}><OverflowTip>#{tag}</OverflowTip></div>