diff --git a/apps/admin-x-activitypub/src/MainContent.tsx b/apps/admin-x-activitypub/src/MainContent.tsx index cf6ada01e9..e632f46c2e 100644 --- a/apps/admin-x-activitypub/src/MainContent.tsx +++ b/apps/admin-x-activitypub/src/MainContent.tsx @@ -35,7 +35,7 @@ const MainContent = () => {
- + ); diff --git a/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx b/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx index cf81f34a28..6cf526479e 100644 --- a/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx +++ b/apps/admin-x-activitypub/src/components/feed/ArticleModal.tsx @@ -704,7 +704,7 @@ const ArticleModal: React.FC = ({ width={modalSize === MODAL_SIZE_LG ? 'toSidebar' : modalSize} >
-
+
{ case 'notifications': return 'Notifications'; break; + case 'search': + return 'Search'; + break; default: return 'Inbox'; @@ -28,12 +32,17 @@ const getTitle = (route: string) => { }; const Header: React.FC = ({route}) => { + const {updateRoute} = useRouting(); + return (

{getTitle(route)}

- Search +
); diff --git a/apps/admin-x-activitypub/src/components/layout/Sidebar/Sidebar.tsx b/apps/admin-x-activitypub/src/components/layout/Sidebar/Sidebar.tsx index 4c497aa6a6..5a927eb041 100644 --- a/apps/admin-x-activitypub/src/components/layout/Sidebar/Sidebar.tsx +++ b/apps/admin-x-activitypub/src/components/layout/Sidebar/Sidebar.tsx @@ -1,46 +1,58 @@ import * as React from 'react'; import Recommendations from './Recommendations'; -import {Button, Separator, cn} from '@tryghost/shade'; +import SidebarButton from './SidebarButton'; +import {Button, LucideIcon, Separator, cn} from '@tryghost/shade'; import {useRouting} from '@tryghost/admin-x-framework/routing'; -interface SidebarProps - extends React.HTMLAttributes {} +interface SidebarProps { + route: string; +} -const Sidebar = React.forwardRef( - ({className, ...props}, ref) => { - const {updateRoute} = useRouting(); +const Sidebar: React.FC = ({route}) => { + const {updateRoute} = useRouting(); - return ( -
*]:pointer-events-auto', - className - )} - {...props} - > -
-
- - - - -
- -
- -
- - - - + return ( +
*]:pointer-events-auto' + )} + > +
+
+ updateRoute('inbox')}> + + Inbox + + updateRoute('feed')}> + + Feed + + updateRoute('notifications')}> + + Notifications + + updateRoute('profile')}> + + Profile +
+ +
+ +
+ + + +
- ); - } -); +
+ ); +}; Sidebar.displayName = 'Sidebar'; diff --git a/apps/admin-x-activitypub/src/components/layout/Sidebar/SidebarButton.tsx b/apps/admin-x-activitypub/src/components/layout/Sidebar/SidebarButton.tsx new file mode 100644 index 0000000000..11337d28ec --- /dev/null +++ b/apps/admin-x-activitypub/src/components/layout/Sidebar/SidebarButton.tsx @@ -0,0 +1,29 @@ +import * as React from 'react'; +import {Button, ButtonProps, cn} from '@tryghost/shade'; + +interface SidebarButtonProps extends ButtonProps { + active: boolean; + children: React.ReactNode; +} + +const SidebarButton = React.forwardRef( + ({active, children, ...props}, ref) => { + return ( + + ); + } +); + +SidebarButton.displayName = 'SidebarButton'; + +export default SidebarButton; \ No newline at end of file diff --git a/apps/admin-x-activitypub/src/views/Search/Search.tsx b/apps/admin-x-activitypub/src/views/Search/Search.tsx index a8dcc6bd5e..0c92d30023 100644 --- a/apps/admin-x-activitypub/src/views/Search/Search.tsx +++ b/apps/admin-x-activitypub/src/views/Search/Search.tsx @@ -8,7 +8,6 @@ import {useDebounce} from 'use-debounce'; import APAvatar from '@components/global/APAvatar'; import ActivityItem from '@components/activities/ActivityItem'; import FollowButton from '@components/global/FollowButton'; -import MainNavigation from '@components/navigation/MainNavigation'; import Separator from '@components/global/Separator'; import ViewProfileModal from '@components/modals/ViewProfileModal'; @@ -206,7 +205,6 @@ const Search: React.FC = ({}) => { return ( <> -