From db2aebcf5769b19b8dbcd500544efb54bd4ddaef Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 21 Jul 2023 22:06:06 +0800 Subject: [PATCH] chore: update create shortcut dialog --- web/src/components/CreateShortcutDialog.tsx | 38 ++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/web/src/components/CreateShortcutDialog.tsx b/web/src/components/CreateShortcutDialog.tsx index 5f6f3c6..10bc483 100644 --- a/web/src/components/CreateShortcutDialog.tsx +++ b/web/src/components/CreateShortcutDialog.tsx @@ -1,4 +1,4 @@ -import { Button, Divider, Input, Modal, ModalDialog, Radio, RadioGroup } from "@mui/joy"; +import { Button, Divider, Input, Modal, ModalDialog, Radio, RadioGroup, Textarea } from "@mui/joy"; import { isUndefined } from "lodash-es"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -127,7 +127,7 @@ const CreateShortcutDialog: React.FC = (props: Props) => { }); }; - const handleOpenGraphMetadataDescriptionChange = (e: React.ChangeEvent) => { + const handleOpenGraphMetadataDescriptionChange = (e: React.ChangeEvent) => { setPartialState({ shortcutCreate: Object.assign(state.shortcutCreate, { openGraphMetadata: { @@ -225,7 +225,7 @@ const CreateShortcutDialog: React.FC = (props: Props) => {

Optional -
+
= (props: Props) => { {showDescriptionAndTag && (
- Description + Description
- Tags - + Tags +
)} @@ -263,7 +271,10 @@ const CreateShortcutDialog: React.FC = (props: Props) => { }`} onClick={() => setShowOpenGraphMetadata(!showOpenGraphMetadata)} > - Social media metadata + + Social media metadata + + @@ -271,31 +282,34 @@ const CreateShortcutDialog: React.FC = (props: Props) => { {showOpenGraphMetadata && (
- Image URL + Image URL
- Title + Title
- Description - Description +