Skip to content

Commit

Permalink
fix(29159): fix icons and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
vanch3d committed Jan 6, 2025
1 parent c34d9b9 commit 3d3058e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export const ClientIcon: FC<IconProps> = (props) => {

export const WorkspaceIcon: FC<IconProps> = (props) => {
const { t } = useTranslation('components')
return <Icon as={PiGraphFill} boxSize={6} aria-label={t('iconLabel.workspace')} {...props} />
return <Icon as={PiGraphFill} boxSize={4} aria-label={t('iconLabel.workspace')} {...props} />
}
7 changes: 5 additions & 2 deletions hivemq-edge/src/frontend/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,12 @@
"delete": "Delete",
"workspace": {
"group": "Manage from Workspace",
"view": "View on workspace",
"view": "Adapter and Device",
"tags": "Device tags",
"mappings": "Mappings",
"mappings": {
"north": "Northbound mappings",
"south": "Southbound mappings"
},
"topicFilters": "Topic filters"
},
"export": "Export"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Adapter, ProtocolAdapter } from '@/api/__generated__'
import { DeviceTypes } from '@/api/types/api-devices.ts'

import ConnectionController from '@/components/ConnectionController/ConnectionController.tsx'
import { PLCTagIcon, TopicIcon } from '@/components/Icons/TopicIcon.tsx'
import { PLCTagIcon, TopicIcon, WorkspaceIcon } from '@/components/Icons/TopicIcon.tsx'
import { deviceCapabilityIcon } from '@/modules/Workspace/utils/adapter.utils.ts'
import { WorkspaceAdapterCommand } from '@/modules/ProtocolAdapters/types.ts'

Expand Down Expand Up @@ -69,23 +69,23 @@ const AdapterActionMenu: FC<AdapterActionMenuProps> = ({
onClick={() => onViewWorkspace?.(id, type as string, WorkspaceAdapterCommand.MAPPINGS)}
icon={<Icon as={deviceCapabilityIcon['READ']} />}
>
Northbound {t('protocolAdapter.table.actions.workspace.mappings')}
{t('protocolAdapter.table.actions.workspace.mappings.north')}
</MenuItem>
)}
{capabilities?.includes('WRITE') && (
<MenuItem
data-testid="adapter-action-mappings"
onClick={() => onViewWorkspace?.(id, type as string, WorkspaceAdapterCommand.MAPPINGS)}
icon={<Icon as={deviceCapabilityIcon['READ']} />}
icon={<Icon as={deviceCapabilityIcon['WRITE']} />}
>
Southbound {t('protocolAdapter.table.actions.workspace.mappings')}
{t('protocolAdapter.table.actions.workspace.mappings.south')}
</MenuItem>
)}
</MenuGroup>
<MenuItem
data-testid="adapter-action-workspace"
onClick={() => onViewWorkspace?.(id, type as string, WorkspaceAdapterCommand.VIEW)}
// icon={<WorkspaceIcon />}
icon={<WorkspaceIcon />}
>
{t('protocolAdapter.table.actions.workspace.view')}
</MenuItem>
Expand Down

0 comments on commit 3d3058e

Please sign in to comment.