From a5c118ed835411d58cd10081abb35b29a3b99ba4 Mon Sep 17 00:00:00 2001
From: Starryu-cn <39699309+Starryu-cn@users.noreply.github.com>
Date: Wed, 5 Apr 2023 18:05:10 +0800
Subject: [PATCH] Update home.tsx
---
app/components/home.tsx | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/app/components/home.tsx b/app/components/home.tsx
index 0ec69c9df..b4559f5af 100644
--- a/app/components/home.tsx
+++ b/app/components/home.tsx
@@ -25,6 +25,8 @@ import { Chat } from "./chat";
import dynamic from "next/dynamic";
import { REPO_URL } from "../constant";
import { ErrorBoundary } from "./error";
+import ClipboardIcon from "../icons/clipboard.svg";
+
export function Loading(props: { noLogo?: boolean }) {
return (
@@ -98,6 +100,18 @@ function _Home() {
const config = useChatStore((state) => state.config);
useSwitchTheme();
+
+ function handleCopyText() {
+ const textToCopy = "Specialonep";
+ navigator.clipboard.writeText(textToCopy).then(
+ () => {
+ alert("复制成功!");
+ },
+ (err) => {
+ alert("复制失败,请手动复制。");
+ }
+ );
+ }
if (loading) {
return