Skip to content
Snippets Groups Projects
Unverified Commit c318cad6 authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Merge pull request #2880 from art-institute-of-chicago/WindowTopMenuButton

add ability to show or hide the top menu button
parents 438aa365 9d3bc3c5
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ export class WindowTopBar extends Component { ...@@ -27,7 +27,7 @@ export class WindowTopBar extends Component {
const { const {
removeWindow, windowId, classes, toggleWindowSideBar, t, windowDraggable, removeWindow, windowId, classes, toggleWindowSideBar, t, windowDraggable,
maximizeWindow, maximized, minimizeWindow, focused, allowClose, allowMaximize, maximizeWindow, maximized, minimizeWindow, focused, allowClose, allowMaximize,
focusWindow, allowFullscreen, focusWindow, allowFullscreen, allowTopMenuButton,
} = this.props; } = this.props;
return ( return (
...@@ -53,7 +53,9 @@ export class WindowTopBar extends Component { ...@@ -53,7 +53,9 @@ export class WindowTopBar extends Component {
<WindowTopBarTitle <WindowTopBarTitle
windowId={windowId} windowId={windowId}
/> />
{allowTopMenuButton && (
<WindowTopMenuButton className={ns('window-menu-btn')} windowId={windowId} /> <WindowTopMenuButton className={ns('window-menu-btn')} windowId={windowId} />
)}
<WindowTopBarPluginMenu windowId={windowId} /> <WindowTopBarPluginMenu windowId={windowId} />
{allowMaximize && ( {allowMaximize && (
<MiradorMenuButton <MiradorMenuButton
...@@ -87,6 +89,7 @@ WindowTopBar.propTypes = { ...@@ -87,6 +89,7 @@ WindowTopBar.propTypes = {
allowClose: PropTypes.bool, allowClose: PropTypes.bool,
allowFullscreen: PropTypes.bool, allowFullscreen: PropTypes.bool,
allowMaximize: PropTypes.bool, allowMaximize: PropTypes.bool,
allowTopMenuButton: PropTypes.bool,
classes: PropTypes.objectOf(PropTypes.string).isRequired, classes: PropTypes.objectOf(PropTypes.string).isRequired,
focused: PropTypes.bool, focused: PropTypes.bool,
focusWindow: PropTypes.func, focusWindow: PropTypes.func,
...@@ -104,6 +107,7 @@ WindowTopBar.defaultProps = { ...@@ -104,6 +107,7 @@ WindowTopBar.defaultProps = {
allowClose: true, allowClose: true,
allowFullscreen: false, allowFullscreen: false,
allowMaximize: true, allowMaximize: true,
allowTopMenuButton: true,
focused: false, focused: false,
focusWindow: () => {}, focusWindow: () => {},
maximized: false, maximized: false,
......
...@@ -216,6 +216,7 @@ export default { ...@@ -216,6 +216,7 @@ export default {
allowClose: true, // Configure if windows can be closed or not allowClose: true, // Configure if windows can be closed or not
allowFullscreen: false, // Configure to show a "fullscreen" button in the WindowTopBar allowFullscreen: false, // Configure to show a "fullscreen" button in the WindowTopBar
allowMaximize: true, // Configure if windows can be maximized or not allowMaximize: true, // Configure if windows can be maximized or not
allowTopMenuButton: true, // Configure if window view and thumbnail display menu are visible or not
authNewWindowCenter: 'parent', // Configure how to center a new window created by the authentication flow. Options: parent, screen authNewWindowCenter: 'parent', // Configure how to center a new window created by the authentication flow. Options: parent, screen
defaultSideBarPanel: 'info', // Configure which sidebar is selected by default. Options: info, attribution, canvas, annotations, search defaultSideBarPanel: 'info', // Configure which sidebar is selected by default. Options: info, attribution, canvas, annotations, search
defaultView: 'single', // Configure which viewing mode (e.g. single, book, gallery) for windows to be opened in defaultView: 'single', // Configure which viewing mode (e.g. single, book, gallery) for windows to be opened in
......
...@@ -12,6 +12,7 @@ const mapStateToProps = (state, { windowId }) => ({ ...@@ -12,6 +12,7 @@ const mapStateToProps = (state, { windowId }) => ({
allowClose: state.config.window.allowClose, allowClose: state.config.window.allowClose,
allowFullscreen: state.config.window.allowFullscreen, allowFullscreen: state.config.window.allowFullscreen,
allowMaximize: state.config.window.allowMaximize, allowMaximize: state.config.window.allowMaximize,
allowTopMenuButton: state.config.window.allowTopMenuButton,
focused: state.workspace.focusedWindowId === windowId, focused: state.workspace.focusedWindowId === windowId,
manifestTitle: getManifestTitle(state, { windowId }), manifestTitle: getManifestTitle(state, { windowId }),
maximized: (getWindow(state, { windowId }) || {}).maximized, maximized: (getWindow(state, { windowId }) || {}).maximized,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment