Skip to content

Commit

Permalink
[home] added default icon for items in the templates list
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkadushkin committed Oct 2, 2024
1 parent 88e683c commit caee86d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions common/loginpage/res/img/common-svg/template-item.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion common/loginpage/src/paneltemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@

utils.fn.extend(ViewTemplates.prototype, {
listitemtemplate: function(info) {
const icon_el = !info.icon ? `<svg class='icon'><use xlink:href='#template-item'></use></svg>`:
`<img src="${info.icon}"></img>`
return `<div id="${info.uid}" class='item'>
<div class='icon'>
<img src="${info.icon}"></img>
${icon_el}
</div>
<span class='title'>${info.name}</span>
</div>`;
Expand Down
5 changes: 5 additions & 0 deletions common/loginpage/src/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,11 @@ li.menu-item {
img {
width: 140px;
}
svg {
width: 140px;
height: 120px;
fill: @highlight-button-pressed;
}
}

&:hover {
Expand Down

0 comments on commit caee86d

Please sign in to comment.