From 2198816e788bb01cbb85c210dc8512ba3ce86d22 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 24 Jan 2025 19:34:15 -0600 Subject: [PATCH] Add logo and search to left sidebar --- src/components/sidebar-navigation.tsx | 12 +++++++++++- src/components/ui/input.tsx | 2 +- src/components/ui/layout.tsx | 4 ++-- src/features/ui/components/navbar.tsx | 2 +- src/features/ui/index.tsx | 4 +++- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/sidebar-navigation.tsx b/src/components/sidebar-navigation.tsx index e5c857a2a..39750608c 100644 --- a/src/components/sidebar-navigation.tsx +++ b/src/components/sidebar-navigation.tsx @@ -21,9 +21,12 @@ import userPlusIcon from '@tabler/icons/outline/user-plus.svg'; import userIcon from '@tabler/icons/outline/user.svg'; import worldIcon from '@tabler/icons/outline/world.svg'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; +import { Link } from 'react-router-dom'; +import SiteLogo from 'soapbox/components/site-logo.tsx'; import Stack from 'soapbox/components/ui/stack.tsx'; import { useStatContext } from 'soapbox/contexts/stat-context.tsx'; +import Search from 'soapbox/features/compose/components/search.tsx'; import ComposeButton from 'soapbox/features/ui/components/compose-button.tsx'; import { useAppSelector } from 'soapbox/hooks/useAppSelector.ts'; import { useFeatures } from 'soapbox/hooks/useFeatures.ts'; @@ -139,7 +142,14 @@ const SidebarNavigation = () => { }; return ( - + + + + + + + + ( 'text-gray-900 dark:text-gray-100': !props.disabled, 'text-gray-600': props.disabled, 'rounded-md bg-white dark:bg-gray-900 border-gray-400 dark:border-gray-800 black:bg-black': theme === 'normal', - 'rounded-full bg-gray-200 border-gray-200 dark:bg-gray-800 dark:border-gray-800 focus:bg-white dark:focus:bg-gray-900': theme === 'search', + 'rounded-full bg-white border-gray-200 dark:bg-gray-900 dark:border-gray-800 py-2.5': theme === 'search', 'pr-10 rtl:pl-10 rtl:pr-3': isPassword || append, 'pl-8': typeof icon !== 'undefined', 'pl-16': typeof prepend !== 'undefined', diff --git a/src/components/ui/layout.tsx b/src/components/ui/layout.tsx index 332994cc3..16cda33c0 100644 --- a/src/components/ui/layout.tsx +++ b/src/components/ui/layout.tsx @@ -31,7 +31,7 @@ const Layout: LayoutComponent = ({ children }) => ( /** Left sidebar container in the UI. */ const Sidebar: React.FC = ({ children }) => (
- + {children}
@@ -47,7 +47,7 @@ const Main: React.FC> = ({ children, classN /** Right sidebar container in the UI. */ const Aside: React.FC = ({ children }) => (