diff --git a/public/assets/markdown.svg b/public/assets/markdown.svg new file mode 100644 index 00000000..171ea254 --- /dev/null +++ b/public/assets/markdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/assets/mirror.xyz.svg b/public/assets/mirror.xyz.svg new file mode 100644 index 00000000..8260ebf9 --- /dev/null +++ b/public/assets/mirror.xyz.svg @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/public/locales/zh/dashboard.json b/public/locales/zh/dashboard.json index bfa17a61..5fb7d872 100644 --- a/public/locales/zh/dashboard.json +++ b/public/locales/zh/dashboard.json @@ -139,5 +139,11 @@ "Learn more": "了解更多", "Ended": "已结束", "Upcoming": "即将开始", - "Ongoing": "进行中" + "Ongoing": "进行中", + "Import from Markdown files": "从 Markdown 文件导入", + "Import from Mirror.xyz": "从 Mirror.xyz 导入", + "Select Markdown Files": "选择 Markdown 文件", + "No files chosen": "未选择文件", + "No entries": "无条目", + "Preview your Mirror.xyz entries": "预览你的 Mirror.xyz 条目" } \ No newline at end of file diff --git a/src/pages/dashboard/[subdomain]/import/index.tsx b/src/pages/dashboard/[subdomain]/import/index.tsx index ee5de6f3..ea3391a9 100644 --- a/src/pages/dashboard/[subdomain]/import/index.tsx +++ b/src/pages/dashboard/[subdomain]/import/index.tsx @@ -8,6 +8,7 @@ import { useTranslation, Trans } from "next-i18next" import { getServerSideProps as getLayoutServerSideProps } from "~/components/dashboard/DashboardLayout.server" import { GetServerSideProps } from "next" import { serverSidePropsHandler } from "~/lib/server-side-props" +import { Image } from "~/components/ui/Image" export const getServerSideProps: GetServerSideProps = serverSidePropsHandler( async (ctx) => { @@ -32,10 +33,12 @@ export default function ImportPage() { { name: "Markdown files", path: "/markdown", + icon: "markdown.svg", }, { name: "Mirror.xyz", path: "/mirror", + icon: "mirror.xyz.svg", }, ] @@ -44,11 +47,20 @@ export default function ImportPage() {
{options.map((option) => ( - Import from {option.name} + + {option.name} + + + {t(`Import from ${option.name}`)} + ))}
diff --git a/src/pages/dashboard/[subdomain]/import/markdown.tsx b/src/pages/dashboard/[subdomain]/import/markdown.tsx index 29ec5de0..73045816 100644 --- a/src/pages/dashboard/[subdomain]/import/markdown.tsx +++ b/src/pages/dashboard/[subdomain]/import/markdown.tsx @@ -95,7 +95,7 @@ export default function ImportMarkdownPage() {
-
Preview
+
{t("Preview")}
{notes?.length ? ( notes?.map((note) => ( )) ) : ( -
No files chosen
+
{t("No files chosen")}
)}
diff --git a/src/pages/dashboard/[subdomain]/import/mirror.tsx b/src/pages/dashboard/[subdomain]/import/mirror.tsx index 739d0d2c..24b8066d 100644 --- a/src/pages/dashboard/[subdomain]/import/mirror.tsx +++ b/src/pages/dashboard/[subdomain]/import/mirror.tsx @@ -8,9 +8,7 @@ import { getServerSideProps as getLayoutServerSideProps } from "~/components/das import { GetServerSideProps } from "next" import { serverSidePropsHandler } from "~/lib/server-side-props" import { useForm } from "react-hook-form" -import { Input } from "~/components/ui/Input" import { Button } from "~/components/ui/Button" -import { readFiles } from "~/lib/read-files" import { getSiteLink } from "~/lib/helpers" import type { NoteMetadata } from "crossbell.js" import { ImportPreview } from "~/components/dashboard/ImportPreview" @@ -88,13 +86,15 @@ export default function ImportMarkdownPage() {
-
Preview your entries on Mirror.xyz
+
+ {t("Preview your Mirror.xyz entries")} +
{notes?.length ? ( notes?.map((note: NoteMetadata) => ( )) ) : ( -
No files chosen
+
{t("No entries")}
)}