mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 20:35:24 +00:00
Add discord button to nav bar and version in settings drop down (#47)
* add discord button to nav menu * add version to settings drop down * nit: prepend version text with "version" * revert settings json change
This commit is contained in:
parent
149664f664
commit
1fa3f7484a
2 changed files with 16 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { NavigationMenu as NavigationMenuBase, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu";
|
import { NavigationMenu as NavigationMenuBase, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { GitHubLogoIcon } from "@radix-ui/react-icons";
|
import { GitHubLogoIcon, DiscordLogoIcon } from "@radix-ui/react-icons";
|
||||||
import { SettingsDropdown } from "./settingsDropdown";
|
import { SettingsDropdown } from "./settingsDropdown";
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
@ -11,6 +11,7 @@ import logoDark from "../../public/sb_logo_dark_small.png";
|
||||||
import logoLight from "../../public/sb_logo_light_small.png";
|
import logoLight from "../../public/sb_logo_light_small.png";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
|
const SOURCEBOT_DISCORD_URL = "https://discord.gg/6Fhp27x7Pb";
|
||||||
const SOURCEBOT_GITHUB_URL = "https://github.com/sourcebot-dev/sourcebot";
|
const SOURCEBOT_GITHUB_URL = "https://github.com/sourcebot-dev/sourcebot";
|
||||||
|
|
||||||
export const NavigationMenu = () => {
|
export const NavigationMenu = () => {
|
||||||
|
|
@ -61,6 +62,15 @@ export const NavigationMenu = () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-row items-center gap-2">
|
<div className="flex flex-row items-center gap-2">
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="icon"
|
||||||
|
onClick={() => {
|
||||||
|
window.open(SOURCEBOT_DISCORD_URL, "_blank");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<DiscordLogoIcon className="w-4 h-4" />
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="icon"
|
size="icon"
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import { useMemo } from "react"
|
||||||
import { KeymapType } from "@/lib/types"
|
import { KeymapType } from "@/lib/types"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import { useKeymapType } from "@/hooks/useKeymapType"
|
import { useKeymapType } from "@/hooks/useKeymapType"
|
||||||
|
import { NEXT_PUBLIC_SOURCEBOT_VERSION } from "@/lib/environment.client";
|
||||||
|
|
||||||
interface SettingsDropdownProps {
|
interface SettingsDropdownProps {
|
||||||
menuButtonClassName?: string;
|
menuButtonClassName?: string;
|
||||||
|
|
@ -104,6 +105,10 @@ export const SettingsDropdown = ({
|
||||||
</DropdownMenuSubContent>
|
</DropdownMenuSubContent>
|
||||||
</DropdownMenuPortal>
|
</DropdownMenuPortal>
|
||||||
</DropdownMenuSub>
|
</DropdownMenuSub>
|
||||||
|
<DropdownMenuSeparator />
|
||||||
|
<div className="px-2 py-1 text-sm text-muted-foreground">
|
||||||
|
version: {NEXT_PUBLIC_SOURCEBOT_VERSION}
|
||||||
|
</div>
|
||||||
</DropdownMenuGroup>
|
</DropdownMenuGroup>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue