migrate the search button to plugins discovery

This commit is contained in:
heweikang 2024-08-20 19:44:22 +08:00
parent fcd55df969
commit 39d7d9f13a
2 changed files with 6 additions and 10 deletions

View File

@ -12,7 +12,6 @@ import DeleteIcon from "../icons/delete.svg";
import MaskIcon from "../icons/mask.svg"; import MaskIcon from "../icons/mask.svg";
import DragIcon from "../icons/drag.svg"; import DragIcon from "../icons/drag.svg";
import DiscoveryIcon from "../icons/discovery.svg"; import DiscoveryIcon from "../icons/discovery.svg";
import SearchIcon from "../icons/zoom.svg";
import Locale from "../locales"; import Locale from "../locales";
import { useAppConfig, useChatStore } from "../store"; import { useAppConfig, useChatStore } from "../store";
@ -250,14 +249,6 @@ export function SideBar(props: { className?: string }) {
onClick={() => setShowPluginSelector(true)} onClick={() => setShowPluginSelector(true)}
shadow shadow
/> />
<IconButton
icon={<SearchIcon />}
className={styles["sidebar-bar-button"]}
onClick={() =>
navigate(Path.SearchChat, { state: { fromHome: true } })
}
shadow
/>
</div> </div>
{showPluginSelector && ( {showPluginSelector && (
<Selector <Selector

View File

@ -1,3 +1,5 @@
import path from "path";
export const OWNER = "ChatGPTNextWeb"; export const OWNER = "ChatGPTNextWeb";
export const REPO = "ChatGPT-Next-Web"; export const REPO = "ChatGPT-Next-Web";
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`; export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
@ -476,4 +478,7 @@ export const internalAllowedWebDavEndpoints = [
]; ];
export const DEFAULT_GA_ID = "G-89WN60ZK2E"; export const DEFAULT_GA_ID = "G-89WN60ZK2E";
export const PLUGINS = [{ name: "Stable Diffusion", path: Path.Sd }]; export const PLUGINS = [
{ name: "Stable Diffusion", path: Path.Sd },
{ name: "Search Chat", path: Path.SearchChat },
];