-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow some white labeling the side footer
- Loading branch information
Showing
8 changed files
with
121 additions
and
75 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import "@libsqlstudio/gui/css"; | ||
import { Fragment } from "react"; | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return <Fragment>{children}</Fragment>; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { BaseDriver, CollaborationDriver } from "@libsqlstudio/gui/driver"; | ||
import { Studio } from "@libsqlstudio/gui"; | ||
import { useTheme } from "@studio/context/theme-provider"; | ||
import { useRouter } from "next/navigation"; | ||
import { useCallback, useMemo } from "react"; | ||
|
||
interface MyStudioProps { | ||
name: string; | ||
color: string; | ||
driver: BaseDriver; | ||
collabarator?: CollaborationDriver; | ||
} | ||
|
||
export default function MyStudio({ | ||
name, | ||
color, | ||
driver, | ||
collabarator, | ||
}: MyStudioProps) { | ||
const router = useRouter(); | ||
const { theme } = useTheme(); | ||
|
||
const goBack = useCallback(() => { | ||
router.push("/connect"); | ||
}, [router]); | ||
|
||
const sideBanner = useMemo(() => { | ||
return ( | ||
<div className="text-sm p-3 px-4"> | ||
<strong>LibStudio Studio</strong> is open-source database GUI. | ||
<ul className="list-disc ml-6 mt-2"> | ||
<li className="mb-1"> | ||
<a | ||
className="text-blue-700 underline dark:text-blue-400" | ||
href={"https://github.com/invisal/libsql-studio/issues"} | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Request New Features | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
className="text-blue-700 underline dark:text-blue-400" | ||
href={"https://github.com/invisal/libsql-studio/issues"} | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Report Bugs | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
); | ||
}, []); | ||
|
||
return ( | ||
<Studio | ||
driver={driver} | ||
name={name} | ||
color={color ?? "blue"} | ||
defaultTheme={theme} | ||
onBack={goBack} | ||
collaboration={collabarator} | ||
sideBarFooterComponent={sideBanner} | ||
/> | ||
); | ||
} |