|
@@ -20,6 +20,12 @@ import {
|
|
|
|
|
|
|
|
import UserPicture from '../User/UserPicture';
|
|
import UserPicture from '../User/UserPicture';
|
|
|
|
|
|
|
|
|
|
+import SidebarDrawerIcon from '../Icons/SidebarDrawerIcon';
|
|
|
|
|
+import SidebarDockIcon from '../Icons/SidebarDockIcon';
|
|
|
|
|
+import MoonIcon from '../Icons/MoonIcon';
|
|
|
|
|
+import SunIcon from '../Icons/SunIcon';
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const PersonalDropdown = (props) => {
|
|
const PersonalDropdown = (props) => {
|
|
|
|
|
|
|
|
const { t, appContainer, navigationContainer } = props;
|
|
const { t, appContainer, navigationContainer } = props;
|
|
@@ -79,16 +85,12 @@ const PersonalDropdown = (props) => {
|
|
|
} = navigationContainer.state;
|
|
} = navigationContainer.state;
|
|
|
|
|
|
|
|
/* eslint-disable react/prop-types */
|
|
/* eslint-disable react/prop-types */
|
|
|
- const DrawerIcon = props => (
|
|
|
|
|
- <>
|
|
|
|
|
- <i id={props.id} className="icon-drawer px-2"></i>
|
|
|
|
|
- <UncontrolledTooltip placement="bottom" fade={false} target={props.id}>Drawer</UncontrolledTooltip>
|
|
|
|
|
- </>
|
|
|
|
|
- );
|
|
|
|
|
- const DockIcon = props => (
|
|
|
|
|
|
|
+ const IconWithTooltip = ({
|
|
|
|
|
+ id, label, children, additionalClasses,
|
|
|
|
|
+ }) => (
|
|
|
<>
|
|
<>
|
|
|
- <i id={props.id} className="ti-layout-sidebar-left px-2"></i>
|
|
|
|
|
- <UncontrolledTooltip placement="bottom" fade={false} target={props.id}>Dock</UncontrolledTooltip>
|
|
|
|
|
|
|
+ <div id={id} className={`px-2 grw-icon-container ${additionalClasses != null ? additionalClasses : ''}`}>{children}</div>
|
|
|
|
|
+ <UncontrolledTooltip placement="bottom" fade={false} target={id}>{label}</UncontrolledTooltip>
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|
|
|
/* eslint-enable react/prop-types */
|
|
/* eslint-enable react/prop-types */
|
|
@@ -129,11 +131,14 @@ const PersonalDropdown = (props) => {
|
|
|
|
|
|
|
|
<div className="dropdown-divider"></div>
|
|
<div className="dropdown-divider"></div>
|
|
|
|
|
|
|
|
|
|
+ {/* Sidebar Mode */}
|
|
|
<h6 className="dropdown-header">{t('personal_dropdown.sidebar_mode')}</h6>
|
|
<h6 className="dropdown-header">{t('personal_dropdown.sidebar_mode')}</h6>
|
|
|
<form className="px-4">
|
|
<form className="px-4">
|
|
|
<div className="form-row justify-content-center">
|
|
<div className="form-row justify-content-center">
|
|
|
<div className="form-group col-auto mb-0 d-flex align-items-center">
|
|
<div className="form-group col-auto mb-0 d-flex align-items-center">
|
|
|
- <DrawerIcon id="icon-prefer-drawer" />
|
|
|
|
|
|
|
+ <IconWithTooltip id="iwt-sidebar-drawer" label="Drawer">
|
|
|
|
|
+ <SidebarDrawerIcon />
|
|
|
|
|
+ </IconWithTooltip>
|
|
|
<div className="custom-control custom-switch custom-checkbox-secondary ml-2">
|
|
<div className="custom-control custom-switch custom-checkbox-secondary ml-2">
|
|
|
<input
|
|
<input
|
|
|
id="swSidebarMode"
|
|
id="swSidebarMode"
|
|
@@ -144,15 +149,21 @@ const PersonalDropdown = (props) => {
|
|
|
/>
|
|
/>
|
|
|
<label className="custom-control-label" htmlFor="swSidebarMode"></label>
|
|
<label className="custom-control-label" htmlFor="swSidebarMode"></label>
|
|
|
</div>
|
|
</div>
|
|
|
- <DockIcon id="icon-prefer-dock" />
|
|
|
|
|
|
|
+ <IconWithTooltip id="iwt-sidebar-dock" label="Dock">
|
|
|
|
|
+ <SidebarDockIcon />
|
|
|
|
|
+ </IconWithTooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
|
|
+
|
|
|
|
|
+ {/* Sidebar Mode on Editor */}
|
|
|
<h6 className="dropdown-header">{t('personal_dropdown.sidebar_mode_editor')}</h6>
|
|
<h6 className="dropdown-header">{t('personal_dropdown.sidebar_mode_editor')}</h6>
|
|
|
<form className="px-4">
|
|
<form className="px-4">
|
|
|
<div className="form-row justify-content-center">
|
|
<div className="form-row justify-content-center">
|
|
|
<div className="form-group col-auto mb-0 d-flex align-items-center">
|
|
<div className="form-group col-auto mb-0 d-flex align-items-center">
|
|
|
- <DrawerIcon id="icon-prefer-drawer-on-edit" />
|
|
|
|
|
|
|
+ <IconWithTooltip id="iwt-sidebar-editor-drawer" label="Drawer">
|
|
|
|
|
+ <SidebarDrawerIcon />
|
|
|
|
|
+ </IconWithTooltip>
|
|
|
<div className="custom-control custom-switch custom-checkbox-secondary ml-2">
|
|
<div className="custom-control custom-switch custom-checkbox-secondary ml-2">
|
|
|
<input
|
|
<input
|
|
|
id="swSidebarModeOnEditor"
|
|
id="swSidebarModeOnEditor"
|
|
@@ -163,13 +174,16 @@ const PersonalDropdown = (props) => {
|
|
|
/>
|
|
/>
|
|
|
<label className="custom-control-label" htmlFor="swSidebarModeOnEditor"></label>
|
|
<label className="custom-control-label" htmlFor="swSidebarModeOnEditor"></label>
|
|
|
</div>
|
|
</div>
|
|
|
- <DockIcon id="icon-prefer-dock-on-edit" />
|
|
|
|
|
|
|
+ <IconWithTooltip id="iwt-sidebar-editor-dock" label="Dock">
|
|
|
|
|
+ <SidebarDockIcon />
|
|
|
|
|
+ </IconWithTooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
<div className="dropdown-divider"></div>
|
|
<div className="dropdown-divider"></div>
|
|
|
|
|
|
|
|
|
|
+ {/* Color Mode */}
|
|
|
<h6 className="dropdown-header">{t('personal_dropdown.color_mode')}</h6>
|
|
<h6 className="dropdown-header">{t('personal_dropdown.color_mode')}</h6>
|
|
|
<form className="px-4">
|
|
<form className="px-4">
|
|
|
<div className="form-row">
|
|
<div className="form-row">
|
|
@@ -188,7 +202,9 @@ const PersonalDropdown = (props) => {
|
|
|
</div>
|
|
</div>
|
|
|
<div className="form-row justify-content-center">
|
|
<div className="form-row justify-content-center">
|
|
|
<div className="form-group col-auto mb-0 d-flex align-items-center">
|
|
<div className="form-group col-auto mb-0 d-flex align-items-center">
|
|
|
- <span className={useOsSettings ? '' : 'text-muted'}>Light</span>
|
|
|
|
|
|
|
+ <IconWithTooltip id="iwt-light" label="Light" additionalClasses={useOsSettings ? 'grw-icon-container-muted' : ''}>
|
|
|
|
|
+ <SunIcon />
|
|
|
|
|
+ </IconWithTooltip>
|
|
|
<div className="custom-control custom-switch custom-checkbox-secondary ml-2">
|
|
<div className="custom-control custom-switch custom-checkbox-secondary ml-2">
|
|
|
<input
|
|
<input
|
|
|
id="swUserPreference"
|
|
id="swUserPreference"
|
|
@@ -200,7 +216,9 @@ const PersonalDropdown = (props) => {
|
|
|
/>
|
|
/>
|
|
|
<label className="custom-control-label" htmlFor="swUserPreference"></label>
|
|
<label className="custom-control-label" htmlFor="swUserPreference"></label>
|
|
|
</div>
|
|
</div>
|
|
|
- <span className={useOsSettings ? '' : 'text-muted'}>Dark</span>
|
|
|
|
|
|
|
+ <IconWithTooltip id="iwt-dark" label="Dark" additionalClasses={useOsSettings ? 'grw-icon-container-muted' : ''}>
|
|
|
|
|
+ <MoonIcon />
|
|
|
|
|
+ </IconWithTooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</form>
|
|
</form>
|