File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import MessageView from "./MessageView";
2222import ClearConversationButton from "../ClearConversationButton" ;
2323import MessageTextarea from "./MessageTextarea" ;
2424import DataStorageBanner from "../DataStorageBanner" ;
25+ import DBHubBanner from "../DBHubBanner" ;
2526import SchemaDrawer from "../SchemaDrawer" ;
2627import Icon from "../Icon" ;
2728import { useTranslation } from "react-i18next" ;
@@ -320,6 +321,7 @@ const ConversationView = () => {
320321 } relative w-full h-full max-h-full flex flex-col justify-start items-start overflow-y-auto bg-white dark:bg-zinc-800`}
321322 >
322323 < div className = "sticky top-0 z-1 bg-white dark:bg-zinc-800 w-full flex flex-col justify-start items-start" >
324+ < DBHubBanner />
323325 < DataStorageBanner />
324326 < Header className = { showHeaderShadow ? "shadow" : "" } />
325327 </ div >
Original file line number Diff line number Diff line change 1+ import { useTranslation } from "react-i18next" ;
2+ import { useLocalStorage } from "react-use" ;
3+ import Icon from "./Icon" ;
4+
5+ interface Props {
6+ className ?: string ;
7+ alwaysShow ?: boolean ;
8+ }
9+
10+ const DBHubBanner = ( props : Props ) => {
11+ const { className, alwaysShow } = props ;
12+ const { t } = useTranslation ( ) ;
13+ const [ hideBanner , setHideBanner ] = useLocalStorage ( "hide-github-banner" , false ) ;
14+ const show = alwaysShow || ! hideBanner ;
15+
16+ return (
17+ < div
18+ className = { `${ ! show && "!hidden" } ${
19+ className || ""
20+ } relative w-full flex flex-row justify-start sm:justify-center items-center px-4 py-1 bg-blue-50 dark:bg-blue-900`}
21+ >
22+ < span className = "text-sm leading-6 pr-4" >
23+ < a
24+ href = "https://github.com/bytebase/dbhub"
25+ target = "_blank"
26+ rel = "noopener noreferrer"
27+ className = "text-blue-600 dark:text-blue-300 hover:underline font-medium"
28+ >
29+ Check out DBHub - a universal database MCP server to be used by Cursor, Claude Desktop, and more
30+ </ a >
31+ </ span >
32+ { ! alwaysShow && (
33+ < button className = "absolute right-2 sm:right-4 opacity-60 hover:opacity-100" onClick = { ( ) => setHideBanner ( true ) } >
34+ < Icon . BiX className = "w-6 h-auto" />
35+ </ button >
36+ ) }
37+ </ div >
38+ ) ;
39+ } ;
40+
41+ export default DBHubBanner ;
You can’t perform that action at this time.
0 commit comments