Skip to content

Commit

Permalink
update link
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Oct 22, 2023
1 parent dd048b6 commit d606e6a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/src/assets/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,15 @@
.chat-product {
display: flex;
flex-direction: column;
gap: 12px;
flex-grow: 1;
width: 100%;
overflow: hidden;
justify-content: center;
align-items: center;

button {
margin: 0.5rem 0;
}
}

.chat-content {
Expand Down
10 changes: 9 additions & 1 deletion app/src/components/home/ChatWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {formatMessage} from "../../utils.ts";
import ChatInterface from "./ChatInterface.tsx";
import {Button} from "../ui/button.tsx";
import router from "../../router.ts";
import {ChevronRight, FolderKanban, Globe} from "lucide-react";
import {BookMarked, ChevronRight, FolderKanban, Globe} from "lucide-react";
import {Tooltip, TooltipContent, TooltipProvider, TooltipTrigger} from "../ui/tooltip.tsx";
import {Toggle} from "../ui/toggle.tsx";
import {Input} from "../ui/input.tsx";
Expand Down Expand Up @@ -80,6 +80,14 @@ function ChatWrapper() {
<ChatInterface />
) : (
<div className={`chat-product`}>
<Button
variant={`outline`}
onClick={() => window.open("https://docs.chatnio.net", "_blank")}
>
<BookMarked className={`h-4 w-4 mr-1.5`} />
{t("docs.title")}
<ChevronRight className={`h-4 w-4 ml-2`} />
</Button>
<Button
variant={`outline`}
onClick={() => router.navigate("/generate")}
Expand Down
9 changes: 9 additions & 0 deletions app/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ const resources = {
"not-found-description":
"Conversation not found, please check if the link is correct or the conversation has been deleted",
},
docs: {
title: "Open Docs",
}
},
},
cn: {
Expand Down Expand Up @@ -360,6 +363,9 @@ const resources = {
"not-found-description":
"对话未找到,请检查链接是否正确或对话是否已被删除",
},
docs: {
title: "开放文档",
}
},
},
ru: {
Expand Down Expand Up @@ -544,6 +550,9 @@ const resources = {
"not-found-description":
"Разговор не найден, пожалуйста, проверьте, правильная ли ссылка или разговор был удален",
},
docs: {
title: "Открыть документы",
}
},
},
};
Expand Down
1 change: 1 addition & 0 deletions app/src/routes/Sharing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ function Sharing() {
<HelpCircle className={`w-12 h-12 mb-2.5`} />
<p className={`title`}>{t("share.not-found")}</p>
<p className={`description`}>{t("share.not-found-description")}</p>
<Button className={`mt-4`} onClick={() => router.navigate("/")}>{t("home")}</Button>
</div>
)}
</div>
Expand Down

0 comments on commit d606e6a

Please sign in to comment.