({
rememberLastPageVisited: state.preferences.rememberLastPageVisited,
shareWorkspaceBrowsingData: state.preferences.shareWorkspaceBrowsingData,
sidebar: state.preferences.sidebar,
+ sidebarShortcutHints: state.preferences.sidebarShortcutHints,
spellcheck: state.preferences.spellcheck,
spellcheckLanguages: state.preferences.spellcheckLanguages,
swipeToNavigate: state.preferences.swipeToNavigate,
diff --git a/src/components/main/workspace-selector.js b/src/components/main/workspace-selector.js
index d25c4851..d3c74f19 100644
--- a/src/components/main/workspace-selector.js
+++ b/src/components/main/workspace-selector.js
@@ -37,18 +37,31 @@ const styles = (theme) => ({
opacity: 1,
},
avatar: {
- height: 32,
- width: 32,
+ height: 36,
+ width: 36,
background: theme.palette.type === 'dark' ? theme.palette.common.black : theme.palette.common.white,
borderRadius: 4,
color: theme.palette.getContrastText(theme.palette.type === 'dark' ? theme.palette.common.black : theme.palette.common.white),
- lineHeight: '32px',
+ lineHeight: '36px',
textAlign: 'center',
fontWeight: 500,
textTransform: 'uppercase',
border: theme.palette.type === 'dark' ? 'none' : '1px solid rgba(0, 0, 0, 0.12)',
overflow: 'hidden',
},
+ avatarLarge: {
+ height: 44,
+ width: 44,
+ lineHeight: '44px',
+ },
+ avatarPicture: {
+ height: 36,
+ width: 36,
+ },
+ avatarPictureLarge: {
+ height: 44,
+ width: 44,
+ },
transparentAvatar: {
background: 'transparent',
border: 'none',
@@ -58,10 +71,6 @@ const styles = (theme) => ({
background: theme.palette.type === 'dark' ? theme.palette.common.white : theme.palette.common.black,
color: theme.palette.getContrastText(theme.palette.type === 'dark' ? theme.palette.common.white : theme.palette.common.black),
},
- avatarPicture: {
- height: '100%',
- width: '100%',
- },
shortcutText: {
marginTop: 2,
marginBottom: 0,
@@ -85,6 +94,7 @@ const WorkspaceSelector = ({
onContextMenu,
order,
picturePath,
+ sidebarShortcutHints,
transparentBackground,
}) => (
{id !== 'add' ? (
-

+

) : '+'}
- {(id === 'add' || order < 9) && (
+ {sidebarShortcutHints && (id === 'add' || order < 9) && (
{id === 'add' ? 'Add' : `${window.process.platform === 'darwin' ? '⌘' : 'Ctrl'} + ${order + 1}`}
)}
@@ -138,11 +157,13 @@ WorkspaceSelector.propTypes = {
onContextMenu: PropTypes.func,
order: PropTypes.number,
picturePath: PropTypes.string,
+ sidebarShortcutHints: PropTypes.bool.isRequired,
transparentBackground: PropTypes.bool,
};
const mapStateToProps = (state, ownProps) => ({
badgeCount: state.workspaceMetas[ownProps.id] ? state.workspaceMetas[ownProps.id].badgeCount : 0,
+ sidebarShortcutHints: state.preferences.sidebarShortcutHints,
});
export default connectComponent(