Add new overview landing page setting (#39074)
This commit is contained in:
1 parent
f6d1795da5
commit
07d099cbf7
15 files changed
+483
-17
No files matched your search
@@ -12,6 +12,8 @@ import classNames from 'classnames';
|
||||
import type { List, Record } from 'immutable';
|
||||
|
||||
import { useAppSelector } from '@/mastodon/store';
|
||||
import { Footer } from 'mastodon/features/custom_homepage/components/footer';
|
||||
import { Header } from 'mastodon/features/custom_homepage/components/header';
|
||||
import { CollapsibleNavigationPanel } from 'mastodon/features/navigation_panel';
|
||||
|
||||
import { useBreakpoint } from '../hooks/useBreakpoint';
|
||||
@@ -85,9 +87,10 @@ export const ColumnsArea = forwardRef<
|
||||
HTMLDivElement,
|
||||
{
|
||||
singleColumn?: boolean;
|
||||
minimalShell?: boolean;
|
||||
children: React.ReactElement | React.ReactElement[];
|
||||
}
|
||||
>(({ children, singleColumn }, ref) => {
|
||||
>(({ children, minimalShell, singleColumn }, ref) => {
|
||||
const renderComposePanel = !useBreakpoint('full');
|
||||
const columns = useAppSelector((state) =>
|
||||
(state.settings as Record<{ columns: List<Record<Column>> }>).get(
|
||||
@@ -98,6 +101,24 @@ export const ColumnsArea = forwardRef<
|
||||
(state) => !state.modal.get('stack').isEmpty(),
|
||||
);
|
||||
|
||||
if (minimalShell) {
|
||||
return (
|
||||
<div className='columns-area__panels'>
|
||||
<div className='columns-area__panels__main'>
|
||||
<Header />
|
||||
|
||||
<div className='tabs-bar__wrapper'>
|
||||
<TabsBarPortal />
|
||||
</div>
|
||||
|
||||
<div className='columns-area columns-area--mobile'>{children}</div>
|
||||
|
||||
<Footer />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (singleColumn) {
|
||||
return (
|
||||
<div className='columns-area__panels'>
|
||||
@@ -112,6 +133,7 @@ export const ColumnsArea = forwardRef<
|
||||
<div className='tabs-bar__wrapper'>
|
||||
<TabsBarPortal />
|
||||
</div>
|
||||
|
||||
<div className='columns-area columns-area--mobile'>{children}</div>
|
||||
</main>
|
||||
|
||||
|
||||
Reference in new issue
Block a user