diff --git a/src/components/item/header/ItemHeader.js b/src/components/item/header/ItemHeader.js index b2372e22e..441e114d4 100644 --- a/src/components/item/header/ItemHeader.js +++ b/src/components/item/header/ItemHeader.js @@ -36,7 +36,7 @@ const ItemHeader = ({ onClick }) => { return (
- + {item && }
); }; diff --git a/src/components/item/header/ItemHeaderActions.js b/src/components/item/header/ItemHeaderActions.js index 9244af428..eed701750 100644 --- a/src/components/item/header/ItemHeaderActions.js +++ b/src/components/item/header/ItemHeaderActions.js @@ -3,15 +3,17 @@ import IconButton from '@material-ui/core/IconButton'; import PropTypes from 'prop-types'; import EditIcon from '@material-ui/icons/Edit'; import { Map } from 'immutable'; +import SettingsIcon from '@material-ui/icons/Settings'; +import { useHistory } from 'react-router'; import InfoIcon from '@material-ui/icons/Info'; import { makeStyles } from '@material-ui/core/styles'; import ModeButton from './ModeButton'; import { ITEM_TYPES } from '../../../enums'; -import DeleteButton from '../../common/DeleteButton'; import { ItemLayoutModeContext } from '../../context/ItemLayoutModeContext'; import { VIEW_ITEM_EDIT_ITEM_BUTTON_ID } from '../../../config/selectors'; import ShareButton from '../../common/ShareButton'; import { ITEM_TYPES_WITH_CAPTIONS } from '../../../config/constants'; +import { buildItemSettingsPath } from '../../../config/paths'; const useStyles = makeStyles((theme) => ({ root: { @@ -26,6 +28,7 @@ const useStyles = makeStyles((theme) => ({ })); const ItemHeaderActions = ({ onClick, item }) => { const classes = useStyles(); + const { push } = useHistory(); const type = item?.get('type'); const isFile = type && type !== ITEM_TYPES.FOLDER; const id = item?.get('id'); @@ -45,17 +48,23 @@ const ItemHeaderActions = ({ onClick, item }) => { ); + const onClickSettings = () => { + push(buildItemSettingsPath(id)); + }; + return (
{actions} {!isFile && } {id && ( <> - - + + + + )}
diff --git a/src/components/item/settings/ItemLoginSetting.js b/src/components/item/settings/ItemLoginSetting.js index b4a21399c..20389c52e 100644 --- a/src/components/item/settings/ItemLoginSetting.js +++ b/src/components/item/settings/ItemLoginSetting.js @@ -103,6 +103,7 @@ const ItemLoginSwitch = () => { > {Object.values(SETTINGS.ITEM_LOGIN.OPTIONS).map((value) => ( diff --git a/src/config/paths.js b/src/config/paths.js index e32497b4f..601e8d413 100644 --- a/src/config/paths.js +++ b/src/config/paths.js @@ -5,3 +5,5 @@ export const ITEMS_PATH = '/items'; export const buildItemPath = (id = ':itemId') => `${ITEMS_PATH}/${id}`; export const REDIRECT_PATH = '/redirect'; export const MEMBER_PROFILE_PATH = '/profile'; +export const buildItemSettingsPath = (id = ':itemId') => + `${ITEMS_PATH}/${id}/settings`; diff --git a/src/langs/en.json b/src/langs/en.json index 5cccd588e..5f8f428b2 100644 --- a/src/langs/en.json +++ b/src/langs/en.json @@ -83,6 +83,7 @@ "Storage Used": "Storage Used", "Member Since": "Member Since", "Profile": "Profile", - "Member ID": "Member ID" + "Member ID": "Member ID", + "Size": "Size" } } diff --git a/src/langs/fr.json b/src/langs/fr.json index de70a6c58..b170beac3 100644 --- a/src/langs/fr.json +++ b/src/langs/fr.json @@ -83,6 +83,7 @@ "Storage Used": "Mémoire utilisée", "Member Since": "Membre depuis", "Profile": "Profil", - "Member ID": "ID de Membre" + "Member ID": "ID de Membre", + "Size": "Taille" } }