[#181] add breakpoint check in HTMLOperation so desktop doesn't get op description errors

This commit is contained in:
Robin Scholtes 2023-05-10 21:22:38 +12:00
parent d774a50f13
commit 997f26e4f8
2 changed files with 5 additions and 3 deletions

View file

@ -866,7 +866,7 @@ class App {
*/
updateVisibility( elm, isVisible ){
isVisible ? elm.classList.remove("hidden") : elm.classList.add("hidden");
}
}h
/**
* Set desktop UI ( on init and on window resize events )
@ -901,7 +901,7 @@ class App {
* Be mindful to update these fixed numbers accordingly in the stylesheets
* ( themes/_structure ) if you make changes to those elements' height.
*/
assignAvailableHeight( isMobile ){
assignAvailableHeight(){
const bannerHeight = 40;
const controlsHeight = 50;
const operationsHeight = 80;

View file

@ -71,9 +71,11 @@ class HTMLOperation {
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" : ""}'>
if ( window.innerWidth < this.app.breakpoint ){
html += `<i title="${this.name}" class='material-icons icon-add-favourite star-icon op-icon ${isFavourite ? "fav-op" : ""}'>
${isFavourite ? "star" : "star_outline"}
</i>`
}
html += "</li>";