This commit is contained in:
Robin Scholtes 2023-05-09 22:14:36 +12:00
parent f1257ea356
commit 5362f9fda4
9 changed files with 48 additions and 23 deletions

View file

@ -68,6 +68,13 @@ class HTMLOperation {
html += "<i class='material-icons check-icon op-icon'>check</i>";
}
const favourites = JSON.parse(localStorage.favourites);
const isFavourite = favourites.includes(this.name);
html += `<i title="${this.name}" class='material-icons icon-add-favourite mobile-only star-icon op-icon ${isFavourite ? "fav-op" : ""}'>
${isFavourite ? "star" : "star_outline"}
</i>`
html += "</li>";
return html;