feat: don't render legend

This commit is contained in:
Shivam Mishra 2020-06-29 19:50:50 +05:30
parent f4ac04664a
commit 3844b2ce8f
2 changed files with 19 additions and 18 deletions

View file

@ -358,25 +358,25 @@ class DesktopPage {
this.sections["cards"] = cards;
const legend = [
{
color: "blue",
description: __("Important")
},
{
color: "orange",
description: __("No Records Created")
}
].map(item => {
return `<div class="legend-item small text-muted justify-flex-start">
<span class="indicator ${item.color}"></span>
<span class="link-content ellipsis" draggable="false">${item.description}</span>
</div>`;
});
// const legend = [
// {
// color: "blue",
// description: __("Important")
// },
// {
// color: "yellow",
// description: __("No Records Created")
// }
// ].map(item => {
// return `<div class="legend-item text-muted justify-flex-start">
// <span class="indicator-pill no-margin ${item.color}"></span>
// <span class="link-content ellipsis" draggable="false">${item.description}</span>
// </div>`;
// });
$(`<div class="legend">
${legend.join("\n")}
</div>`).insertAfter(cards.body);
// $(`<div class="legend">
// ${legend.join("\n")}
// </div>`).insertAfter(cards.body);
}
}

View file

@ -3,6 +3,7 @@ import { generate_route } from "./utils";
export default class LinksWidget extends Widget {
constructor(opts) {
opts.icon = 'calendar';
super(opts);
}