Web: Common: Fix not displaying icons at nav and header.

This commit is contained in:
TatianaLopaeva 2021-02-25 13:08:20 +03:00
parent 55a4a53bbc
commit 65949fa1a9
6 changed files with 21 additions and 8 deletions

View File

@ -138,7 +138,8 @@ class AuthStore {
link: "/settings", link: "/settings",
}, },
false, false,
"SettingsIcon" "SettingsIcon",
"static/images/settings.react.svg"
); );
return [settingsModuleWrapper]; return [settingsModuleWrapper];

View File

@ -50,34 +50,34 @@ class ModuleStore {
this.setModules(extendedModules); this.setModules(extendedModules);
}; };
toModuleWrapper = (item, noAction = true, iconName = null) => { toModuleWrapper = (item, noAction = true, iconName = null, iconUrl = null) => {
switch (item.id) { switch (item.id) {
case "6743007c-6f95-4d20-8c88-a8601ce5e76d": case "6743007c-6f95-4d20-8c88-a8601ce5e76d":
item.iconName = "CrmIcon"; item.iconName = "CrmIcon";
item.iconUrl = ""; item.iconUrl = "static/images/crm.react.svg";
item.imageUrl = "/images/crm.svg"; item.imageUrl = "/images/crm.svg";
item.helpUrl = "https://helpcenter.onlyoffice.com/userguides/crm.aspx"; item.helpUrl = "https://helpcenter.onlyoffice.com/userguides/crm.aspx";
break; break;
case "1e044602-43b5-4d79-82f3-fd6208a11960": case "1e044602-43b5-4d79-82f3-fd6208a11960":
item.iconName = "ProjectsIcon"; item.iconName = "ProjectsIcon";
item.iconUrl = ""; item.iconUrl = "static/images/projects.react.svg";
item.imageUrl = "/images/projects.svg"; item.imageUrl = "/images/projects.svg";
item.helpUrl = item.helpUrl =
"https://helpcenter.onlyoffice.com/userguides/projects.aspx"; "https://helpcenter.onlyoffice.com/userguides/projects.aspx";
break; break;
case "2A923037-8B2D-487b-9A22-5AC0918ACF3F": case "2A923037-8B2D-487b-9A22-5AC0918ACF3F":
item.iconName = "MailIcon"; item.iconName = "MailIcon";
item.iconUrl = ""; item.iconUrl = "static/images/mail.react.svg";
item.imageUrl = "/images/mail.svg"; item.imageUrl = "/images/mail.svg";
break; break;
case "32D24CB5-7ECE-4606-9C94-19216BA42086": case "32D24CB5-7ECE-4606-9C94-19216BA42086":
item.iconName = "CalendarCheckedIcon"; item.iconName = "CalendarCheckedIcon";
item.iconUrl = ""; item.iconUrl = "static/images/calendar.checked.react.svg";
item.imageUrl = "/images/calendar.svg"; item.imageUrl = "/images/calendar.svg";
break; break;
case "BF88953E-3C43-4850-A3FB-B1E43AD53A3E": case "BF88953E-3C43-4850-A3FB-B1E43AD53A3E":
item.iconName = "ChatIcon"; item.iconName = "ChatIcon";
item.iconUrl = ""; item.iconUrl = "static/images/chat.react.svg";
item.imageUrl = "/images/talk.svg"; item.imageUrl = "/images/talk.svg";
item.isolateMode = true; item.isolateMode = true;
break; break;
@ -106,7 +106,7 @@ class ModuleStore {
originUrl: item.originUrl, originUrl: item.originUrl,
helpUrl: item.helpUrl, helpUrl: item.helpUrl,
iconName: item.iconName || iconName || "static/images/people.react.svg", //TODO: Change to URL iconName: item.iconName || iconName || "static/images/people.react.svg", //TODO: Change to URL
iconUrl: item.iconUrl, iconUrl: item.iconUrl || iconUrl,
imageUrl: item.imageUrl, imageUrl: item.imageUrl,
notifications: 0, notifications: 0,
isolateMode: item.isolateMode, isolateMode: item.isolateMode,

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.8814 3H18.9943V1.02931C18.9943 0.460813 18.5335 0 17.9649 0H17.0301C16.4616 0 16.001 0.460813 16.001 1.02931V3H7.99588V1.02931C7.99588 0.460813 7.53507 0 6.96674 0H6.02914C5.46064 0 5 0.460813 5 1.02931V3H3.11844C1.95051 3 1 3.95017 1 5.11844V20.8965C1 22.0641 1.95051 23.0149 3.11844 23.0149H20.8816C22.0493 23.0149 23 22.0642 23 20.8965V5.11844C22.9998 3.95017 22.0491 3 20.8814 3ZM21 21.001H3.02614V8.00104H21V21.001ZM9.8844 17.6579C10.3376 18.114 11.0732 18.114 11.5266 17.6579L16.66 12.4939C16.8777 12.2748 17 11.9777 17 11.668C17 11.3583 16.8777 11.0611 16.66 10.8421C16.2066 10.386 15.4709 10.386 15.0178 10.8421L10.913 14.9713C10.7984 15.0862 10.6126 15.0862 10.4982 14.9713L8.98223 13.4466C8.52885 12.9905 7.7932 12.9905 7.34004 13.4466C6.88665 13.9024 6.88665 14.6425 7.34004 15.0984L9.8844 17.6579Z" fill="#7A95B0"/>
</svg>

After

Width:  |  Height:  |  Size: 983 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 3.3C6 2.58203 6.58203 2 7.3 2H21.7C22.418 2 23 2.58203 23 3.3V13.7C23 14.418 22.418 15 21.7 15H21V5.3C21 4.58203 20.418 4 19.7 4H6V3.3ZM17.7 6.0028C18.418 6.0028 19 6.58483 19 7.3028V18.7C19 19.418 18.418 20 17.7 20H5.67862C5.2802 20 4.90378 20.1827 4.65728 20.4957L3.32134 22.1922C2.55797 23.1616 1 22.6218 1 21.3879V7.3028C1 6.58483 1.58203 6.0028 2.3 6.0028H17.7Z" fill="#A3A9AE"/>
</svg>

After

Width:  |  Height:  |  Size: 540 B

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3719 3.25678C15.3719 5.05546 13.9289 6.51357 12.1488 6.51357C10.3687 6.51357 8.92562 5.05546 8.92562 3.25678C8.92562 1.45811 10.3687 0 12.1488 0C13.9289 0 15.3719 1.45811 15.3719 3.25678ZM6.07558 3.82952C6.18787 5.06074 6.65857 6.18705 7.38131 7.10098C5.83057 8.33665 4.77654 10.1805 4.57158 12.2764C4.1378 12.1775 3.6865 12.1253 3.22314 12.1253C2.49652 12.1253 1.79958 12.2537 1.15332 12.4892C1.32664 8.86139 3.24354 5.6958 6.07558 3.82952ZM19.4284 12.2764C19.2314 10.2617 18.2499 8.47996 16.7968 7.24738C17.5485 6.35435 18.0526 5.24194 18.2018 4.01852C20.8811 5.90525 22.6791 8.98112 22.8467 12.4892C22.2004 12.2537 21.5035 12.1253 20.7769 12.1253C20.3135 12.1253 19.8622 12.1775 19.4284 12.2764ZM7.26408 22.9043C8.69536 23.6063 10.3022 24 12 24C13.6978 24 15.3046 23.6063 16.7359 22.9043C15.8756 22.1348 15.2319 21.1235 14.9092 19.9757C14.0152 20.3584 13.032 20.57 12 20.57C10.968 20.57 9.98483 20.3584 9.0908 19.9757C8.76809 21.1235 8.12444 22.1348 7.26408 22.9043ZM6.44628 18.2881C6.44628 20.0868 5.00323 21.5449 3.22314 21.5449C1.44305 21.5449 0 20.0868 0 18.2881C0 16.4894 1.44305 15.0313 3.22314 15.0313C5.00323 15.0313 6.44628 16.4894 6.44628 18.2881ZM20.7769 21.5449C22.5569 21.5449 24 20.0868 24 18.2881C24 16.4894 22.5569 15.0313 20.7769 15.0313C18.9968 15.0313 17.5537 16.4894 17.5537 18.2881C17.5537 20.0868 18.9968 21.5449 20.7769 21.5449Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M22 24V20.0679C22 20.0679 15.3675 6.10521 15.2064 5.83268C14.681 4.94549 14.0379 4.34813 13.1038 4.07748V1.12301C13.1038 0.502931 12.6296 0 11.9934 0C11.3572 0 10.883 0.502931 10.883 1.12301V4.09161C10.5928 4.09161 10.0717 4.28097 9.81625 4.42488C7.92836 5.48679 7.32941 8.13156 8.41893 9.96958C8.59435 10.2216 9.62992 11.4669 9.62992 11.4669L18.4655 21.4913L22 24ZM6.91661 9.25358L2 20.0011V24L5.03377 21.474L10.9207 15.0692C10.9207 15.0692 7.50801 10.8696 7.40958 10.7045C7.23498 10.4091 6.91661 9.25358 6.91661 9.25358ZM13.5479 7.85304C13.5479 6.94909 12.8021 6.21645 11.8824 6.21645C10.9626 6.21645 10.2168 6.94863 10.2168 7.85258C10.2168 8.75653 10.9626 9.48917 11.8824 9.48917C12.8021 9.48917 13.5479 8.75699 13.5479 7.85304Z" fill="#7A95B0"/>
</svg>

After

Width:  |  Height:  |  Size: 902 B