Skip to content

Commit

Permalink
✨ feat:嵌入 GPT 4-o
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackishGreen33 committed Jul 11, 2024
1 parent eb2167c commit 710bb6b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/app/(main)/(routes)/servers/bot/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { NextPage } from 'next';

const Page: NextPage = () => {
return (
<>
<iframe
src="https://www.chatbase.co/chatbot-iframe/637zQZNRXyVYZTiVKTwQe"
title="Chatbot"
width="100%"
className="h-full min-h-[700px]"
frameBorder="0"
></iframe>
</>
);
};

export default Page;
29 changes: 29 additions & 0 deletions src/common/components/navigation/navigation-bot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use client';

import Image from 'next/image';
import { useRouter } from 'next/navigation';

import { ActionTooltip } from '@/common/components/elements/action-tooltip';

export const NavigationBot = () => {
const router = useRouter();

const onClick = () => {
router.push(`/servers/bot`);
};

return (
<ActionTooltip side="right" align="center" label="导览助手">
<button onClick={onClick} className="group relative flex items-center">
<div className="absolute left-0 w-[4px] rounded-r-full bg-primary transition-all" />
<div className="group relative mx-3 flex h-[48px] w-[48px] overflow-hidden rounded-[24px] transition-all group-hover:rounded-[16px]">
<Image
fill
src="https://www.github.com/CCNUPracticalTraining-530-2.png"
alt="Channel"
/>
</div>
</button>
</ActionTooltip>
);
};
2 changes: 2 additions & 0 deletions src/common/components/navigation/navigation-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { currentProfile } from '@/common/libs/current-profile';
import { db } from '@/common/libs/db';

import { NavigationAction } from './navigation-action';
import { NavigationBot } from './navigation-bot';
import { NavigationItem } from './navigation-item';

export const NavigationSidebar = async () => {
Expand Down Expand Up @@ -44,6 +45,7 @@ export const NavigationSidebar = async () => {
</ScrollArea>
<div className="mt-auto flex flex-col items-center gap-y-4 pb-3">
<ModeToggle />
<NavigationBot />
<UserButton
afterSignOutUrl="/"
appearance={{
Expand Down

0 comments on commit 710bb6b

Please sign in to comment.