From e659ed4a2da2b6e1a9eb5ac25895fa1bffd1b000 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Thu, 17 Jul 2025 15:23:53 +0200 Subject: [PATCH] fix: Add icons to popup menu items --- .../AddAttachmentStep/AddAttachmentStep.jsx | 3 +- .../AddAttachmentStep.module.scss | 5 +++ .../RightSide/ActionsStep.module.scss | 2 +- .../src/components/cards/Card/ActionsStep.jsx | 14 ++++++++- .../cards/Card/ActionsStep.module.scss | 5 +++ .../UsersPane/ActionsStep.jsx | 9 +++++- .../UsersPane/ActionsStep.module.scss | 5 +++ .../src/components/lists/List/ActionsStep.jsx | 9 +++++- .../lists/List/ActionsStep.module.scss | 5 +++ .../task-lists/TaskList/Task/ActionsStep.jsx | 4 ++- .../TaskList/Task/ActionsStep.module.scss | 5 +++ .../components/users/UserStep/UserStep.jsx | 31 ++++++++++--------- .../users/UserStep/UserStep.module.scss | 5 +++ 13 files changed, 81 insertions(+), 21 deletions(-) diff --git a/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.jsx b/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.jsx index 78707763..1977bd67 100644 --- a/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.jsx +++ b/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.jsx @@ -7,7 +7,7 @@ import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { useDispatch } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Menu } from 'semantic-ui-react'; +import { Icon, Menu } from 'semantic-ui-react'; import { FilePicker, Popup } from '../../../lib/custom-ui'; import entryActions from '../../../entry-actions'; @@ -47,6 +47,7 @@ const AddAttachmentStep = React.memo(({ onClose }) => { + {t('common.fromComputer', { context: 'title', })} diff --git a/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.module.scss b/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.module.scss index 5a4159d6..05b6a0ea 100644 --- a/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.module.scss +++ b/client/src/components/attachments/AddAttachmentStep/AddAttachmentStep.module.scss @@ -21,6 +21,11 @@ padding-left: 14px; } + .menuItemIcon { + float: left; + margin: 0 0.5em 0 0; + } + .tip { opacity: 0.5; } diff --git a/client/src/components/boards/BoardActions/RightSide/ActionsStep.module.scss b/client/src/components/boards/BoardActions/RightSide/ActionsStep.module.scss index b218b96c..d8352639 100644 --- a/client/src/components/boards/BoardActions/RightSide/ActionsStep.module.scss +++ b/client/src/components/boards/BoardActions/RightSide/ActionsStep.module.scss @@ -23,6 +23,6 @@ .menuItemIcon { float: left; - margin-right: 0.5em; + margin: 0 0.5em 0 0; } } diff --git a/client/src/components/cards/Card/ActionsStep.jsx b/client/src/components/cards/Card/ActionsStep.jsx index f796695e..5adae2c6 100644 --- a/client/src/components/cards/Card/ActionsStep.jsx +++ b/client/src/components/cards/Card/ActionsStep.jsx @@ -7,7 +7,7 @@ import React, { useCallback, useMemo } from 'react'; import PropTypes from 'prop-types'; import { shallowEqual, useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Menu } from 'semantic-ui-react'; +import { Icon, Menu } from 'semantic-ui-react'; import { Popup } from '../../../lib/custom-ui'; import selectors from '../../../selectors'; @@ -290,6 +290,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { {canEditName && ( + {t('action.editTitle', { context: 'title', })} @@ -297,6 +298,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {!board.limitCardTypesToDefaultOne && canEditType && ( + {t('action.editType', { context: 'title', })} @@ -304,6 +306,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {card.type === CardTypes.PROJECT && canUseMembers && ( + {t('common.members', { context: 'title', })} @@ -311,6 +314,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {canUseLabels && ( + {t('common.labels', { context: 'title', })} @@ -318,6 +322,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {card.type === CardTypes.STORY && canUseMembers && ( + {t('common.members', { context: 'title', })} @@ -325,6 +330,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {card.type === CardTypes.PROJECT && canEditDueDate && ( + {t('action.editDueDate', { context: 'title', })} @@ -332,6 +338,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {card.type === CardTypes.PROJECT && canEditStopwatch && ( + {t('action.editStopwatch', { context: 'title', })} @@ -339,6 +346,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {canDuplicate && ( + {t('action.duplicateCard', { context: 'title', })} @@ -346,6 +354,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {canMove && ( + {t('action.moveCard', { context: 'title', })} @@ -353,6 +362,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {prevList && canRestore && ( + {t('action.restoreToList', { context: 'title', list: prevList.name || t(`common.${prevList.type}`), @@ -361,6 +371,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {list.type !== ListTypes.ARCHIVE && canArchive && ( + {t('action.archiveCard', { context: 'title', })} @@ -368,6 +379,7 @@ const ActionsStep = React.memo(({ cardId, onNameEdit, onClose }) => { )} {canDelete && ( + {isInTrashList ? t('action.deleteForever', { context: 'title', diff --git a/client/src/components/cards/Card/ActionsStep.module.scss b/client/src/components/cards/Card/ActionsStep.module.scss index 10966717..6c554199 100644 --- a/client/src/components/cards/Card/ActionsStep.module.scss +++ b/client/src/components/cards/Card/ActionsStep.module.scss @@ -13,4 +13,9 @@ margin: 0; padding-left: 14px; } + + .menuItemIcon { + float: left; + margin: 0 0.5em 0 0; + } } diff --git a/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.jsx b/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.jsx index 5d651521..0b5a0347 100644 --- a/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.jsx +++ b/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.jsx @@ -7,7 +7,7 @@ import React, { useCallback, useMemo } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Menu } from 'semantic-ui-react'; +import { Icon, Menu } from 'semantic-ui-react'; import { Popup } from '../../../../lib/custom-ui'; import selectors from '../../../../selectors'; @@ -180,12 +180,14 @@ const ActionsStep = React.memo(({ userId, onClose }) => { + {t('action.editInformation', { context: 'title', })} {!user.lockedFieldNames.includes('username') && ( + {t('action.editUsername', { context: 'title', })} @@ -193,6 +195,7 @@ const ActionsStep = React.memo(({ userId, onClose }) => { )} {!user.lockedFieldNames.includes('email') && ( + {t('action.editEmail', { context: 'title', })} @@ -200,6 +203,7 @@ const ActionsStep = React.memo(({ userId, onClose }) => { )} {!user.lockedFieldNames.includes('password') && ( + {t('action.editPassword', { context: 'title', })} @@ -207,6 +211,7 @@ const ActionsStep = React.memo(({ userId, onClose }) => { )} {!user.lockedFieldNames.includes('role') && ( + {t('action.editRole', { context: 'title', })} @@ -221,6 +226,7 @@ const ActionsStep = React.memo(({ userId, onClose }) => { className={styles.menuItem} onClick={user.isDeactivated ? handleActivateClick : handleDeactivateClick} > + {user.isDeactivated ? t('action.activateUser', { context: 'title', @@ -231,6 +237,7 @@ const ActionsStep = React.memo(({ userId, onClose }) => { {user.isDeactivated && !user.isDefaultAdmin && ( + {t('action.deleteUser', { context: 'title', })} diff --git a/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.module.scss b/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.module.scss index 10966717..6c554199 100644 --- a/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.module.scss +++ b/client/src/components/common/AdministrationModal/UsersPane/ActionsStep.module.scss @@ -13,4 +13,9 @@ margin: 0; padding-left: 14px; } + + .menuItemIcon { + float: left; + margin: 0 0.5em 0 0; + } } diff --git a/client/src/components/lists/List/ActionsStep.jsx b/client/src/components/lists/List/ActionsStep.jsx index 66b63c3c..fc1a91f0 100755 --- a/client/src/components/lists/List/ActionsStep.jsx +++ b/client/src/components/lists/List/ActionsStep.jsx @@ -7,7 +7,7 @@ import React, { useCallback, useMemo } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Menu } from 'semantic-ui-react'; +import { Icon, Menu } from 'semantic-ui-react'; import { Popup } from '../../../lib/custom-ui'; import selectors from '../../../selectors'; @@ -128,38 +128,45 @@ const ActionsStep = React.memo(({ listId, onNameEdit, onCardAdd, onClose }) => { + {t('action.editTitle', { context: 'title', })} + {t('action.editType', { context: 'title', })} + {t('action.editColor', { context: 'title', })} + {t('action.addCard', { context: 'title', })} + {t('action.sortList', { context: 'title', })} {list.type === ListTypes.CLOSED && ( + {t('action.archiveCards', { context: 'title', })} )} + {t('action.deleteList', { context: 'title', })} diff --git a/client/src/components/lists/List/ActionsStep.module.scss b/client/src/components/lists/List/ActionsStep.module.scss index 10966717..6c554199 100644 --- a/client/src/components/lists/List/ActionsStep.module.scss +++ b/client/src/components/lists/List/ActionsStep.module.scss @@ -13,4 +13,9 @@ margin: 0; padding-left: 14px; } + + .menuItemIcon { + float: left; + margin: 0 0.5em 0 0; + } } diff --git a/client/src/components/task-lists/TaskList/Task/ActionsStep.jsx b/client/src/components/task-lists/TaskList/Task/ActionsStep.jsx index d391398d..bc984f88 100755 --- a/client/src/components/task-lists/TaskList/Task/ActionsStep.jsx +++ b/client/src/components/task-lists/TaskList/Task/ActionsStep.jsx @@ -7,7 +7,7 @@ import React, { useCallback, useMemo } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Menu } from 'semantic-ui-react'; +import { Icon, Menu } from 'semantic-ui-react'; import { Popup } from '../../../../lib/custom-ui'; import selectors from '../../../../selectors'; @@ -66,12 +66,14 @@ const ActionsStep = React.memo(({ taskId, onNameEdit, onClose }) => { {!task.linkedCardId && ( + {t('action.editDescription', { context: 'title', })} )} + {t('action.deleteTask', { context: 'title', })} diff --git a/client/src/components/task-lists/TaskList/Task/ActionsStep.module.scss b/client/src/components/task-lists/TaskList/Task/ActionsStep.module.scss index 10966717..6c554199 100644 --- a/client/src/components/task-lists/TaskList/Task/ActionsStep.module.scss +++ b/client/src/components/task-lists/TaskList/Task/ActionsStep.module.scss @@ -13,4 +13,9 @@ margin: 0; padding-left: 14px; } + + .menuItemIcon { + float: left; + margin: 0 0.5em 0 0; + } } diff --git a/client/src/components/users/UserStep/UserStep.jsx b/client/src/components/users/UserStep/UserStep.jsx index 1d943c19..a9e2e86e 100755 --- a/client/src/components/users/UserStep/UserStep.jsx +++ b/client/src/components/users/UserStep/UserStep.jsx @@ -7,7 +7,7 @@ import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Button, Menu } from 'semantic-ui-react'; +import { Button, Icon, Menu } from 'semantic-ui-react'; import { Popup } from '../../../lib/custom-ui'; import selectors from '../../../selectors'; @@ -31,15 +31,15 @@ const UserStep = React.memo(({ onClose }) => { onClose(); }, [onClose, dispatch]); - const handleLogoutClick = useCallback(() => { - dispatch(entryActions.logout()); - }, [dispatch]); - const handleAdministrationClick = useCallback(() => { dispatch(entryActions.openAdministrationModal()); onClose(); }, [onClose, dispatch]); + const handleLogoutClick = useCallback(() => { + dispatch(entryActions.logout()); + }, [dispatch]); + let logoutMenuItemProps; if (isLogouting) { logoutMenuItemProps = { @@ -61,29 +61,30 @@ const UserStep = React.memo(({ onClose }) => { + {t('common.settings', { context: 'title', })} + {withAdministration && ( + + + {t('common.administration', { + context: 'title', + })} + + )} +
+ {t('action.logOut', { context: 'title', })} - {withAdministration && ( - <> -
- - {t('common.administration', { - context: 'title', - })} - - - )}
diff --git a/client/src/components/users/UserStep/UserStep.module.scss b/client/src/components/users/UserStep/UserStep.module.scss index ce7d83eb..d8352639 100644 --- a/client/src/components/users/UserStep/UserStep.module.scss +++ b/client/src/components/users/UserStep/UserStep.module.scss @@ -20,4 +20,9 @@ margin: 0; padding-left: 14px; } + + .menuItemIcon { + float: left; + margin: 0 0.5em 0 0; + } }