allow configuring cycle interval

axis-lock
Moe 2023-05-03 12:06:15 -07:00
parent 5f639f7fba
commit 331c4011d0
3 changed files with 8 additions and 3 deletions

View File

@ -4893,6 +4893,11 @@ module.exports = function(s,config,lang){
"placeholder": "4",
attribute:'localStorage="cycleLiveMonitorHeight"',
},
{
"field": lang['Cycle Interval'],
"placeholder": "30000",
attribute:'localStorage="cycleLiveTimerAmount"',
},
]
},
"Preferences": {

View File

@ -41,6 +41,7 @@
"Failed to Edit Account": "Failed to Edit Account",
"How to Connect": "How to Connect",
"Cycle": "Cycle",
"Cycle Interval": "Cycle Interval",
"Cycle Monitor Height": "Cycle Monitor Height",
"Number of Cycle Monitors": "Number of Cycle Monitors",
"Cycle Monitors": "Cycle Monitors",

View File

@ -33,12 +33,11 @@ function displayCycleSetOnLiveGrid(monitorsList){
}
// rotator
function stopCycleLive(){
console.error('STOP!!!!!',new Error)
clearTimeout(liveGridCycleTimer)
liveGridCycleTimer = null
}
function resumeCycleLive(fullList,partForCycle,numberOfMonitors){
console.error('RESUME!!!!!',new Error)
const cycleLiveTimerAmount = parseInt(theLocalStorage.cycleLiveTimerAmount) || 30000
function next(){
var afterMonitorId = partForCycle.slice(-1)[0].mid;
partForCycle = getPartForCycleLive(fullList,afterMonitorId,numberOfMonitors)
@ -58,7 +57,7 @@ function resumeCycleLive(fullList,partForCycle,numberOfMonitors){
clearTimeout(liveGridCycleTimer)
liveGridCycleTimer = setTimeout(function(){
next()
},30000)
},cycleLiveTimerAmount)
}
reset()
cycleLiveMoveNext = next