-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'integration' into rav-39-raven-bot-doctype-setup
- Loading branch information
Showing
45 changed files
with
705 additions
and
483 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
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
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
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
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
39 changes: 39 additions & 0 deletions
39
raven-app/src/components/feature/settings/Integrations.tsx
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,39 @@ | ||
import { SidebarGroup, SidebarGroupItem, SidebarGroupLabel, SidebarGroupList, SidebarItem } from "@/components/layout/Sidebar" | ||
import { Flex, Text } from "@radix-ui/themes" | ||
import { BiPlug } from "react-icons/bi" | ||
|
||
export interface Props { } | ||
|
||
export const Integrations = (props: Props) => { | ||
return ( | ||
<SidebarGroup> | ||
<SidebarGroupItem gap='2' className={'pl-1.5'}> | ||
{/* <SidebarViewMoreButton onClick={toggle} /> */} | ||
<BiPlug /> | ||
<Flex width='100%' justify='between' align='center' gap='2'> | ||
<Flex gap='3' align='center'> | ||
<SidebarGroupLabel className='cal-sans'>Integrations</SidebarGroupLabel> | ||
</Flex> | ||
</Flex> | ||
</SidebarGroupItem> | ||
<SidebarGroup> | ||
<SidebarGroupList> | ||
<IntegrationsItem route='/settings/integrations/webhooks' label='Webhooks' /> | ||
<IntegrationsItem route='/settings/integrations/server-scripts' label='Server Scripts' /> | ||
</SidebarGroupList> | ||
</SidebarGroup> | ||
</SidebarGroup> | ||
) | ||
} | ||
|
||
|
||
export const IntegrationsItem = ({ route, label }: { route: string, label: string }) => { | ||
|
||
return ( | ||
<SidebarItem to={route ? route : "*"} className={'py-1.5'}> | ||
<Flex justify='between' align={'center'} width='100%'> | ||
<Text size='2' className="text-ellipsis line-clamp-1" as='span' weight={'regular'}>{label}</Text> | ||
</Flex> | ||
</SidebarItem> | ||
) | ||
} |
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,24 @@ | ||
import { Flex, Box, Separator } from "@radix-ui/themes" | ||
import { SidebarBody } from "./SidebarBody" | ||
import { SidebarFooter } from "../Sidebar/SidebarFooter" | ||
import { SidebarHeader } from "./SidebarHeader" | ||
|
||
export interface Props { } | ||
|
||
/** | ||
* Sidebar for Settings page | ||
*/ | ||
export const Sidebar = (props: Props) => { | ||
return ( | ||
<Flex justify='between' direction='row' gap='2'> | ||
<Flex direction='column' gap='2' width='100%'> | ||
<SidebarHeader /> | ||
<Box px='3'> | ||
<Separator size='4' className={`bg-gray-4 dark:bg-gray-6`} /> | ||
</Box> | ||
<SidebarBody /> | ||
</Flex> | ||
<SidebarFooter isSettingsPage /> | ||
</Flex> | ||
) | ||
} |
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,14 @@ | ||
import { Integrations } from "@/components/feature/settings/Integrations" | ||
import { ScrollArea, Flex } from "@radix-ui/themes" | ||
|
||
export interface Props { } | ||
|
||
export const SidebarBody = (props: Props) => { | ||
return ( | ||
<ScrollArea type="hover" scrollbars="vertical" className='h-[calc(100vh-7rem)]'> | ||
<Flex direction='column' gap='2' className='overflow-x-hidden' px='2'> | ||
<Integrations /> | ||
</Flex> | ||
</ScrollArea> | ||
) | ||
} |
27 changes: 27 additions & 0 deletions
27
raven-app/src/components/layout/Settings/SidebarHeader.tsx
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,27 @@ | ||
import { Flex, Text } from "@radix-ui/themes" | ||
import { BiChevronLeft } from "react-icons/bi" | ||
import { useNavigate } from "react-router-dom" | ||
|
||
export interface Props { } | ||
|
||
export const SidebarHeader = (props: Props) => { | ||
|
||
const navigate = useNavigate() | ||
|
||
return ( | ||
<header> | ||
<Flex | ||
px='3' | ||
align='center' | ||
gap={'3'} | ||
pt='1' | ||
height='8' | ||
className="cursor-pointer" | ||
onClick={() => navigate('/channel')} | ||
> | ||
<BiChevronLeft size={'24px'} color="gray" /> | ||
<Text as='span' size='4' weight={'medium'}>Settings</Text> | ||
</Flex> | ||
</header> | ||
) | ||
} |
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
Oops, something went wrong.