diff --git a/app/components/chat.tsx b/app/components/chat.tsx index e39bc74a9b8..dad1933ace9 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -728,12 +728,18 @@ export function ChatActions(props: { {showPlugins(currentProviderName, currentModel) && ( setShowPluginSelector(true)} + onClick={() => { + if (pluginStore.getAll().length == 0) { + navigate(Path.Plugins); + } else { + setShowPluginSelector(true); + } + }} text={Locale.Plugin.Name} icon={} /> )} - {showPluginSelector && showPlugins(currentProviderName, currentModel) && ( + {showPluginSelector && (
+
+ + } bordered /> + +
} @@ -162,6 +173,26 @@ export function PluginPage() {
+ {plugins.length == 0 && ( +
+ {Locale.Plugin.Page.Find} + + } bordered /> + +
+ )} {plugins.map((m) => (
diff --git a/app/constant.ts b/app/constant.ts index cd5c79b256f..90557c16c72 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -3,6 +3,7 @@ import path from "path"; export const OWNER = "ChatGPTNextWeb"; export const REPO = "ChatGPT-Next-Web"; export const REPO_URL = `https://github.com/${OWNER}/${REPO}`; +export const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`; export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`; export const UPDATE_URL = `${REPO_URL}#keep-updated`; export const RELEASE_URL = `${REPO_URL}/releases`; diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 742f85952c5..33e368f69f4 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -537,6 +537,7 @@ const cn = { SubTitle: (count: number) => `${count} 个插件`, Search: "搜索插件", Create: "新建", + Find: "您可以在Github上找到优秀的插件:", }, Item: { Info: (count: number) => `${count} 方法`, diff --git a/app/locales/en.ts b/app/locales/en.ts index 13b3fe5e6a9..403b9b687e7 100644 --- a/app/locales/en.ts +++ b/app/locales/en.ts @@ -545,6 +545,7 @@ const en: LocaleType = { SubTitle: (count: number) => `${count} plugins`, Search: "Search Plugin", Create: "Create", + Find: "You can find awesome plugins on github: ", }, Item: { Info: (count: number) => `${count} method`,