TagSpaces is an offline, open source, document manager with tagging support
fixing the icons in the location menu
Ilian Sapundshiev5fbb6468103b
diff --git a/app/components/FolderContainer.js b/app/components/FolderContainer.jsindex 4fb3f7da7..3eac5e566 100644--- a/app/components/FolderContainer.js+++ b/app/components/FolderContainer.js@@ -23,15 +23,9 @@ import { bindActionCreators } from 'redux';import Button from '@material-ui/core/Button';import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';import Typography from '@material-ui/core/Typography';-import FolderIcon from '@material-ui/icons/FolderOutlined';import FolderSeparatorIcon from '@material-ui/icons/KeyboardArrowRight';import MoreVertIcon from '@material-ui/icons/MoreVert';import { withStyles } from '@material-ui/core/styles';-import Menu from '@material-ui/core/Menu';-import MenuItem from '@material-ui/core/MenuItem';-import ListItemIcon from '@material-ui/core/ListItemIcon';-import ListItemText from '@material-ui/core/ListItemText';-import ListSubHeader from '@material-ui/core/ListSubheader';import { HotKeys } from 'react-hotkeys';import Loadable from 'react-loadable';import WelcomePanel from './WelcomePanel';diff --git a/app/components/LocationMenu.js b/app/components/LocationMenu.jsindex 842c45987..211d7664f 100644--- a/app/components/LocationMenu.js+++ b/app/components/LocationMenu.js@@ -20,10 +20,10 @@import React from 'react';import { connect } from 'react-redux';import { bindActionCreators } from 'redux';-import FolderIcon from '@material-ui/icons/Folder';import Menu from '@material-ui/core/Menu';import MenuItem from '@material-ui/core/MenuItem';import LocationIcon from '@material-ui/icons/WorkOutline';+import CloudLocationIcon from '@material-ui/icons/CloudQueue';import ListItemIcon from '@material-ui/core/ListItemIcon';import ListItemText from '@material-ui/core/ListItemText';import ListSubHeader from '@material-ui/core/ListSubheader';@@ -31,7 +31,7 @@ import { withTheme } from '@material-ui/core/styles';import Button from '@material-ui/core/Button';import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';import i18n from '../services/i18n';-import { getLocations, type Location } from '../reducers/locations';+import { getLocations, type Location, locationType } from '../reducers/locations';import {actions as AppActions,getCurrentLocationId } from '../reducers/app';@@ -85,6 +85,7 @@ class LocationMenu extends React.Component { // <Props, State>render() {const { theme } = this.props;+ const { currentLocation } = this.state;return (<div><Button@@ -117,10 +118,12 @@ class LocationMenu extends React.Component { // <Props, State>data-tid="folderContainerMenuOpenLocation"key={location.uuid}onClick={() => this.openLocation(location)}- style={ (this.state.currentLocation && this.state.currentLocation.uuid === location.uuid) ? { backgroundColor: theme.palette.primary.light } : {}}+ style={(currentLocation && currentLocation.uuid === location.uuid) ? { backgroundColor: theme.palette.primary.light } : {}}><ListItemIcon>- <FolderIcon />+ { location.type === locationType.TYPE_CLOUD ?+ (<CloudLocationIcon />) : (<LocationIcon />)+ }</ListItemIcon><ListItemText inset primary={location.name} /></MenuItem>