Skip to content

Commit

Permalink
BACKLOG-23216 Changed icon for area lists (#1319)
Browse files Browse the repository at this point in the history
  • Loading branch information
r3dm1ke authored Oct 10, 2024
1 parent fc7e562 commit 520c6cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@jahia/design-system-kit": "^1.1.8",
"@jahia/icons": "^1.1.2",
"@jahia/jahia-reporter": "^1.0.3",
"@jahia/moonstone": "^2.7.4",
"@jahia/moonstone": "^2.8.0",
"@jahia/react-material": "^3.0.5",
"@jahia/ui-extender": "^1.1.0",
"@material-ui/core": "^3.9.3",
Expand Down
8 changes: 7 additions & 1 deletion src/javascript/utils/NodeIcon.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Area,
File,
FileCode,
FileCompresed,
Expand Down Expand Up @@ -209,6 +210,10 @@ export const NodeIcon = ({node, ...props}) => {
return <File {...props}/>;
}

if (node?.mixinTypes?.find(m => m.name && m.name === 'jmix:isAreaList')) {
return <Area {...props}/>;
}

switch (node.primaryNodeType.name) {
case 'jnt:folder':
return <Folder {...props}/>;
Expand All @@ -230,7 +235,8 @@ NodeIcon.propTypes = {
path: PropTypes.string,
primaryNodeType: PropTypes.object,
content: PropTypes.object,
resourceChildren: PropTypes.object
resourceChildren: PropTypes.object,
mixinTypes: PropTypes.array
}).isRequired
};

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2557,10 +2557,10 @@
uuid "^8.3.1"
xml-js "^1.6.11"

"@jahia/moonstone@^2.7.4":
version "2.7.4"
resolved "https://npm.jahia.com/@jahia%2fmoonstone/-/moonstone-2.7.4.tgz#ec7f7bae2b076597bcfef7dd8d7ecb7e79f859c7"
integrity sha512-zfqSvBRaJM1jfkac5h7/Iqu1+OvdBE3quwI+hBj4cL8/vx5hXFatYRfp3SkReDMCIMZcmkAdqFQwN3g6jv6RfA==
"@jahia/moonstone@^2.8.0":
version "2.8.0"
resolved "https://npm.jahia.com/@jahia%2fmoonstone/-/moonstone-2.8.0.tgz#5e42b8ce60fb885322ee38dcc800117120b327a9"
integrity sha512-PdLZgFp+gxcbLHXHCX6VOpUy0G7nCLZqJEd+ax9Qd6ObcTKYP1nJoAbolqjFPR2JEitJrQV5Qxb/8AJeIjQj+Q==
dependencies:
"@babel/runtime" "^7.23.2"
"@jahia/scripts" "^1.3.3"
Expand Down

0 comments on commit 520c6cf

Please sign in to comment.