diff --git a/ui/component/page/view.jsx b/ui/component/page/view.jsx index 76867b415..6d288c3bc 100644 --- a/ui/component/page/view.jsx +++ b/ui/component/page/view.jsx @@ -4,6 +4,7 @@ import React, { Fragment } from 'react'; import classnames from 'classnames'; import { lazyImport } from 'util/lazyImport'; import SideNavigation from 'component/sideNavigation'; +import SettingsSideNavigation from 'component/settingsSideNavigation'; import Header from 'component/header'; /* @if TARGET='app' */ import StatusBar from 'component/common/status-bar'; @@ -78,6 +79,24 @@ function Page(props: Props) { const isAbsoluteSideNavHidden = (isOnFilePage || isMobile) && !sidebarOpen; + function getSideNavElem() { + if (!authPage) { + if (settingsPage) { + return ; + } else if (!noSideNavigation) { + return ( + + ); + } + } + return null; + } + React.useEffect(() => { if (isOnFilePage || isMediumScreen) { setSidebarOpen(false); @@ -102,14 +121,8 @@ function Page(props: Props) { 'main-wrapper__inner--theater-mode': isOnFilePage && videoTheaterMode, })} > - {!authPage && !noSideNavigation && ( - - )} + {getSideNavElem()} +
{ noFooter settingsPage noSideNavigation - backout={{ title: __('Settings'), backLabel: __('Done') }} + backout={{ title: __('Settings'), backLabel: __('Back') }} className="card-stack" > - - -
- {!isAuthenticated && IS_WEB && ( - <> - -
- -
- } - /> -
- - )} - - {!IS_WEB && noDaemonSettings ? ( -
-
{__('Failed to load settings.')}
-
- ) : ( -
- - - - + {!isAuthenticated && IS_WEB && ( + <> + +
+ +
+ } + />
- )} - + + )} + + {!IS_WEB && noDaemonSettings ? ( +
+
{__('Failed to load settings.')}
+
+ ) : ( +
+ + + + +
+ )} ); }