fribbels / Fribbels-Epic-7-Optimizer

A gear optimizer for Epic Seven
494 stars 104 forks source link

Fix in storage locator, add storage icon too #206

Closed jmferreirab closed 10 months ago

jmferreirab commented 10 months ago

TLDR: QoL update to identify if item is in storage.

Breakdown

In assets.js, a new function getStorage has been added to return the path of the storage image based on the current theme.

In htmlGenerator.js, the storage function has been added. It will return an empty string if item.storage is undefined, otherwise, it will render the storage icon.

In locator.js, the logic for displaying tooltips has been updated. If an item is in storage, the tooltip will now properly display “Item in storage”. The old logic would always assume that the item was not in storage even after it confirming it was.

Personally, it's nicer to see if its in storage with a conditional icon than to click the locator icon. Doing so also saves having to do an additional call to the locator endpoint backend for information that we already had when building the html.

How it looks:

image

image

jmferreirab commented 10 months ago

It seems there is a minor visual issue when too many icons stack due to the fixed width = 180px in .gear-preview-row.

Not setting width seems to give the best results, but setting width = 215px seems also acceptable if we want all gear previews with the same width.

https://github.com/fribbels/Fribbels-Epic-7-Optimizer/blob/8209cd1832acabb5081ca5490b08f571517d504c/app/css/style.css#L292-L300