Suggest disabling JSON Index if catalog.json is loading slowly. #2412

This commit is contained in:
ccd0 2019-08-22 15:09:19 -07:00
parent e77fc9d8f9
commit f26eb03888

View File

@ -583,10 +583,13 @@ Index =
if Conf['Index Refresh Notifications'] if Conf['Index Refresh Notifications']
# Optional notification for manual refreshes # Optional notification for manual refreshes
Index.notice or= new Notice 'info', 'Refreshing index...' Index.notice or= new Notice 'info', 'Refreshing index...'
Index.nTimeout or= setTimeout ->
Index.notice?.el.lastElementChild.textContent += ' (disable JSON Index if this takes too long)'
, 3 * $.SECOND
else else
# Also display notice if Index Refresh is taking too long # Also display notice if Index Refresh is taking too long
Index.nTimeout or= setTimeout -> Index.nTimeout or= setTimeout ->
Index.notice or= new Notice 'info', 'Refreshing index...' Index.notice or= new Notice 'info', 'Refreshing index... (disable JSON Index if this takes too long)'
, 3 * $.SECOND , 3 * $.SECOND
# Hard refresh in case of incomplete page load. # Hard refresh in case of incomplete page load.