diff --git a/.env.example b/.env.example index 42dcfe76..7327e16b 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,7 @@ SHAPE_DOCS_BASE_URL=http://localhost:3000 SHAPE_DOCS_PROJECT_CONFIGURATION_FILENAME=.shape-docs.yml NEXT_PUBLIC_SHAPE_DOCS_TITLE=Shape Docs NEXT_PUBLIC_SHAPE_DOCS_DESCRIPTION=Documentation for Shape's APIs +NEXT_PUBLIC_SHAPE_DOCS_HELP_URL=https://github.com/shapehq/shape-docs/wiki NEXTAUTH_URL_INTERNAL=http://localhost:3000 NEXTAUTH_SECRET=use [openssl rand -base64 32] to generate a 32 bytes value REDIS_URL=localhost diff --git a/src/features/sidebar/view/SidebarHeader.tsx b/src/features/sidebar/view/SidebarHeader.tsx index 5bc88a4d..916fdb5e 100644 --- a/src/features/sidebar/view/SidebarHeader.tsx +++ b/src/features/sidebar/view/SidebarHeader.tsx @@ -1,11 +1,21 @@ import Image from "next/image" +// import { Box, Typography, IconButton, Tooltip } from "@mui/material" import { Box, Typography } from "@mui/material" import Link from "next/link" +// import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" +// import { faPlus } from "@fortawesome/free-solid-svg-icons" export default function SidebarHeader() { const siteName = process.env.NEXT_PUBLIC_SHAPE_DOCS_TITLE return ( - + {siteName} - + + {/* + + + + + + */} ) } diff --git a/src/features/sidebar/view/base/SecondaryHeader.tsx b/src/features/sidebar/view/base/SecondaryHeader.tsx index 32048015..0e4a0177 100644 --- a/src/features/sidebar/view/base/SecondaryHeader.tsx +++ b/src/features/sidebar/view/base/SecondaryHeader.tsx @@ -39,30 +39,39 @@ export default function SecondaryHeader({ sx={{ ...sx, backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary + color: theme.palette.text.primary, }} > - + {showOpenSidebar && onToggleSidebarOpen(true)} edge="start" > - - + + } {showCloseSidebar && onToggleSidebarOpen(false)} edge="start" > - - + + } diff --git a/src/features/user/view/SettingsList.tsx b/src/features/user/view/SettingsList.tsx index 93fe7987..183bad38 100644 --- a/src/features/user/view/SettingsList.tsx +++ b/src/features/user/view/SettingsList.tsx @@ -1,35 +1,63 @@ -import { List, Button } from "@mui/material" +import { ReactNode } from "react" +import { signOut } from "next-auth/react" +import Link from "next/link" +import { List, Button, Stack, Typography } from "@mui/material" import ThickDivider from "@/common/ui/ThickDivider" import DocumentationVisualizationPicker from "./DocumentationVisualizationPicker" -import { signOut } from "next-auth/react" - -const SettingsItem = ({ onClick, href, children }: { - onClick?: () => void; - href?: string; - children?: string; -}) => - +import { IconProp } from "@fortawesome/fontawesome-svg-core" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" +import { faQuestionCircle, faRightFromBracket } from "@fortawesome/free-solid-svg-icons" + +const SettingsItem = ({ onClick, icon, children }: { + onClick?: () => void + icon?: IconProp + children?: ReactNode +}) => { + return ( + + ) +} const SettingsList = () => { + const helpURL = process.env.NEXT_PUBLIC_SHAPE_DOCS_HELP_URL return ( - + - signOut()}> - Log out + {helpURL && + + + + Help + + + + } + signOut()} icon={faRightFromBracket}> + + Log out + )