mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 15:25:01 -04:00
[#181] add breakpoint check in HTMLOperation so desktop doesn't get op description errors
This commit is contained in:
parent
d774a50f13
commit
997f26e4f8
2 changed files with 5 additions and 3 deletions
|
@ -866,7 +866,7 @@ class App {
|
||||||
*/
|
*/
|
||||||
updateVisibility( elm, isVisible ){
|
updateVisibility( elm, isVisible ){
|
||||||
isVisible ? elm.classList.remove("hidden") : elm.classList.add("hidden");
|
isVisible ? elm.classList.remove("hidden") : elm.classList.add("hidden");
|
||||||
}
|
}h
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set desktop UI ( on init and on window resize events )
|
* 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
|
* Be mindful to update these fixed numbers accordingly in the stylesheets
|
||||||
* ( themes/_structure ) if you make changes to those elements' height.
|
* ( themes/_structure ) if you make changes to those elements' height.
|
||||||
*/
|
*/
|
||||||
assignAvailableHeight( isMobile ){
|
assignAvailableHeight(){
|
||||||
const bannerHeight = 40;
|
const bannerHeight = 40;
|
||||||
const controlsHeight = 50;
|
const controlsHeight = 50;
|
||||||
const operationsHeight = 80;
|
const operationsHeight = 80;
|
||||||
|
|
|
@ -71,9 +71,11 @@ class HTMLOperation {
|
||||||
const favourites = JSON.parse(localStorage.favourites);
|
const favourites = JSON.parse(localStorage.favourites);
|
||||||
const isFavourite = favourites.includes(this.name);
|
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"}
|
${isFavourite ? "star" : "star_outline"}
|
||||||
</i>`
|
</i>`
|
||||||
|
}
|
||||||
|
|
||||||
html += "</li>";
|
html += "</li>";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue