From 44319ed9102456e3a9401071db3be345e2c010ff Mon Sep 17 00:00:00 2001 From: zhwcreate <3331598351@qq.com> Date: Wed, 30 Oct 2024 16:42:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0github=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(main)/(router)/dashboard/page.tsx | 12 +++++------ src/app/(main)/(router)/templates/page.tsx | 9 -------- src/app/page.tsx | 14 ++++++------ src/components/edit/header/index.tsx | 9 ++++++-- src/components/home/footer/index.tsx | 6 ++++-- src/components/home/header/index.tsx | 8 +++---- src/components/main/header/index.tsx | 12 ++++++++--- src/utils/route.tsx | 25 +++++++++------------- 8 files changed, 47 insertions(+), 48 deletions(-) delete mode 100644 src/app/(main)/(router)/templates/page.tsx diff --git a/src/app/(main)/(router)/dashboard/page.tsx b/src/app/(main)/(router)/dashboard/page.tsx index 3daae1d..74beb0f 100644 --- a/src/app/(main)/(router)/dashboard/page.tsx +++ b/src/app/(main)/(router)/dashboard/page.tsx @@ -51,7 +51,7 @@ export default function DashboardPage() {
欢迎使用 Online Edit - 一款集成 AI 能力的 Online IDE,提供开箱即用的开发环境,简化开发过程,提高效率 + 一款基于 Webcontainer 的 Online IDE,提供开箱即用的开发环境,简化开发过程,提高效率
@@ -95,7 +95,7 @@ export default function DashboardPage() { ))}
-

阅读文档了解如何使用

+

更多开源项目

{LinkCardData.map((item) => ( return (
@@ -173,7 +173,7 @@ const TemplateCard: React.FC<{ title: string; fileData: string; icon: string }>
quickStartProject()} - className="bg-tr-1 bg-white/5 text-[14px] group-hover:bg-white/15 w-full font-[600] rounded-[4px] py-[5px] px-[16px] text-center" + className="bg-tr-1 bg-white/5 text-[14px] duration-200 group-hover:bg-white/15 w-full font-[600] rounded-[4px] py-[5px] px-[16px] text-center" > 体验
@@ -205,7 +205,7 @@ const LinkCard: React.FC<{ linkText: string; linkUrl: string; linkDesc: string } height="16" fill="none" viewBox="0 0 16 16" - className="hidden group-hover:inline-block" + className="hidden duration-200 group-hover:inline-block" > = ({ projectData }) => { onClick={() => { handleDirectToEdit(); }} - className=" flex justify-between py-4 px-5 rounded-[6px] cursor-pointer transition-all bg-[#24262b] hover:bg-[#33363d]" + className=" flex justify-between py-4 px-5 rounded-[6px] cursor-pointer transition-all duration-200 bg-[#24262b] hover:bg-[#33363d]" >
diff --git a/src/app/(main)/(router)/templates/page.tsx b/src/app/(main)/(router)/templates/page.tsx deleted file mode 100644 index 5e3a906..0000000 --- a/src/app/(main)/(router)/templates/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -export default function MainPage() { - return ( -
-
- document -
-
- ); -} diff --git a/src/app/page.tsx b/src/app/page.tsx index cdcebea..bc3d56a 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -17,37 +17,37 @@ const projects = [ icon: '/react.svg', title: 'React', description: 'JavaScript', - link: '/a', + link: '/', }, { icon: '/react.svg', title: 'React', description: 'TypeScript', - link: '/b', + link: '/', }, { icon: '/vue.svg', title: 'Vue', description: 'JavaScript', - link: '/c', + link: '/', }, { icon: '/vue.svg', title: 'Vue', description: 'TypeScript', - link: '/d', + link: '/', }, { icon: '/preact.svg', title: 'Preact', description: 'JavaScript', - link: '/e', + link: '/', }, { icon: '/preact.svg', title: 'Preact', description: 'TypeScript', - link: '/f', + link: '/', }, { icon: '/node.svg', @@ -70,7 +70,7 @@ const socialIcons = [ }, { icon: , - link: 'https://github.com/xun082/online-edit-web111', + link: 'https://github.com/xun082/online-edit-web', }, ]; diff --git a/src/components/edit/header/index.tsx b/src/components/edit/header/index.tsx index d1a94e8..945d228 100644 --- a/src/components/edit/header/index.tsx +++ b/src/components/edit/header/index.tsx @@ -1,7 +1,7 @@ import Link from 'next/link'; import React, { useEffect, useState } from 'react'; import { VscLiveShare } from 'react-icons/vsc'; -import { FaRegSave } from 'react-icons/fa'; +import { FaGithub, FaRegSave } from 'react-icons/fa'; import { GoRepoForked } from 'react-icons/go'; import localforage from 'localforage'; @@ -34,7 +34,7 @@ export const Header: React.FC = ({ projectId }) => { }, []); return ( -
+
= ({ projectId }) => {
{projectName}
+
+ + + +
diff --git a/src/components/home/footer/index.tsx b/src/components/home/footer/index.tsx index e724753..33983dc 100644 --- a/src/components/home/footer/index.tsx +++ b/src/components/home/footer/index.tsx @@ -86,9 +86,11 @@ const Partners: LinkProps[] = [ ]; // 渲染链接 const renderLink = (products: LinkProps[]) => - products.map((item) => ( + products.map((item, idx) => (
  • - {item.name} + + {item.name} +
  • )); diff --git a/src/components/home/header/index.tsx b/src/components/home/header/index.tsx index 44a92a4..b037543 100644 --- a/src/components/home/header/index.tsx +++ b/src/components/home/header/index.tsx @@ -18,17 +18,17 @@ interface HeaderRouter { } const renderIcon = (icons: Icon[]) => - icons.map((icon) => ( - + icons.map((icon, idx) => ( + {icon.icon} )); const renderRouter = (router: HeaderRouter[]) => - router.map((item) => ( + router.map((item, idx) => ( {item.title} diff --git a/src/components/main/header/index.tsx b/src/components/main/header/index.tsx index 2408735..a74d45a 100644 --- a/src/components/main/header/index.tsx +++ b/src/components/main/header/index.tsx @@ -1,5 +1,6 @@ import Link from 'next/link'; import React from 'react'; +import { FaGithub } from 'react-icons/fa'; import { Avatar } from '@/components/common/Avatar'; import AvatarPopover from '@/components/avatarPopover'; @@ -13,9 +14,14 @@ export const Header: React.FC = () => { {PROJECT_Name} - - - +
    + + + + + + +
    ); }; diff --git a/src/utils/route.tsx b/src/utils/route.tsx index 45babb9..9422ae5 100644 --- a/src/utils/route.tsx +++ b/src/utils/route.tsx @@ -1,5 +1,4 @@ import { GoFileDirectory } from 'react-icons/go'; -import { MdComputer } from 'react-icons/md'; import { PATHS } from './constants'; @@ -15,11 +14,6 @@ export const RouterDataList: RouterData[] = [ icon: , link: PATHS.MAIN_DASHBOARD, }, - { - title: '文档', - icon: , - link: PATHS.MAIN_TEMPLATES, - }, ]; export const TemplateCardData = [ @@ -39,18 +33,19 @@ export const TemplateCardData = [ export const LinkCardData = [ { - linkText: 'link1', - linkUrl: 'https://www.baidu.com', - linkDesc: 'desc1', + linkText: 'create-neat', + linkUrl: 'https://github.com/xun082/create-neat', + linkDesc: '基于 PNPM 和 Turborepo 的前端脚手架,旨在快速为用户创建各种类型的项目', }, { - linkText: 'lin2', - linkUrl: 'https://www.baidu.com', - linkDesc: 'desc1', + linkText: 'create-ai-toolkit', + linkUrl: 'https://github.com/xun082/create-ai-toolkit', + linkDesc: + 'AI驱动的前端开发工具,集成组件和钩子生成、自动提交信息和代码审查,提升开发效率和代码质量', }, { - linkText: 'lin3', - linkUrl: 'https://www.baidu.com', - linkDesc: 'desc3', + linkText: 'online-edit-server', + linkUrl: 'https://github.com/xun082/online-edit-server', + linkDesc: '在线编辑器的后端', }, ];