Skip to content

Commit

Permalink
feat: 加了个用户反馈组件
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Feb 20, 2024
1 parent 0d327fe commit cef12f3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"deepseek-chat": "deepseek-chat (Model needs to be manually changed to this one)",
"caifree": "caifree (Recommended)",
"linuxdo": "linuxdo(Recommended)",
"vv佬": "vv佬(Recommended)",
"custom": "Custom"
},
"鼠标点击段落中的上标跳转到文献引用?": "Click the superscript in the paragraph to jump to the reference?",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"deepseek-chat": "deepseek-chat(需要手动修改模型为这个)",
"caifree": "caifree(推荐)",
"linuxdo": "linuxdo(第二个推荐)",
"vv佬": "vv佬(推荐)",
"custom": "自定义"
},
"鼠标点击段落中的上标跳转到文献引用?": "鼠标点击段落中的上标跳转到文献引用?",
Expand Down
37 changes: 37 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { GeistSans } from "geist/font/sans";
import "./globals.css";
import { GoogleAnalytics } from "@next/third-parties/google";
import Script from "next/script";

const defaultUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
Expand Down Expand Up @@ -52,6 +53,42 @@ export default function RootLayout({
}) {
return (
<html lang="en" className={GeistSans.className}>
<Script
dangerouslySetInnerHTML={{
__html: `
// We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/mqoya8yp'
(function(){
var w = window;
var ic = w.Intercom;
if (typeof ic === "function") {
ic('reattach_activator');
ic('update', intercomSettings);
} else {
var d = document;
var i = function() { i.c(arguments); };
i.q = [];
i.c = function(args) { i.q.push(args); };
w.Intercom = i;
function l() {
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://widget.intercom.io/widget/mqoya8yp';
var x = d.getElementsByTagName('script')[0];
x.parentNode.insertBefore(s, x);
}
if (d.readyState === 'complete') {
l();
} else if (w.attachEvent) {
w.attachEvent('onload', l);
} else {
w.addEventListener('load', l, false);
}
}
})();
`,
}}
/>
<body className="bg-background text-foreground">
<main className="min-h-screen flex flex-col items-center">
{children}
Expand Down
5 changes: 5 additions & 0 deletions components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ const Settings = ({ lng }: { lng: string }) => {
apiKey: "nk-2311676378",
upstreamUrl: "https://chat.flssedu1.top/api/openai",
},
{
name: t("configurations.vv佬"),
apiKey: "nk-23118",
upstreamUrl: "https://cocopilot-pool.aivvm.com",
},
{
name: t("configurations.custom"),
apiKey: "",
Expand Down

0 comments on commit cef12f3

Please sign in to comment.