mirror of https://github.com/usememos/memos.git
updated en.json, finished tag tooltip, finished markdown menu tooltip
This commit is contained in:
parent
e94a7a1119
commit
2988230ffd
|
|
@ -3,6 +3,8 @@ import { Button } from "@/components/ui/button";
|
|||
import { useTranslate } from "@/utils/i18n";
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../ui/dropdown-menu";
|
||||
import { EditorRefActions } from "../Editor";
|
||||
import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "@/components/ui/tooltip";
|
||||
|
||||
|
||||
interface Props {
|
||||
editorRef: React.RefObject<EditorRefActions>;
|
||||
|
|
@ -61,11 +63,20 @@ const MarkdownMenu = (props: Props) => {
|
|||
|
||||
return (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon">
|
||||
<SquareSlashIcon className="size-5" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon">
|
||||
<SquareSlashIcon className="size-5" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">
|
||||
<p>{t("tooltip.codeblock-checkbox")}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
<DropdownMenuContent align="start">
|
||||
<DropdownMenuItem onClick={handleCodeBlockClick}>
|
||||
<Code2Icon className="w-4 h-auto text-muted-foreground" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { userStore } from "@/store";
|
|||
import { useTranslate } from "@/utils/i18n";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover";
|
||||
import { EditorRefActions } from "../Editor";
|
||||
import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "@/components/ui/tooltip";
|
||||
|
||||
interface Props {
|
||||
editorRef: React.RefObject<EditorRefActions>;
|
||||
|
|
@ -34,11 +35,20 @@ const TagSelector = observer((props: Props) => {
|
|||
|
||||
return (
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="ghost" size="icon">
|
||||
<HashIcon className="size-5" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="ghost" size="icon">
|
||||
<HashIcon className="size-5" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="bottom">
|
||||
<p>{t("tooltip.tags")}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
<PopoverContent align="start" sideOffset={2}>
|
||||
{tags.length > 0 ? (
|
||||
<div className="flex flex-row justify-start items-start flex-wrap px-2 max-w-48 h-auto max-h-48 overflow-y-auto gap-x-2">
|
||||
|
|
|
|||
|
|
@ -445,11 +445,11 @@
|
|||
"rename-tip": "All your memos with this tag will be updated."
|
||||
},
|
||||
"tooltip": {
|
||||
"codeblock-checkbox": "Code Block & Checkbox",
|
||||
"codeblock-checkbox": "Markdown Menu",
|
||||
"tags": "Tags",
|
||||
"link-memo": "Link Memo",
|
||||
"select-location": "Select Location",
|
||||
"select-visibility": "Select Visibility",
|
||||
"select-location": "Location",
|
||||
"select-visibility": "Visibility",
|
||||
"upload-attachment": "Upload Attachment"
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue