diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a2d6891e..c04b9ea1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,4 +9,4 @@ updates: directory: "/" schedule: interval: "daily" - open-pull-requests-limit: 10 \ No newline at end of file + open-pull-requests-limit: 10 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a88f6c0a..ee923832 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,14 +1,19 @@ ### WHAT + copilot:summary copilot:poem ### WHY + ### HOW + copilot:walkthrough ### CLAIM REWARDS + + For first-time contributors, please leave your xLog address and Discord ID below to claim your rewards. diff --git a/.github/workflows/nextjs_bundle_analysis.yml b/.github/workflows/nextjs_bundle_analysis.yml index 127a0098..f6ab9ad9 100644 --- a/.github/workflows/nextjs_bundle_analysis.yml +++ b/.github/workflows/nextjs_bundle_analysis.yml @@ -94,4 +94,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: pr - path: ./pr-id.txt \ No newline at end of file + path: ./pr-id.txt diff --git a/README.md b/README.md index 32cbdb21..526934a9 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,4 @@ We will provide some small gifts to contributors as a token of appreciation, cur - [Mix Space](https://github.com/mx-space): Another excellent blogging platform integrated with xLog. - [xLog mobile](https://github.com/Crossbell-Box/xLog-mobile): The mobile app for xLog. - [xLog custom css debugger](https://github.com/birdgg/xLog-custom-css-debugger): A convenient chrome extension for debugging custom CSS in Xlog. -- [xLog card](https://github.com/Alex-Programer/xlog-card): Card component for displaying xLog information. \ No newline at end of file +- [xLog card](https://github.com/Alex-Programer/xlog-card): Card component for displaying xLog information. diff --git a/data/filter.json b/data/filter.json index f41d7846..2f49437d 100644 --- a/data/filter.json +++ b/data/filter.json @@ -1,4 +1,7 @@ { - "latest": [151, 53994, 54570, 54481, 54537, 54302, 53944, 55768, 55855, 56592, 54986, 56875, 56873, 56666, 55996], + "latest": [ + 151, 53994, 54570, 54481, 54537, 54302, 53944, 55768, 55855, 56592, 54986, + 56875, 56873, 56666, 55996 + ], "comment": [54986] -} \ No newline at end of file +} diff --git a/data/titles.json b/data/titles.json index 3158390c..e16d5618 100644 --- a/data/titles.json +++ b/data/titles.json @@ -5,8 +5,8 @@ "list": [ 10, 30, 12, 32022, 32179, 45, 19, 4583, 4381, 32168, 33446, 33492, 52055, 153, 50143, 51470, 31132, 45089, 50351, 52343, 5825, 51406, 53864, 43086, - 47393, 54315, 50131, 54939, 55096, 55081, 45828, 4565, 50088, 55399, 52323, - 55960 + 47393, 54315, 50131, 54939, 55096, 55081, 45828, 4565, 50088, 55399, + 52323, 55960 ] } ] diff --git a/data/topics.json b/data/topics.json index 517d1205..15230c1e 100644 --- a/data/topics.json +++ b/data/topics.json @@ -2,18 +2,12 @@ { "name": "xLog", "description": "Let's talk about xLog, whether to praise or criticize it.", - "includeTags": [ - "xLog" - ], - "includeKeywords": [ - "xLog" - ] + "includeTags": ["xLog"], + "includeKeywords": ["xLog"] }, { "name": "Web3", - "includeTags": [ - "Web3" - ], + "includeTags": ["Web3"], "includeKeywords": [ "Web3", "Blockchain", @@ -35,24 +29,13 @@ { "name": "Artificial Intelligence", "description": "The world is undergoing changes, and we are at the center of it.", - "includeTags": [ - "AI" - ], - "includeKeywords": [ - "GPT", - "Midjourney", - "AIGC", - " AI ", - "OpenAI" - ] + "includeTags": ["AI"], + "includeKeywords": ["GPT", "Midjourney", "AIGC", " AI ", "OpenAI"] }, { "name": "Life Journal", "description": "Discover new perspectives and insights in others' weekly, monthly, or yearly journal.", - "includeTags": [ - "Life", - "生活" - ], + "includeTags": ["Life", "生活"], "includeKeywords": [ "Review", "Weekly", @@ -66,10 +49,7 @@ { "name": "Fiction", "description": "Experience a world of imagination through these fiction stories.", - "includeTags": [ - "Fiction", - "小说" - ], + "includeTags": ["Fiction", "小说"], "notes": [ "55405-3", "54513-24", @@ -121,10 +101,7 @@ }, { "name": "Coding", - "includeTags": [ - "Coding", - "编程" - ], + "includeTags": ["Coding", "编程"], "includeKeywords": [ "Coding", "编程", diff --git a/package.json b/package.json index 4d440367..dd7ab5df 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ "lint-staged": "13.2.3", "postcss-import": "15.1.0", "postcss-prune-var": "1.1.1", - "prettier": "2.8.8", + "prettier": "3.0.0", "prettier-package-json": "2.8.0", "prisma": "4.16.2", "tailwindcss": "3.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c7ac0c5..6c4acc19 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -396,7 +396,7 @@ devDependencies: version: 13.4.9 '@trivago/prettier-plugin-sort-imports': specifier: 4.1.1 - version: 4.1.1(prettier@2.8.8) + version: 4.1.1(prettier@3.0.0) '@types/async-lock': specifier: 1.4.0 version: 1.4.0 @@ -500,8 +500,8 @@ devDependencies: specifier: 1.1.1 version: 1.1.1 prettier: - specifier: 2.8.8 - version: 2.8.8 + specifier: 3.0.0 + version: 3.0.0 prettier-package-json: specifier: 2.8.0 version: 2.8.0 @@ -4241,7 +4241,7 @@ packages: engines: {node: '>= 10'} dev: false - /@trivago/prettier-plugin-sort-imports@4.1.1(prettier@2.8.8): + /@trivago/prettier-plugin-sort-imports@4.1.1(prettier@3.0.0): resolution: {integrity: sha512-dQ2r2uzNr1x6pJsuh/8x0IRA3CBUB+pWEW3J/7N98axqt7SQSm+2fy0FLNXvXGg77xEDC7KHxJlHfLYyi7PDcw==} peerDependencies: '@vue/compiler-sfc': 3.x @@ -4256,7 +4256,7 @@ packages: '@babel/types': 7.17.0 javascript-natural-sort: 0.7.1 lodash: 4.17.21 - prettier: 2.8.8 + prettier: 3.0.0 transitivePeerDependencies: - supports-color dev: true @@ -11028,9 +11028,9 @@ packages: sort-order: 1.0.1 dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.0.0: + resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} + engines: {node: '>=14'} hasBin: true dev: true diff --git a/src/app/dashboard/[subdomain]/editor/page-component.tsx b/src/app/dashboard/[subdomain]/editor/page-component.tsx index 50f08af8..07f8f9e5 100644 --- a/src/app/dashboard/[subdomain]/editor/page-component.tsx +++ b/src/app/dashboard/[subdomain]/editor/page-component.tsx @@ -300,9 +300,8 @@ export default function SubdomainEditor() { if (createPage.data?.noteId) { router.replace( - `/dashboard/${subdomain}/editor?id=${ - createPage.data?.noteId - }&type=${searchParams?.get("type")}`, + `/dashboard/${subdomain}/editor?id=${createPage.data + ?.noteId}&type=${searchParams?.get("type")}`, ) } const modalId = "publish-modal" diff --git a/src/app/dashboard/[subdomain]/page-component.tsx b/src/app/dashboard/[subdomain]/page-component.tsx index 53894cf0..bfa336b4 100644 --- a/src/app/dashboard/[subdomain]/page-component.tsx +++ b/src/app/dashboard/[subdomain]/page-component.tsx @@ -203,9 +203,8 @@ export default function SubdomainIndex() {
{pages.data?.pages[0]?.list.map((item) => ( diff --git a/src/components/dashboard/PagesManager.tsx b/src/components/dashboard/PagesManager.tsx index 55ad795a..caef7f9c 100644 --- a/src/components/dashboard/PagesManager.tsx +++ b/src/components/dashboard/PagesManager.tsx @@ -239,123 +239,126 @@ export const PagesManager = ({ isPost }: { isPost: boolean }) => { )} - {pages.data?.pages.map((page) => - page.list?.map((page) => { - currentLength++ - return ( - -
- -
-
- {page.metadata?.content?.title ? ( -
- {page.metadata?.content?.title} -
- ) : ( -
- {page.metadata?.content?.summary} -
- )} -
- - {t(getPageVisibility(page))} - - · - - {getPageVisibility(page) === PageVisibilityEnum.Draft - ? date.formatDate(page.updatedAt) - : date.formatDate( - page.metadata?.content?.date_published || "", - )} - - {pinnedPage.noteId === page.noteId && ( - <> - · - - {" "} - {siteT("Pinned")} - - - )} + ? "bg-gray-200" + : `hover:bg-gray-200`, + )} + onClick={(e) => { + e.preventDefault() + // Toggle selection + if ( + batchSelected.includes( + page.noteId || page.draftKey || 0, + ) + ) { + // Deselect + setBatchSelected( + batchSelected.filter( + (pageId) => + pageId !== page.noteId || page.draftKey || 0, + ), + ) + } else { + // Do select + setBatchSelected([ + ...batchSelected, + page.noteId || page.draftKey || 0, + ]) + } + }} + > + +
-
-
- - {({ open, close }) => ( - <> - - - - - - +
+ {page.metadata?.content?.title ? ( +
+ {page.metadata?.content?.title} +
+ ) : ( +
+ {page.metadata?.content?.summary} +
)} -
-
- - ) - }), +
+ + {t(getPageVisibility(page))} + + · + + {getPageVisibility(page) === PageVisibilityEnum.Draft + ? date.formatDate(page.updatedAt) + : date.formatDate( + page.metadata?.content?.date_published || "", + )} + + {pinnedPage.noteId === page.noteId && ( + <> + · + + {" "} + {siteT("Pinned")} + + + )} +
+
+
+ + {({ open, close }) => ( + <> + + + + + + + )} + +
+ + ) + }), )} {pages.hasNextPage && ( diff --git a/src/components/dashboard/PagesManagerBatchSelectActionTab.tsx b/src/components/dashboard/PagesManagerBatchSelectActionTab.tsx index a5abb5dc..7d3d07e7 100644 --- a/src/components/dashboard/PagesManagerBatchSelectActionTab.tsx +++ b/src/components/dashboard/PagesManagerBatchSelectActionTab.tsx @@ -47,10 +47,11 @@ export const PagesManagerBatchSelectActionTab = ({ onClick: () => { // Get all page IDs const allIDs: (string | number)[] = [] - pages?.pages.map((page) => - page.list?.map((page) => { - allIDs.push(getPageId(page)) - }), + pages?.pages.map( + (page) => + page.list?.map((page) => { + allIDs.push(getPageId(page)) + }), ) setBatchSelected(allIDs) }, @@ -69,12 +70,13 @@ export const PagesManagerBatchSelectActionTab = ({ // Find all selected const selectedPages: ExpandedNote[] = [] - pages?.pages.map((page) => - page.list?.map((page) => { - if (batchSelected.includes(getPageId(page))) { - selectedPages.push(page) - } - }), + pages?.pages.map( + (page) => + page.list?.map((page) => { + if (batchSelected.includes(getPageId(page))) { + selectedPages.push(page) + } + }), ) // Convert all // TODO: use multicall to optimize @@ -135,12 +137,13 @@ export const PagesManagerBatchSelectActionTab = ({ // Find all selected const selectedPages: ExpandedNote[] = [] - pages?.pages.map((page) => - page.list?.map((page) => { - if (batchSelected.includes(page.noteId || page.draftKey || 0)) { - selectedPages.push(page) - } - }), + pages?.pages.map( + (page) => + page.list?.map((page) => { + if (batchSelected.includes(page.noteId || page.draftKey || 0)) { + selectedPages.push(page) + } + }), ) // Delete all // TODO: use multicall to optimize diff --git a/src/components/site/PostMeta.tsx b/src/components/site/PostMeta.tsx index cbbbc17e..48170853 100644 --- a/src/components/site/PostMeta.tsx +++ b/src/components/site/PostMeta.tsx @@ -30,9 +30,7 @@ export default function PostMeta({ {page.metadata?.content?.tags ?.filter((tag) => tag !== "post" && tag !== "page") - .map((tag) => ( - - ))} + .map((tag) => )} ) : null} diff --git a/src/components/ui/Input.tsx b/src/components/ui/Input.tsx index 306f7a01..e78f2c55 100644 --- a/src/components/ui/Input.tsx +++ b/src/components/ui/Input.tsx @@ -52,7 +52,7 @@ export const Input = forwardRef(function Input< isBlock && `is-block`, className, ), - } as any), + }) as any, [className, hasAddon, hasPrefix, inputProps, isBlock, ref], ) diff --git a/src/css/variables.css b/src/css/variables.css index 4cc1ccae..d8693bbc 100644 --- a/src/css/variables.css +++ b/src/css/variables.css @@ -38,10 +38,10 @@ html.dark { mix-blend-mode: normal; } -.dark::view-transition-old(root){ +.dark::view-transition-old(root) { z-index: 9999; } -.dark::view-transition-new(root){ +.dark::view-transition-new(root) { z-index: 1; -} \ No newline at end of file +} diff --git a/src/lib/expand-unit.ts b/src/lib/expand-unit.ts index c404919c..8b030642 100644 --- a/src/lib/expand-unit.ts +++ b/src/lib/expand-unit.ts @@ -73,9 +73,8 @@ export const expandCrossbellNote = async ({ if (useStat) { if ((note as any).stat?.viewDetailCount) { - expandedNote.metadata.content.views = ( - note as any - ).stat?.viewDetailCount + expandedNote.metadata.content.views = (note as any).stat + ?.viewDetailCount } else { const stat = await ( await fetch( diff --git a/src/lib/i18n/locales/en/dashboard.json b/src/lib/i18n/locales/en/dashboard.json index 7a21d580..5a988524 100644 --- a/src/lib/i18n/locales/en/dashboard.json +++ b/src/lib/i18n/locales/en/dashboard.json @@ -1,5 +1,5 @@ { - "link post-vs-page" : "https://wordpress.com/zh-cn/support/post-vs-page/", + "link post-vs-page": "https://wordpress.com/zh-cn/support/post-vs-page/", "delete_confirmation_post": "Are you sure you want to DELETE this post?", "delete_confirmation_page": "Are you sure you want to DELETE this page?" -} \ No newline at end of file +} diff --git a/src/lib/i18n/locales/en/site.json b/src/lib/i18n/locales/en/site.json index 4be94085..a26ee22c 100644 --- a/src/lib/i18n/locales/en/site.json +++ b/src/lib/i18n/locales/en/site.json @@ -2,4 +2,4 @@ "load more": "There are {{count}} more {{name}}, click to load more", "signed and stored on the blockchain": "Ownership of this {{name}} data is guaranteed by blockchain and smart contracts to the creator alone.", "Cancel Download": "Cancel" -} \ No newline at end of file +} diff --git a/src/lib/i18n/locales/ja/index.json b/src/lib/i18n/locales/ja/index.json index 057af974..70c71a4c 100644 --- a/src/lib/i18n/locales/ja/index.json +++ b/src/lib/i18n/locales/ja/index.json @@ -23,4 +23,4 @@ "Submit yours": "自分のを投稿する", "xLog's open design allows it to integrate with many other open protocols and applications without friction.": "xLogのオープンな設計により、他の多くのオープンプロトコルやアプリケーションとスムーズに統合することができます。", "Dashboard": "ダッシュボード" -} \ No newline at end of file +} diff --git a/src/lib/i18n/locales/zh-TW/dashboard.json b/src/lib/i18n/locales/zh-TW/dashboard.json index cc448b9f..06e0b51c 100644 --- a/src/lib/i18n/locales/zh-TW/dashboard.json +++ b/src/lib/i18n/locales/zh-TW/dashboard.json @@ -1,208 +1,208 @@ { - "Dashboard": "洞察", - "Posts": "文章", - "Pages": "頁面", - "Notifications": "通知", - "Unread notifications": "未讀通知", - "Settings": "設定", - "Events": "活動", - "New Events": "新活動", - "Site Stats": "網站統計", - "Published posts": "文章", - "Received comments": "留言", - "Followers": "粉絲", - "Viewed": "瀏覽量", - "Received tips": "Donate", - "Site Duration": "Blog 誕生", - "days": "天", - "Deleted!": "刪掉了哦!", - "Fail to Deleted.": "删除失败", - "Converted!": "轉換成功!", - "Failed to convert.": "轉換失敗。", - "All Posts": "所有文章", - "All Pages": "所有頁面", - "Published": "已發佈", - "published": "已發佈", - "Draft": "草稿", - "draft": "草稿", - "Scheduled": "定時發佈", - "scheduled": "定時發佈", - "published and local modified": "已發佈且有尚未更新的內容", - "link post-vs-page": "https://wordpress.com/zh-tw/support/post-vs-page/", - "posts description": "文章是按時間倒序在你的網站上列出的條目。可以將它們看作是更新,以提供新內容給讀者。<2>文章與頁面。", - "pages description": "頁面是靜態的,不受日期影響。它們更像是你網站上的永久元素,比如“關於我們”、“聯繫我們”等。 <2>文章與頁面。", - "pages add": "創建頁面後,你可以將其<2>添加到你網站的導航菜單中,以便瀏覽者可以找到它。", - "New Post": "新建文章", - "New Page": "新建頁面", - "Import": "匯入", - "Import markdown file with front matter supported": "匯入 Markdown 文件(支持 Front Matter)", - "View Site": "查看網站", - "hello": { - "welcome": "

👋 你好哇,

歡迎使用 xLog!

以下是一些有用的連結,幫助你開始使用 xLog:

", - "hidden": "👋 你好哇", - "community": "

加入我們的社區,認識新朋友或給予 xLog 協助:

" - }, - "Edit": "編輯 ", - "Convert to Page": "轉換為頁面", - "Convert to Post": "轉換為文章", - "Select All": "全部選擇", - "Deselect All": "取消選擇", - "Delete": "刪除", - "Heading": "標題", - "Bold": "粗體", - "Italic": "斜體", - "Strikethrough": "刪除線", - "Underline": "底線", - "Quote": "引用", - "Inline Code": "行內程式碼", - "Code Block": "程式碼區塊", - "Unordered List": "無序列表", - "Ordered List": "有序列表", - "Link": "連結", - "Image": "圖片", - "Upload Image, Audio or Video": "上傳圖片、音頻或視頻", - "Preview": "預覽", - "Publish": "發布", - "Update": "更新", - "Discard Changes": "捨棄變更", - "Publish at": "發布時間", - "This post will be accessible from this time. Leave blank to use the current time.": "文章將在此時間後可訪問。留空則使用當前時間。", - "This page will be accessible from this time. Leave blank to use the current time.": "頁面將在此時間後可訪問。留空則使用當前時間。", - "The post is currently not public as its publication date has been scheduled for a future time.": "該帖子目前沒有公開,因為它的發布日期已被安排在未來。", - "Post slug": "文章短連結", - "Page slug": "頁面短連結", - "This post will be accessible at": "此文章將可通過以下連結瀏覽", - "This page will be accessible at": "此頁面將可通過以下連結瀏覽", - "Tags": "標籤", - "Separate multiple tags with English commas": "多個標籤請用英文逗號分隔", - "Excerpt": "摘要", - "Leave it blank to use auto-generated excerpt": "留空則使用自動生成的摘要", - "General": "一般", - "Social Platforms": "社交媒體", - "Navigation": "導航", - "Domains": "網域", - "Custom CSS": "自定義 CSS", - "Operators": "身份授權", - "Export data": "匯出資料", - "Site Settings": "網站設置", - "Icon": "圖標", - "Banner": "橫幅", - "Supports both pictures and videos.": "支持圖片和影片。", - "Name": "名稱", - "Description": "自我介紹", - "Integrate Google Analytics": "將 Google Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Measurement ID。", - "Integrate Umami Cloud Analytics": "將 Umami Cloud Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Website ID。", - "Integrate Umami Cloud Analytics (set url)": "留空以使用<2>Umami Cloud。", - "Save": "儲存", - "Tips": "提示", - "social tips": { - "p1": "這些社交平台會顯示在你的 xLog 的右下角。", - "p2": "我們支援<2>這些平台,自動顯示其標誌和連結。對於其他平台,將顯示預設標誌。如果你有其他需求,請隨時向我們提交問題或PR,以支援更多的平台。", - "p3": "你還可以在 <2>xSync 上連接到 Twitter、Telegram 頻道、Medium、Substack 等平台,並自動同步內容。當你在那裡設置同步後,它也會顯示在這裡。" - }, - "Platform": "平台", - "Identity": "身份", - "Remove": "移除", - "New Item": "新建項目", - "xLog provides some out-of-the-box built-in pages": "xLog 提供了一些開箱即用的內建頁面", - "Home page": "首頁", - "Archives page": "封存頁面", - "Tag page": "標籤頁面", - "NFT Showcase page": "NFT 展示頁面", - "Label": "標籤", - "URL": "連結", - "subdomain": "子網域", - "Custom Domain": "自訂網域", - "Set the following record on your DNS provider to active your custom domain": "在你的 DNS 提供商上設定以下紀錄以啟用自訂網域", - "Scope: These styles will be applied to your entire blog, including this dashboard.": "範圍:這些樣式將套用至你的整個部落格,包括此儀表板。", - "Support": "支援", - "CSS variables: xLog provides some built-in CSS variables": "CSS 變數:xLog 提供了一些內建的 CSS 變數", - "Address": "地址", - "Character": "身份", - "New operator": "新建授權", - "Operator Address": "授權地址", - "Operator Character Check": "身份授權檢查", - "Warning": "警告", - "Operators have permissions to enter your dashboard, change your settings(excluding xLog subdomain) and post, modify, delete contents on your site.": "授權者可以進入你的儀表板,更改你的設定(不包括 xLog 子網域)並在你的網站上發佈、修改、刪除內容。", - "Add": "新增", - "xLog News": "xLog 新聞", - "More": "更多", - "Meet New Friends": "認識新朋友", - "Need help?": "需要幫助?", - "Your post has been securely stored on the blockchain. Now you may want to": "你的文章已經安全地存儲在區塊鏈上。現在你可能想要", - "View the post": "查看文章", - "View the transaction": "查看交易", - "Share to Twitter": "分享到 Twitter", - "Got it, thanks!": "知道了,謝謝!", - "Published!": "已發佈!", - "Title goes here...": "標題在這裡...", - "Start writing...": "開始寫作...", - "Slug can only contain letters, numbers, hyphens, and underscores.": "短網址只能包含字母、數字、連字符和底線。", - "Date": "日期", - "Prize": "獎金", - "Winners": "獲獎者", - "Learn more": "進一步了解", - "Ended": "已結束", - "Upcoming": "即將開始", - "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 項目", - "Please select .md files, multiple files are supported, and front matter is supported.": "請選擇 .md 檔案,支援多個檔案,並支援 front matter。", - "Achievements": "成就", - "Tokens": "虛擬貨幣", - "$MIRA is a valuable token in the Crossbell world, and can be easily exchanged on the Crosschain Bridge and Uniswap.": "$MIRA 是 Crossbell 世界中的一種有珍貴的代幣,可在跨鏈橋和 Uniswap 上輕鬆兌換。", - "In the early stage, xLog will use $MIRA to motivate creators.": "在早期階段,xLog 將使用 $MIRA 激勵創作者。", - "You can obtain $MIRA through the following ways:": "你可以透過以下方式獲得 $MIRA:", - "Creator incentive program.": "創作者激勵計畫。", - "Participate in events.": "參加活動。", - "Swap from USDC.": "從 USDC 兌換。", - "Received tips and sponsorships from readers.": "從讀者收到打賞和贊助。", - "Swap to USDC": "兌換成 USDC", - "Free Claim": "免費領取", - "$XLOG is related to xLog DAO, but it's too early now, please stay tuned.": "$XLOG 與 xLog DAO 相關,但現在還為時尚早,敬請期待。", - "Stay tuned": "敬請期待", - "This is a token used for interaction on the Crossbell blockchain, which can be claimed for free from the faucet, so there's no need to worry about its balance.": "這是一個用於 Crossbell 區塊鏈上互動的虛擬貨幣,可以從水龍頭免費領取,因此不用擔心其餘額。", - "Balance": "餘額", - "Swap Tutorial": "兌換教學", - "DNS Checking": "DNS 檢查中", - "DNS check passed.": "DNS 檢查通過。", - "DNS check failed.": "DNS 檢查失敗。", - "Recheck": "重新檢查", - "Hottest": "熱門", - "Latest": "最新", - "Following": "追蹤", - "Create a Post": "新增文章", - "Change Site Icon or domain": "變更網站圖示或域名", - "Join xLog's Discord channel": "加入 xLog 的 Discord 頻道", - "Participate in the development of xLog": "參與 xLog 的發展", - "Follow xLog's Twitter": "追蹤 xLog 的 Twitter", - "Check out the updates of other bloggers": "看看其他 Blogger 的更新", - "You have already imported them, please enter the post page to create a new post!": "已經匯入完成了哦,請到文章頁面新增新的內容!", - "Today": "今天", - "This month": "本月", - "This week": "本周", - "All time": "全部", - "delete_confirmation_post": "你確認要刪除這篇文章嗎?", - "delete_confirmation_page": "你確認要刪除這個頁面嗎?", - "Confirm": "確認", - "Cancel": "取消", - "Published a new post on my blockchain blog: {{title}}. Check it out now!": "我在我的區塊鏈部落格發佈了一片新的文章《{{title}}》,快來看看吧!", - "Comments": "留言", - "You can subscribe to comments through an RSS reader to receive timely reminders.": "你可以通過 RSS 閱讀器訂閱留言,以便及時收到通知。", - "Subscription address:": "訂閱地址:", - "comment on your": "回覆了你的 {{type}}「{{toTitle}}」", - "{{newCount}} new comments": "{{newCount}} 條新留言", - "Upload All Images to IPFS": "上傳所有圖片到 IPFS", - "Help: Markdown syntax and components used by xLog": "幫助:xLog 使用的 Markdown 語法和組件", - "Align Center": "居中", - "Align Right": "靠右", - "Formula": "公式", - "Advanced Settings": "高級設置", - "Disable AI-generated summary": "禁用 AI 生成的摘要", - "Pin": "釘選", - "Unpin": "取消釘選" + "Dashboard": "洞察", + "Posts": "文章", + "Pages": "頁面", + "Notifications": "通知", + "Unread notifications": "未讀通知", + "Settings": "設定", + "Events": "活動", + "New Events": "新活動", + "Site Stats": "網站統計", + "Published posts": "文章", + "Received comments": "留言", + "Followers": "粉絲", + "Viewed": "瀏覽量", + "Received tips": "Donate", + "Site Duration": "Blog 誕生", + "days": "天", + "Deleted!": "刪掉了哦!", + "Fail to Deleted.": "删除失败", + "Converted!": "轉換成功!", + "Failed to convert.": "轉換失敗。", + "All Posts": "所有文章", + "All Pages": "所有頁面", + "Published": "已發佈", + "published": "已發佈", + "Draft": "草稿", + "draft": "草稿", + "Scheduled": "定時發佈", + "scheduled": "定時發佈", + "published and local modified": "已發佈且有尚未更新的內容", + "link post-vs-page": "https://wordpress.com/zh-tw/support/post-vs-page/", + "posts description": "文章是按時間倒序在你的網站上列出的條目。可以將它們看作是更新,以提供新內容給讀者。<2>文章與頁面。", + "pages description": "頁面是靜態的,不受日期影響。它們更像是你網站上的永久元素,比如“關於我們”、“聯繫我們”等。 <2>文章與頁面。", + "pages add": "創建頁面後,你可以將其<2>添加到你網站的導航菜單中,以便瀏覽者可以找到它。", + "New Post": "新建文章", + "New Page": "新建頁面", + "Import": "匯入", + "Import markdown file with front matter supported": "匯入 Markdown 文件(支持 Front Matter)", + "View Site": "查看網站", + "hello": { + "welcome": "

👋 你好哇,

歡迎使用 xLog!

以下是一些有用的連結,幫助你開始使用 xLog:

", + "hidden": "👋 你好哇", + "community": "

加入我們的社區,認識新朋友或給予 xLog 協助:

" + }, + "Edit": "編輯 ", + "Convert to Page": "轉換為頁面", + "Convert to Post": "轉換為文章", + "Select All": "全部選擇", + "Deselect All": "取消選擇", + "Delete": "刪除", + "Heading": "標題", + "Bold": "粗體", + "Italic": "斜體", + "Strikethrough": "刪除線", + "Underline": "底線", + "Quote": "引用", + "Inline Code": "行內程式碼", + "Code Block": "程式碼區塊", + "Unordered List": "無序列表", + "Ordered List": "有序列表", + "Link": "連結", + "Image": "圖片", + "Upload Image, Audio or Video": "上傳圖片、音頻或視頻", + "Preview": "預覽", + "Publish": "發布", + "Update": "更新", + "Discard Changes": "捨棄變更", + "Publish at": "發布時間", + "This post will be accessible from this time. Leave blank to use the current time.": "文章將在此時間後可訪問。留空則使用當前時間。", + "This page will be accessible from this time. Leave blank to use the current time.": "頁面將在此時間後可訪問。留空則使用當前時間。", + "The post is currently not public as its publication date has been scheduled for a future time.": "該帖子目前沒有公開,因為它的發布日期已被安排在未來。", + "Post slug": "文章短連結", + "Page slug": "頁面短連結", + "This post will be accessible at": "此文章將可通過以下連結瀏覽", + "This page will be accessible at": "此頁面將可通過以下連結瀏覽", + "Tags": "標籤", + "Separate multiple tags with English commas": "多個標籤請用英文逗號分隔", + "Excerpt": "摘要", + "Leave it blank to use auto-generated excerpt": "留空則使用自動生成的摘要", + "General": "一般", + "Social Platforms": "社交媒體", + "Navigation": "導航", + "Domains": "網域", + "Custom CSS": "自定義 CSS", + "Operators": "身份授權", + "Export data": "匯出資料", + "Site Settings": "網站設置", + "Icon": "圖標", + "Banner": "橫幅", + "Supports both pictures and videos.": "支持圖片和影片。", + "Name": "名稱", + "Description": "自我介紹", + "Integrate Google Analytics": "將 Google Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Measurement ID。", + "Integrate Umami Cloud Analytics": "將 Umami Cloud Analytics 整合至你的網站中。請按照<2>這裡的說明查找你的 Website ID。", + "Integrate Umami Cloud Analytics (set url)": "留空以使用<2>Umami Cloud。", + "Save": "儲存", + "Tips": "提示", + "social tips": { + "p1": "這些社交平台會顯示在你的 xLog 的右下角。", + "p2": "我們支援<2>這些平台,自動顯示其標誌和連結。對於其他平台,將顯示預設標誌。如果你有其他需求,請隨時向我們提交問題或PR,以支援更多的平台。", + "p3": "你還可以在 <2>xSync 上連接到 Twitter、Telegram 頻道、Medium、Substack 等平台,並自動同步內容。當你在那裡設置同步後,它也會顯示在這裡。" + }, + "Platform": "平台", + "Identity": "身份", + "Remove": "移除", + "New Item": "新建項目", + "xLog provides some out-of-the-box built-in pages": "xLog 提供了一些開箱即用的內建頁面", + "Home page": "首頁", + "Archives page": "封存頁面", + "Tag page": "標籤頁面", + "NFT Showcase page": "NFT 展示頁面", + "Label": "標籤", + "URL": "連結", + "subdomain": "子網域", + "Custom Domain": "自訂網域", + "Set the following record on your DNS provider to active your custom domain": "在你的 DNS 提供商上設定以下紀錄以啟用自訂網域", + "Scope: These styles will be applied to your entire blog, including this dashboard.": "範圍:這些樣式將套用至你的整個部落格,包括此儀表板。", + "Support": "支援", + "CSS variables: xLog provides some built-in CSS variables": "CSS 變數:xLog 提供了一些內建的 CSS 變數", + "Address": "地址", + "Character": "身份", + "New operator": "新建授權", + "Operator Address": "授權地址", + "Operator Character Check": "身份授權檢查", + "Warning": "警告", + "Operators have permissions to enter your dashboard, change your settings(excluding xLog subdomain) and post, modify, delete contents on your site.": "授權者可以進入你的儀表板,更改你的設定(不包括 xLog 子網域)並在你的網站上發佈、修改、刪除內容。", + "Add": "新增", + "xLog News": "xLog 新聞", + "More": "更多", + "Meet New Friends": "認識新朋友", + "Need help?": "需要幫助?", + "Your post has been securely stored on the blockchain. Now you may want to": "你的文章已經安全地存儲在區塊鏈上。現在你可能想要", + "View the post": "查看文章", + "View the transaction": "查看交易", + "Share to Twitter": "分享到 Twitter", + "Got it, thanks!": "知道了,謝謝!", + "Published!": "已發佈!", + "Title goes here...": "標題在這裡...", + "Start writing...": "開始寫作...", + "Slug can only contain letters, numbers, hyphens, and underscores.": "短網址只能包含字母、數字、連字符和底線。", + "Date": "日期", + "Prize": "獎金", + "Winners": "獲獎者", + "Learn more": "進一步了解", + "Ended": "已結束", + "Upcoming": "即將開始", + "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 項目", + "Please select .md files, multiple files are supported, and front matter is supported.": "請選擇 .md 檔案,支援多個檔案,並支援 front matter。", + "Achievements": "成就", + "Tokens": "虛擬貨幣", + "$MIRA is a valuable token in the Crossbell world, and can be easily exchanged on the Crosschain Bridge and Uniswap.": "$MIRA 是 Crossbell 世界中的一種有珍貴的代幣,可在跨鏈橋和 Uniswap 上輕鬆兌換。", + "In the early stage, xLog will use $MIRA to motivate creators.": "在早期階段,xLog 將使用 $MIRA 激勵創作者。", + "You can obtain $MIRA through the following ways:": "你可以透過以下方式獲得 $MIRA:", + "Creator incentive program.": "創作者激勵計畫。", + "Participate in events.": "參加活動。", + "Swap from USDC.": "從 USDC 兌換。", + "Received tips and sponsorships from readers.": "從讀者收到打賞和贊助。", + "Swap to USDC": "兌換成 USDC", + "Free Claim": "免費領取", + "$XLOG is related to xLog DAO, but it's too early now, please stay tuned.": "$XLOG 與 xLog DAO 相關,但現在還為時尚早,敬請期待。", + "Stay tuned": "敬請期待", + "This is a token used for interaction on the Crossbell blockchain, which can be claimed for free from the faucet, so there's no need to worry about its balance.": "這是一個用於 Crossbell 區塊鏈上互動的虛擬貨幣,可以從水龍頭免費領取,因此不用擔心其餘額。", + "Balance": "餘額", + "Swap Tutorial": "兌換教學", + "DNS Checking": "DNS 檢查中", + "DNS check passed.": "DNS 檢查通過。", + "DNS check failed.": "DNS 檢查失敗。", + "Recheck": "重新檢查", + "Hottest": "熱門", + "Latest": "最新", + "Following": "追蹤", + "Create a Post": "新增文章", + "Change Site Icon or domain": "變更網站圖示或域名", + "Join xLog's Discord channel": "加入 xLog 的 Discord 頻道", + "Participate in the development of xLog": "參與 xLog 的發展", + "Follow xLog's Twitter": "追蹤 xLog 的 Twitter", + "Check out the updates of other bloggers": "看看其他 Blogger 的更新", + "You have already imported them, please enter the post page to create a new post!": "已經匯入完成了哦,請到文章頁面新增新的內容!", + "Today": "今天", + "This month": "本月", + "This week": "本周", + "All time": "全部", + "delete_confirmation_post": "你確認要刪除這篇文章嗎?", + "delete_confirmation_page": "你確認要刪除這個頁面嗎?", + "Confirm": "確認", + "Cancel": "取消", + "Published a new post on my blockchain blog: {{title}}. Check it out now!": "我在我的區塊鏈部落格發佈了一片新的文章《{{title}}》,快來看看吧!", + "Comments": "留言", + "You can subscribe to comments through an RSS reader to receive timely reminders.": "你可以通過 RSS 閱讀器訂閱留言,以便及時收到通知。", + "Subscription address:": "訂閱地址:", + "comment on your": "回覆了你的 {{type}}「{{toTitle}}」", + "{{newCount}} new comments": "{{newCount}} 條新留言", + "Upload All Images to IPFS": "上傳所有圖片到 IPFS", + "Help: Markdown syntax and components used by xLog": "幫助:xLog 使用的 Markdown 語法和組件", + "Align Center": "居中", + "Align Right": "靠右", + "Formula": "公式", + "Advanced Settings": "高級設置", + "Disable AI-generated summary": "禁用 AI 生成的摘要", + "Pin": "釘選", + "Unpin": "取消釘選" } diff --git a/src/lib/i18n/locales/zh-TW/index.json b/src/lib/i18n/locales/zh-TW/index.json index ea31bccc..1583443e 100644 --- a/src/lib/i18n/locales/zh-TW/index.json +++ b/src/lib/i18n/locales/zh-TW/index.json @@ -1,61 +1,61 @@ { - "Write": "Write", - "Own": "Own", - "Earn": "Earn", - ".": ".", - "Look at others'": "看看別人", - "description": "<0>xLog。最佳 <7>開源 <3>區塊鏈 部落格社群。", - "Get my xLog in 5 minutes": "五分鐘撰寫自我", - "Explore the xLog way": "探索 xLog 之路", - "features": { - "Write": { - "subtitle": "靈感來臨,牢牢抓住", - "description": "釋放創造力,成為時間管理大師!讓寫作更順暢,專注創造未來。" - }, - "Own": { - "subtitle": "鏈上內容,安全無憂", - "description": "通過 Crossbell 區塊鏈發佈你的內容,完全掌控你的權利與安全。
xLog 不存儲任何資料,無法剝奪或修改你的內容和權利,即使 xLog 想這樣做。了解 Crossbell 是如何工作的。", - "extra": { - "title": "不要輕信,堅持驗證", - "description": "不輕信任何人,包括 xLog。建議檢查交易歷史與區塊鏈合約代碼,驗證事實是否符合 xLog 所聲明。", - "button": "揭開 xLog 的神秘面紗" - } - }, - "Earn": { - "subtitle": "賺取虛擬貨幣和權益", - "description": "區塊鏈為優秀的內容創作者提供透明公正的獎勵機會,xLog DAO 更進一步促進社群發展。" - } + "Write": "Write", + "Own": "Own", + "Earn": "Earn", + ".": ".", + "Look at others'": "看看別人", + "description": "<0>xLog。最佳 <7>開源 <3>區塊鏈 部落格社群。", + "Get my xLog in 5 minutes": "五分鐘撰寫自我", + "Explore the xLog way": "探索 xLog 之路", + "features": { + "Write": { + "subtitle": "靈感來臨,牢牢抓住", + "description": "釋放創造力,成為時間管理大師!讓寫作更順暢,專注創造未來。" }, - "Home": "首頁", - "Activities": "文章流", - "Source Code": "原始碼", - "Features": "特色", - "Showcase": "展示櫃", - "Integration": "整合", - "Visit": "訪問", - "Easy to get started": "讓寫作更簡單", - "Easy to get started text": "xLog 支持 Web3 錢包電子郵件 連接,讓你輕鬆創建定制化部落格,享有自定義域名、訂閱、留言、NFT 鑄造、RSS 訂閱和 AI 增強等功能。只需 5 分鐘即可完成,無需申請或費用。", - "Elegant experience": "優雅永不過時", - "Elegant experience text": "雙欄編輯器,實時預覽,創作無壓力,使用標準的 Markdown 語法 ,支持 HTML音視頻數學公式。頁面設計優雅,為讀者提供舒適的閱讀體驗。", - "Fast": "一切精彩的背後", - "Fast text": "區塊鏈低效?不!高效緩存機制和多種優化方案,激發區塊鏈的 極致性能 ,同時提供 PWA 讓您輕鬆本地安裝和使用,加速實現目標!", - "Safe": "資安,我最在行", - "Safe text": "所有資料,包括配置、文章、訂閱、留言等,都被安全地存儲在 區塊鏈 上。只有您持有的 私鑰 才能掌控和訪問這些資料,確保您的隱私得到最大程度的保護。", - "Customizable": "創意,自由揮灑", - "Customizable text": "您可以自由地使用 自己的域名 ,在自己喜愛的風格下自定義網站,xLog 提供豐富的主題和插件系統,讓您 隨心所欲 地打造屬於自己的個性化網站。展現您的獨特風采!", - "Open": "開放,運用自如", - "Open text": "xLog 提供導入和導出工具,豐富的 API第三方 整合,讓您更加自由地管理和使用網站。所有代碼都在 GitHub 上 開源 ,所有資料都在區塊鏈上 透明存儲 ,沒有任何隱瞞。", - "Creator Incentives": "創作者激勵", - "Creator Incentives text": "在早期階段,xLog 以 MIRA 提供激勵。我們正積極構建代幣經濟模型,力求讓 xLog 成為發布高質量內容的最佳平台。我們希望為您提供最好的體驗和最大的價值回報,讓您在創作、分享和社交中感到更加自由和快樂。", - "DAO": "去中心化自治組織", - "DAO text": "我們將建立一個 xLog DAO,讓創作者可以使用 虛擬貨幣 進行投票。我們相信,這將使我們的社區更加開放、公平和民主化,讓每個人都能發揮自己的影響力和貢獻價值。我們期待與您攜手打造一個更加繁榮和有活力的社區!", - "Discover these awesome teams and creators on xLog (sorted by update time)": "在 xLog 上發現這些超棒的團隊和創作者們(按更新時間排序)", - "Follow All!": "追蹤所有人!", - "Already Followed All!": "已追蹤所有人!", - "Show more": "顯示更多", - "Submit yours": "看看你的👀", - "xLog's open design allows it to integrate with many other open protocols and applications without friction.": "我們相信,只有在開放、互聯、共享的基礎上才能有更大的價值和創新。", - "Dashboard": "主控臺", - "Suggested creators for you": "推薦給你一些優質創作者", - "Hot Topics": "流行話題" + "Own": { + "subtitle": "鏈上內容,安全無憂", + "description": "通過 Crossbell 區塊鏈發佈你的內容,完全掌控你的權利與安全。
xLog 不存儲任何資料,無法剝奪或修改你的內容和權利,即使 xLog 想這樣做。了解 Crossbell 是如何工作的。", + "extra": { + "title": "不要輕信,堅持驗證", + "description": "不輕信任何人,包括 xLog。建議檢查交易歷史與區塊鏈合約代碼,驗證事實是否符合 xLog 所聲明。", + "button": "揭開 xLog 的神秘面紗" + } + }, + "Earn": { + "subtitle": "賺取虛擬貨幣和權益", + "description": "區塊鏈為優秀的內容創作者提供透明公正的獎勵機會,xLog DAO 更進一步促進社群發展。" + } + }, + "Home": "首頁", + "Activities": "文章流", + "Source Code": "原始碼", + "Features": "特色", + "Showcase": "展示櫃", + "Integration": "整合", + "Visit": "訪問", + "Easy to get started": "讓寫作更簡單", + "Easy to get started text": "xLog 支持 Web3 錢包電子郵件 連接,讓你輕鬆創建定制化部落格,享有自定義域名、訂閱、留言、NFT 鑄造、RSS 訂閱和 AI 增強等功能。只需 5 分鐘即可完成,無需申請或費用。", + "Elegant experience": "優雅永不過時", + "Elegant experience text": "雙欄編輯器,實時預覽,創作無壓力,使用標準的 Markdown 語法 ,支持 HTML音視頻數學公式。頁面設計優雅,為讀者提供舒適的閱讀體驗。", + "Fast": "一切精彩的背後", + "Fast text": "區塊鏈低效?不!高效緩存機制和多種優化方案,激發區塊鏈的 極致性能 ,同時提供 PWA 讓您輕鬆本地安裝和使用,加速實現目標!", + "Safe": "資安,我最在行", + "Safe text": "所有資料,包括配置、文章、訂閱、留言等,都被安全地存儲在 區塊鏈 上。只有您持有的 私鑰 才能掌控和訪問這些資料,確保您的隱私得到最大程度的保護。", + "Customizable": "創意,自由揮灑", + "Customizable text": "您可以自由地使用 自己的域名 ,在自己喜愛的風格下自定義網站,xLog 提供豐富的主題和插件系統,讓您 隨心所欲 地打造屬於自己的個性化網站。展現您的獨特風采!", + "Open": "開放,運用自如", + "Open text": "xLog 提供導入和導出工具,豐富的 API第三方 整合,讓您更加自由地管理和使用網站。所有代碼都在 GitHub 上 開源 ,所有資料都在區塊鏈上 透明存儲 ,沒有任何隱瞞。", + "Creator Incentives": "創作者激勵", + "Creator Incentives text": "在早期階段,xLog 以 MIRA 提供激勵。我們正積極構建代幣經濟模型,力求讓 xLog 成為發布高質量內容的最佳平台。我們希望為您提供最好的體驗和最大的價值回報,讓您在創作、分享和社交中感到更加自由和快樂。", + "DAO": "去中心化自治組織", + "DAO text": "我們將建立一個 xLog DAO,讓創作者可以使用 虛擬貨幣 進行投票。我們相信,這將使我們的社區更加開放、公平和民主化,讓每個人都能發揮自己的影響力和貢獻價值。我們期待與您攜手打造一個更加繁榮和有活力的社區!", + "Discover these awesome teams and creators on xLog (sorted by update time)": "在 xLog 上發現這些超棒的團隊和創作者們(按更新時間排序)", + "Follow All!": "追蹤所有人!", + "Already Followed All!": "已追蹤所有人!", + "Show more": "顯示更多", + "Submit yours": "看看你的👀", + "xLog's open design allows it to integrate with many other open protocols and applications without friction.": "我們相信,只有在開放、互聯、共享的基礎上才能有更大的價值和創新。", + "Dashboard": "主控臺", + "Suggested creators for you": "推薦給你一些優質創作者", + "Hot Topics": "流行話題" } diff --git a/src/lib/i18n/locales/zh/index.json b/src/lib/i18n/locales/zh/index.json index a4415b05..a50d2278 100644 --- a/src/lib/i18n/locales/zh/index.json +++ b/src/lib/i18n/locales/zh/index.json @@ -52,22 +52,22 @@ "DAO text": "将建立一个xLog DAO,在其中创作者使用代币进行投票。", "Discover these awesome teams and creators on xLog (sorted by update time)": "在 xLog 上发现这些超棒的团队和创作者们(按更新时间排序)", "Follow All!": "关注所有!", - "Already Followed All!" : "已经关注所有!", + "Already Followed All!": "已经关注所有!", "Show more": "显示更多", "Submit yours": "提交你的", "xLog's open design allows it to integrate with many other open protocols and applications without friction.": "xLog 的开放式设计使其能够与许多其他开放协议和应用程序无缝集成,没有任何限制。", "Dashboard": "仪表盘", "Suggested creators for you": "为你推荐的创作者", "Hot Topics": "热门话题", - "Topic Keywords" : "话题关键词", + "Topic Keywords": "话题关键词", "Topic Tags": "话题标签", - "Let's talk about xLog, whether to praise or criticize it." : "让我们来谈谈 xLog,无论赞美和批评。", + "Let's talk about xLog, whether to praise or criticize it.": "让我们来谈谈 xLog,无论赞美和批评。", "Artificial Intelligence": "人工智能", "The world is undergoing changes, and we are at the center of it.": "世界正在发生变革,而我们正处其中心。", "Life Journal": "生活日记", "Discover new perspectives and insights in others' weekly, monthly, or yearly journal.": "在别人的周月年记中发现新观点和见解。", "Fiction": "虚构小说", - "Experience a world of imagination through these fiction stories." : "体验一个充满想象力的虚构世界。", + "Experience a world of imagination through these fiction stories.": "体验一个充满想象力的虚构世界。", "Coding": "编程", "Participate in Topic": "参与话题" -} \ No newline at end of file +} diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 2410b55f..57609c46 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -16,12 +16,15 @@ export function cn(...inputs: ClassValue[]) { } export function pick(obj: T, keys: K[]): Pick { - return keys.reduce((acc, key) => { - if (obj && Object.prototype.hasOwnProperty.call(obj, key)) { - acc[key] = obj[key] - } - return acc - }, {} as Pick) + return keys.reduce( + (acc, key) => { + if (obj && Object.prototype.hasOwnProperty.call(obj, key)) { + acc[key] = obj[key] + } + return acc + }, + {} as Pick, + ) } export const isServerSide = () => typeof window === "undefined" diff --git a/src/models/home.model.ts b/src/models/home.model.ts index dde9e828..01c47ab6 100644 --- a/src/models/home.model.ts +++ b/src/models/home.model.ts @@ -158,9 +158,8 @@ export async function getFeed({ return { list, cursor: list?.length - ? `${list[list.length - 1]?.characterId}_${ - list[list.length - 1]?.noteId - }` + ? `${list[list.length - 1]?.characterId}_${list[list.length - 1] + ?.noteId}` : undefined, count: list?.length || 0, } @@ -277,9 +276,8 @@ export async function getFeed({ return { list: list, cursor: list?.length - ? `${list[list.length - 1]?.characterId}_${ - list[list.length - 1]?.noteId - }` + ? `${list[list.length - 1]?.characterId}_${list[list.length - 1] + ?.noteId}` : undefined, count: list?.length || 0, } @@ -370,9 +368,8 @@ export async function getFeed({ return { list: list, cursor: list?.length - ? `${list[list.length - 1]?.characterId}_${ - list[list.length - 1]?.noteId - }` + ? `${list[list.length - 1]?.characterId}_${list[list.length - 1] + ?.noteId}` : undefined, count: list?.length || 0, } diff --git a/src/models/site.model.ts b/src/models/site.model.ts index 029d7a9f..138345c7 100644 --- a/src/models/site.model.ts +++ b/src/models/site.model.ts @@ -103,8 +103,8 @@ export async function getCommentsBySite(input: { nestedNotesLimit: 20, }) - notes.list = notes.list.filter((item) => - item.toNote?.metadata?.content?.sources?.includes("xlog"), + notes.list = notes.list.filter( + (item) => item.toNote?.metadata?.content?.sources?.includes("xlog"), ) return notes diff --git a/tsconfig.json b/tsconfig.json index d8c0da05..811d3068 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,6 @@ { "compilerOptions": { - "lib": [ - "DOM", - "DOM.Iterable", - "esnext" - ], + "lib": ["DOM", "DOM.Iterable", "esnext"], "isolatedModules": true, "esModuleInterop": true, "jsx": "preserve", @@ -14,9 +10,7 @@ "strict": true, "baseUrl": ".", "paths": { - "~/*": [ - "./src/*" - ] + "~/*": ["./src/*"] }, "noEmit": true, "forceConsistentCasingInFileNames": true, @@ -24,22 +18,13 @@ "skipLibCheck": true, "incremental": true, "module": "esnext", - "typeRoots": [ - "./types" - ], + "typeRoots": ["./types"], "plugins": [ { "name": "next" } ] }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] }