mirror of
https://github.com/mbirth/tcl_update_db.git
synced 2024-11-09 23:06:45 +00:00
Small improvements to OTA versions display in tooltip.
This commit is contained in:
parent
74d733b98c
commit
423631cc7a
@ -51,15 +51,25 @@ document.addEventListener 'DOMContentLoaded', (event) ->
|
|||||||
|
|
||||||
if vermeta['OTA'].length > 0
|
if vermeta['OTA'].length > 0
|
||||||
fromList = (v['fv'] for v in vermeta['OTA'])
|
fromList = (v['fv'] for v in vermeta['OTA'])
|
||||||
fromList = fromList.join ', '
|
fromList = fromList.sort().reverse()
|
||||||
otaInfo = "✔️ (from #{fromList})"
|
fromListText = fromList.join ', '
|
||||||
|
if fromList.length > 3
|
||||||
|
fromMore = fromList.length - 3
|
||||||
|
fromList = fromList[0..2]
|
||||||
|
fromListText = (fromList.join ', ') + " + #{fromMore} more"
|
||||||
|
otaInfo = "✔️ (from #{fromListText})"
|
||||||
else
|
else
|
||||||
otaInfo = "❌"
|
otaInfo = "❌"
|
||||||
|
|
||||||
if vermeta['OTA_FROM'].length > 0
|
if vermeta['OTA_FROM'].length > 0
|
||||||
toList = (v['tv'] for v in vermeta['OTA_FROM'])
|
toList = (v['tv'] for v in vermeta['OTA_FROM'])
|
||||||
toList = toList.join ', '
|
toList = toList.sort().reverse()
|
||||||
updateInfo = "<strong>OTA possible to #{toList}</strong>"
|
toListText = toList.join ', '
|
||||||
|
if toList.length > 3
|
||||||
|
toMore = toList.length - 3
|
||||||
|
toList = toList[0..2]
|
||||||
|
toListText = (toList.join ', ') + " + #{toMore} more"
|
||||||
|
updateInfo = "<strong>OTA possible to #{toListText}</strong>"
|
||||||
else
|
else
|
||||||
updateInfo = "No OTA to future version."
|
updateInfo = "No OTA to future version."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user