diff --git a/src/components/WindowTopBar.js b/src/components/WindowTopBar.js index 6bb4cbd62a..fdba502ed2 100644 --- a/src/components/WindowTopBar.js +++ b/src/components/WindowTopBar.js @@ -27,7 +27,7 @@ export class WindowTopBar extends Component { const { removeWindow, windowId, classes, toggleWindowSideBar, t, windowDraggable, maximizeWindow, maximized, minimizeWindow, focused, allowClose, allowMaximize, - focusWindow, allowFullscreen, allowTopMenuButton, allowWindowSideBar, + focusWindow, allowFullscreen, allowTopMenuButton, allowWindowSideBar, sideBarOpen, } = this.props; return ( @@ -46,7 +46,8 @@ export class WindowTopBar extends Component { > {allowWindowSideBar && ( @@ -100,6 +101,7 @@ WindowTopBar.propTypes = { maximized: PropTypes.bool, maximizeWindow: PropTypes.func, minimizeWindow: PropTypes.func, + sideBarOpen: PropTypes.bool, removeWindow: PropTypes.func.isRequired, t: PropTypes.func, toggleWindowSideBar: PropTypes.func.isRequired, @@ -118,6 +120,7 @@ WindowTopBar.defaultProps = { maximized: false, maximizeWindow: () => {}, minimizeWindow: () => {}, + sideBarOpen: false, t: key => key, windowDraggable: true, }; diff --git a/src/containers/WindowTopBar.js b/src/containers/WindowTopBar.js index 82148be2f4..1fee8d051f 100644 --- a/src/containers/WindowTopBar.js +++ b/src/containers/WindowTopBar.js @@ -4,7 +4,7 @@ import { withTranslation } from 'react-i18next'; import { withStyles } from '@material-ui/core'; import { withPlugins } from '../extend/withPlugins'; import * as actions from '../state/actions'; -import { getWindowConfig, isFocused } from '../state/selectors'; +import { getWindow, getWindowConfig, isFocused } from '../state/selectors'; import { WindowTopBar } from '../components/WindowTopBar'; /** mapStateToProps */ @@ -19,6 +19,7 @@ const mapStateToProps = (state, { windowId }) => { allowWindowSideBar: config.allowWindowSideBar, focused: isFocused(state, { windowId }), maximized: config.maximized, + sideBarOpen: (getWindow(state, { windowId }) || {}).sideBarOpen, }; }; diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json index a484f06452..d360139a4e 100644 --- a/src/locales/de/translation.json +++ b/src/locales/de/translation.json @@ -55,6 +55,7 @@ "fetchManifest": "Hinzufügen", "fullScreen": "Vollbild", "gallery": "Galerie", + "hideWindowSideBar": "Seitenleiste ausblenden", "hideZoomControls": "Zoomsteuerung verbergen", "iiif_homepage": "Über diese Ressource", "iiif_manifest": "IIIF-Manifest", @@ -119,6 +120,7 @@ "searchTitle": "Suche", "selectWorkspaceMenu": "Wählen Sie einen Arbeitsflächentyp", "showingNumAnnotations": "{{number}} Annotationen werden angezeigt", + "showWindowSideBar": "Seitenleiste einblenden", "showZoomControls": "Zoomsteuerung anzeigen", "sidebarPanelsNavigation": "Hilfsfensternavigation", "single": "Einzeln", @@ -129,7 +131,7 @@ "thumbnailList": "Miniaturansicht", "thumbnailNavigation": "Miniaturansicht", "thumbnails": "Miniaturansicht", - "toggleWindowSideBar": "Seitenleiste ein-/ausblenden", + "toggleWindowSideBar": "Seitenleiste umschalten", "tryAgain": "Wiederholen", "untitled": "[Unbenannt]", "view": "Ansicht", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 07dfbec7d2..097a866f34 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -57,6 +57,7 @@ "fetchManifest": "Add", "fullScreen": "Full Screen", "gallery": "Gallery", + "hideWindowSideBar": "Hide sidebar", "hideZoomControls": "Hide zoom controls", "iiif_homepage": "About this resource", "iiif_manifest": "IIIF manifest", @@ -123,6 +124,7 @@ "selectWorkspaceMenu": "Select workspace type", "showingNumAnnotations": "Showing {{number}} annotations", "showCollection": "Show collection", + "showWindowSideBar": "Show sidebar", "showZoomControls": "Show zoom controls", "sidebarPanelsNavigation": "Sidebar panels navigation", "single": "Single", @@ -133,7 +135,7 @@ "thumbnailList": "Thumbnail list", "thumbnailNavigation": "Thumbnails", "thumbnails": "Thumbnails", - "toggleWindowSideBar": "Show / hide sidebar", + "toggleWindowSideBar": "Toggle sidebar", "totalCollections": "{{count}} collections", "totalManifests": "{{count}} manifests", "tryAgain": "Try again",