-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb82e58
commit 97b1b32
Showing
14 changed files
with
170 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import NextAuth from "next-auth"; | ||
import type { NextAuthOptions } from "next-auth"; | ||
import GithubProvider from "next-auth/providers/github"; | ||
import GoogleProvider from "next-auth/providers/google"; | ||
import EmailProvider from "next-auth/providers/email"; | ||
import { PrismaAdapter } from "@next-auth/prisma-adapter"; | ||
import { prisma } from "@/lib/prisma"; | ||
|
@@ -19,18 +20,14 @@ export const authOptions: NextAuthOptions = { | |
}, | ||
from: process.env.EMAIL_FROM, | ||
}), | ||
// EmailProvider({ | ||
// // server: "smtp://[email protected]:[email protected]:465", | ||
// server: "smtp://liushuxiang1993:[email protected]:465", | ||
// // from: "NextAuth <[email protected]>", | ||
// // WFCLNBQGTRTMDORC | ||
// // qq: fnmvpdkxjtqjbjgc | ||
// maxAge: 24 * 60 * 60, // 设置邮箱链接失效时间,默认24小时 | ||
// }), | ||
// GithubProvider({ | ||
// clientId: "894f395fe1e70358caca", | ||
// clientSecret: "fd5a93dcc14cc6e2c0566436f983ed0b2578ce05", | ||
// }), | ||
GithubProvider({ | ||
clientId: process.env.GITHUB_ID || "", | ||
clientSecret: process.env.GITHUB_SECRET || "", | ||
}), | ||
GoogleProvider({ | ||
clientId: process.env.GOOGLE_CLIENT_ID || "", | ||
clientSecret: process.env.GOOGLE_CLIENT_SECRET || "", | ||
}), | ||
], | ||
secret: process.env.EMAIL_SECRET, | ||
callbacks: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import * as Toast from "@radix-ui/react-toast"; | ||
import { useTranslations } from "next-intl"; | ||
import { AiOutlineCheck } from "react-icons/ai"; | ||
import { cn } from "@/lib"; | ||
import { version } from "../../../package.json"; | ||
|
||
const Announcement: React.FC = () => { | ||
const t = useTranslations("zLog"); | ||
|
||
const [open, setOpen] = React.useState(false); | ||
|
||
const onClick = () => { | ||
localStorage.setItem("announcement_version", version); | ||
}; | ||
|
||
React.useEffect(() => { | ||
const announcement_version = localStorage.getItem("announcement_version"); | ||
console.log(version, "version"); | ||
console.log(announcement_version, "announcement_version"); | ||
if (version !== announcement_version) setOpen(true); | ||
}, []); | ||
|
||
return ( | ||
<Toast.Provider swipeDirection="right" swipeThreshold={5000}> | ||
<Toast.Root | ||
className="bg-white rounded-md shadow-md border p-[15px] data-[state=open]:animate-slideIn data-[state=closed]:animate-hide" | ||
open={open} | ||
onOpenChange={setOpen} | ||
duration={9999999} | ||
> | ||
<Toast.Title className="mb-[5px] font-medium text-lg"> | ||
{t("title")} | ||
</Toast.Title> | ||
<Toast.Description asChild className="mb-4"> | ||
<div className="text-sm flex flex-col gap-2"> | ||
<div>{t("text1")}</div> | ||
<div>{t("text2")}</div> | ||
<div>{t("text3")}</div> | ||
</div> | ||
</Toast.Description> | ||
<Toast.Action asChild altText="Check"> | ||
<button | ||
onClick={onClick} | ||
className={cn( | ||
"transition-all duration-100 ease-linear rounded-md font-medium flex items-center justify-center gap-2 tracking-wide h-8 text-sm px-3", | ||
"bg-sky-400 hover:bg-sky-500 active:bg-sky-600 text-white dark:bg-sky-400/90 dark:hover:bg-sky-500/90 dark:active:bg-sky-600/90" | ||
)} | ||
> | ||
<AiOutlineCheck /> | ||
</button> | ||
</Toast.Action> | ||
</Toast.Root> | ||
|
||
<Toast.Viewport className="[--viewport-padding:_25px] fixed bottom-0 right-0 flex flex-col p-[var(--viewport-padding)] gap-[10px] w-[390px] max-w-[100vw] m-0 list-none z-[2147483647] outline-none" /> | ||
</Toast.Provider> | ||
); | ||
}; | ||
|
||
export default Announcement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97b1b32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
l-gpt-lwxw – ./
l-gpt-lwxw-peek-a-booo-s-team.vercel.app
l-gpt-lwxw.vercel.app
l-gpt-lwxw-git-prisma-peek-a-booo-s-team.vercel.app
97b1b32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
l-gpt – ./
l-gpt.vercel.app
gpt.ltopx.com
l-gpt-peek-a-booo-s-team.vercel.app
l-gpt-git-main-peek-a-booo-s-team.vercel.app