ref: Little refactoring
This commit is contained in:
@@ -16,7 +16,7 @@ import { usePopupInClosableContext } from '../../../hooks';
|
||||
import { isListArchiveOrTrash } from '../../../utils/record-helpers';
|
||||
import { AttachmentTypes, BoardMembershipRoles } from '../../../constants/Enums';
|
||||
import EditStep from './EditStep';
|
||||
import Favicon from './Favicon';
|
||||
import Favicon from '../../common/Favicon';
|
||||
import TimeAgo from '../../common/TimeAgo';
|
||||
|
||||
import styles from './ItemContent.module.scss';
|
||||
@@ -131,7 +131,11 @@ const ItemContent = React.forwardRef(({ id, onOpen }, ref) => {
|
||||
<span className={styles.options}>
|
||||
<button type="button" className={styles.option} onClick={handleDownloadClick}>
|
||||
<Icon name="download" size="small" className={styles.optionIcon} />
|
||||
<span className={styles.optionText}>Download</span>
|
||||
<span className={styles.optionText}>
|
||||
{t('action.download', {
|
||||
context: 'title',
|
||||
})}
|
||||
</span>
|
||||
</button>
|
||||
{attachment.data.image && canEdit && (
|
||||
<button type="button" className={styles.option} onClick={handleToggleCoverClick}>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import Favicon from './Favicon';
|
||||
|
||||
export default Favicon;
|
||||
@@ -73,14 +73,14 @@ const Header = React.memo(() => {
|
||||
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const handleToggleEditModeClick = useCallback(() => {
|
||||
dispatch(entryActions.toggleEditMode(!isEditModeEnabled));
|
||||
}, [isEditModeEnabled, dispatch]);
|
||||
|
||||
const handleToggleFavoritesClick = useCallback(() => {
|
||||
dispatch(entryActions.toggleFavorites(!isFavoritesEnabled));
|
||||
}, [isFavoritesEnabled, dispatch]);
|
||||
|
||||
const handleToggleEditModeClick = useCallback(() => {
|
||||
dispatch(entryActions.toggleEditMode(!isEditModeEnabled));
|
||||
}, [isEditModeEnabled, dispatch]);
|
||||
|
||||
const handleProjectSettingsClick = useCallback(() => {
|
||||
if (!canEditProject) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user