diff --git a/ui/admin/app/components/oauth-apps/OAuthAppList.tsx b/ui/admin/app/components/oauth-apps/OAuthAppList.tsx index d7e85439..ecbf950f 100644 --- a/ui/admin/app/components/oauth-apps/OAuthAppList.tsx +++ b/ui/admin/app/components/oauth-apps/OAuthAppList.tsx @@ -1,4 +1,4 @@ -import { TypographyH3, TypographyP } from "~/components/Typography"; +import { TypographyH2, TypographyP } from "~/components/Typography"; import { useOAuthAppList } from "~/hooks/oauthApps/useOAuthApps"; import { OAuthAppTile } from "./OAuthAppTile"; @@ -7,9 +7,11 @@ export function OAuthAppList() { const apps = useOAuthAppList(); return ( -
+
- Supported OAuth Apps + + Supported OAuth Apps + These are the currently supported OAuth apps for Otto. These @@ -18,9 +20,13 @@ export function OAuthAppList() {
-
+
{apps.map(({ type }) => ( - + ))}
diff --git a/ui/admin/app/components/oauth-apps/OAuthAppTile.tsx b/ui/admin/app/components/oauth-apps/OAuthAppTile.tsx index da83fc55..911687a1 100644 --- a/ui/admin/app/components/oauth-apps/OAuthAppTile.tsx +++ b/ui/admin/app/components/oauth-apps/OAuthAppTile.tsx @@ -1,12 +1,21 @@ import { OAuthProvider } from "~/lib/model/oauthApps/oauth-helpers"; +import { cn } from "~/lib/utils"; +import { useTheme } from "~/components/theme"; import { Card } from "~/components/ui/card"; import { useOAuthAppInfo } from "~/hooks/oauthApps/useOAuthApps"; import { OAuthAppDetail } from "./OAuthAppDetail"; -export function OAuthAppTile({ type }: { type: OAuthProvider }) { +export function OAuthAppTile({ + type, + className, +}: { + type: OAuthProvider; + className?: string; +}) { const info = useOAuthAppInfo(type); + const { isDark } = useTheme(); if (!info) { console.error(`OAuth app ${type} not found`); @@ -15,15 +24,32 @@ export function OAuthAppTile({ type }: { type: OAuthProvider }) { const { displayName } = info; + const getSrc = () => { + if (isDark) return info.darkLogo ?? info.logo; + return info.logo; + }; + return ( - + {displayName} - + {!info.disableConfiguration && ( + + )} ); } diff --git a/ui/admin/app/components/oauth-apps/OAuthAppTypeIcon.tsx b/ui/admin/app/components/oauth-apps/OAuthAppTypeIcon.tsx index 75bbf259..28cdcea3 100644 --- a/ui/admin/app/components/oauth-apps/OAuthAppTypeIcon.tsx +++ b/ui/admin/app/components/oauth-apps/OAuthAppTypeIcon.tsx @@ -1,11 +1,16 @@ +import { NotionLogoIcon } from "@radix-ui/react-icons"; import { KeyIcon } from "lucide-react"; -import { FaGithub } from "react-icons/fa"; +import { FaGithub, FaGoogle, FaMicrosoft, FaSlack } from "react-icons/fa"; import { OAuthProvider } from "~/lib/model/oauthApps/oauth-helpers"; import { cn } from "~/lib/utils"; const IconMap = { [OAuthProvider.GitHub]: FaGithub, + [OAuthProvider.Slack]: FaSlack, + [OAuthProvider.Google]: FaGoogle, + [OAuthProvider.Microsoft365]: FaMicrosoft, + [OAuthProvider.Notion]: NotionLogoIcon, }; export function OAuthAppTypeIcon({ diff --git a/ui/admin/app/components/sidebar/Sidebar.tsx b/ui/admin/app/components/sidebar/Sidebar.tsx index 83963c35..345e09be 100644 --- a/ui/admin/app/components/sidebar/Sidebar.tsx +++ b/ui/admin/app/components/sidebar/Sidebar.tsx @@ -55,6 +55,11 @@ const items = [ url: $path("/users"), icon: User, }, + { + title: "OAuth Apps", + url: $path("/oauth-apps"), + icon: KeyIcon, + }, ]; export function AppSidebar() { @@ -80,8 +85,8 @@ export function AppSidebar() { @@ -110,31 +115,39 @@ export function AppSidebar() { - - - - - Settings - - - - - - - ); } + +// disabling this because this will inevitably be used in the future +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function AppSidebarFooter() { + const { state } = useSidebar(); + return ( + + + + + Settings + + + + + + + + ); +} diff --git a/ui/admin/app/components/ui/dialog.tsx b/ui/admin/app/components/ui/dialog.tsx index 8b81af38..9f5459c3 100644 --- a/ui/admin/app/components/ui/dialog.tsx +++ b/ui/admin/app/components/ui/dialog.tsx @@ -19,7 +19,7 @@ const DialogOverlay = React.forwardRef< \ No newline at end of file diff --git a/ui/admin/public/assets/slack_logo_dark.png b/ui/admin/public/assets/slack_logo_dark.png new file mode 100644 index 00000000..2f71f2ea Binary files /dev/null and b/ui/admin/public/assets/slack_logo_dark.png differ diff --git a/ui/admin/public/assets/slack_logo_light.png b/ui/admin/public/assets/slack_logo_light.png new file mode 100644 index 00000000..cabd24d7 Binary files /dev/null and b/ui/admin/public/assets/slack_logo_light.png differ diff --git a/ui/admin/tailwind.config.ts b/ui/admin/tailwind.config.ts index a5726954..1a2e5064 100644 --- a/ui/admin/tailwind.config.ts +++ b/ui/admin/tailwind.config.ts @@ -51,6 +51,10 @@ export default { DEFAULT: "hsl(var(--popover))", foreground: "hsl(var(--popover-foreground))", }, + dialog: { + DEFAULT: "hsl(var(--dialog))", + foreground: "hsl(var(--dialog-foreground))", + }, primary: { DEFAULT: "hsl(var(--primary))", foreground: "hsl(var(--primary-foreground))",