From caee86d316c889daa35629964cee92cbe2a8a67a Mon Sep 17 00:00:00 2001 From: maxkadushkin Date: Wed, 2 Oct 2024 14:12:18 +0300 Subject: [PATCH] [home] added default icon for items in the templates list --- common/loginpage/res/img/common-svg/template-item.svg | 3 +++ common/loginpage/src/paneltemplates.js | 4 +++- common/loginpage/src/styles.less | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 common/loginpage/res/img/common-svg/template-item.svg diff --git a/common/loginpage/res/img/common-svg/template-item.svg b/common/loginpage/res/img/common-svg/template-item.svg new file mode 100644 index 000000000..e6ca35933 --- /dev/null +++ b/common/loginpage/res/img/common-svg/template-item.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/common/loginpage/src/paneltemplates.js b/common/loginpage/src/paneltemplates.js index 644381bd9..941c68fe4 100644 --- a/common/loginpage/src/paneltemplates.js +++ b/common/loginpage/src/paneltemplates.js @@ -110,9 +110,11 @@ utils.fn.extend(ViewTemplates.prototype, { listitemtemplate: function(info) { + const icon_el = !info.icon ? ``: + `` return `
- + ${icon_el}
${info.name}
`; diff --git a/common/loginpage/src/styles.less b/common/loginpage/src/styles.less index 8cb82e4bd..08461a3fd 100644 --- a/common/loginpage/src/styles.less +++ b/common/loginpage/src/styles.less @@ -1350,6 +1350,11 @@ li.menu-item { img { width: 140px; } + svg { + width: 140px; + height: 120px; + fill: @highlight-button-pressed; + } } &:hover {