Layout: standalone fixes
This commit is contained in:
parent
8134b5d016
commit
3d0e9200c2
2 changed files with 6 additions and 2 deletions
|
@ -28,6 +28,7 @@ import RemoteInstancePage from 'soapbox/pages/remote_instance_page';
|
||||||
import StatusPage from 'soapbox/pages/status_page';
|
import StatusPage from 'soapbox/pages/status_page';
|
||||||
import { getAccessToken } from 'soapbox/utils/auth';
|
import { getAccessToken } from 'soapbox/utils/auth';
|
||||||
import { getVapidKey } from 'soapbox/utils/auth';
|
import { getVapidKey } from 'soapbox/utils/auth';
|
||||||
|
import { isStandalone } from 'soapbox/utils/state';
|
||||||
|
|
||||||
import { fetchFollowRequests } from '../../actions/accounts';
|
import { fetchFollowRequests } from '../../actions/accounts';
|
||||||
import { fetchReports, fetchUsers, fetchConfig } from '../../actions/admin';
|
import { fetchReports, fetchUsers, fetchConfig } from '../../actions/admin';
|
||||||
|
@ -346,6 +347,7 @@ const UI: React.FC = ({ children }) => {
|
||||||
const dropdownMenuIsOpen = useAppSelector(state => state.dropdown_menu.get('openId') !== null);
|
const dropdownMenuIsOpen = useAppSelector(state => state.dropdown_menu.get('openId') !== null);
|
||||||
const accessToken = useAppSelector(state => getAccessToken(state));
|
const accessToken = useAppSelector(state => getAccessToken(state));
|
||||||
const streamingUrl = useAppSelector(state => state.instance.urls.get('streaming_api'));
|
const streamingUrl = useAppSelector(state => state.instance.urls.get('streaming_api'));
|
||||||
|
const standalone = useAppSelector(isStandalone);
|
||||||
|
|
||||||
const handleDragEnter = (e: DragEvent) => {
|
const handleDragEnter = (e: DragEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -651,7 +653,7 @@ const UI: React.FC = ({ children }) => {
|
||||||
|
|
||||||
<Layout>
|
<Layout>
|
||||||
<Layout.Sidebar>
|
<Layout.Sidebar>
|
||||||
<SidebarNavigation />
|
{!standalone && <SidebarNavigation />}
|
||||||
</Layout.Sidebar>
|
</Layout.Sidebar>
|
||||||
|
|
||||||
<SwitchingColumnsArea>
|
<SwitchingColumnsArea>
|
||||||
|
|
|
@ -8,11 +8,13 @@ import {
|
||||||
SignUpPanel,
|
SignUpPanel,
|
||||||
} from 'soapbox/features/ui/util/async-components';
|
} from 'soapbox/features/ui/util/async-components';
|
||||||
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||||
|
import { isStandalone } from 'soapbox/utils/state';
|
||||||
|
|
||||||
import { Layout } from '../components/ui';
|
import { Layout } from '../components/ui';
|
||||||
|
|
||||||
const DefaultPage: React.FC = ({ children }) => {
|
const DefaultPage: React.FC = ({ children }) => {
|
||||||
const me = useAppSelector(state => state.me);
|
const me = useAppSelector(state => state.me);
|
||||||
|
const standalone = useAppSelector(isStandalone);
|
||||||
const features = useFeatures();
|
const features = useFeatures();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -22,7 +24,7 @@ const DefaultPage: React.FC = ({ children }) => {
|
||||||
</Layout.Main>
|
</Layout.Main>
|
||||||
|
|
||||||
<Layout.Aside>
|
<Layout.Aside>
|
||||||
{!me && (
|
{!me && !standalone && (
|
||||||
<BundleContainer fetchComponent={SignUpPanel}>
|
<BundleContainer fetchComponent={SignUpPanel}>
|
||||||
{Component => <Component key='sign-up-panel' />}
|
{Component => <Component key='sign-up-panel' />}
|
||||||
</BundleContainer>
|
</BundleContainer>
|
||||||
|
|
Loading…
Reference in a new issue