kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'navbar-standalone' into 'main'
Navbar: hide login form in standalone mode See merge request soapbox-pub/soapbox!3019environments/review-main-yi2y9f/deployments/4605
commit
c6c6572f78
|
@ -10,7 +10,8 @@ import { openSidebar } from 'soapbox/actions/sidebar';
|
|||
import SiteLogo from 'soapbox/components/site-logo';
|
||||
import { Avatar, Button, Form, HStack, IconButton, Input, Tooltip } from 'soapbox/components/ui';
|
||||
import Search from 'soapbox/features/compose/components/search';
|
||||
import { useAppDispatch, useFeatures, useOwnAccount, useRegistrationStatus } from 'soapbox/hooks';
|
||||
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount, useRegistrationStatus } from 'soapbox/hooks';
|
||||
import { isStandalone } from 'soapbox/utils/state';
|
||||
|
||||
import ProfileDropdown from './profile-dropdown';
|
||||
|
||||
|
@ -28,6 +29,7 @@ const Navbar = () => {
|
|||
const dispatch = useAppDispatch();
|
||||
const intl = useIntl();
|
||||
const features = useFeatures();
|
||||
const standalone = useAppSelector(isStandalone);
|
||||
const { isOpen } = useRegistrationStatus();
|
||||
const { account } = useOwnAccount();
|
||||
const node = useRef(null);
|
||||
|
@ -103,6 +105,7 @@ const Navbar = () => {
|
|||
)}
|
||||
</HStack>
|
||||
|
||||
{!standalone && (
|
||||
<HStack space={3} alignItems='center' className='absolute inset-y-0 right-0 pr-2 lg:static lg:inset-auto lg:ml-6 lg:pr-0'>
|
||||
{account ? (
|
||||
<div className='relative hidden items-center lg:flex'>
|
||||
|
@ -180,6 +183,7 @@ const Navbar = () => {
|
|||
</>
|
||||
)}
|
||||
</HStack>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
Ładowanie…
Reference in New Issue