inst/shiny_old/global.R

inactivity <- "function idleTimer() {
var t = setTimeout(logout, 120000);
window.onmousemove = resetTimer; // catches mouse movements
window.onmousedown = resetTimer; // catches mouse movements
window.onclick = resetTimer;     // catches mouse clicks
window.onscroll = resetTimer;    // catches scrolling
window.onkeypress = resetTimer;  //catches keyboard actions

function logout() {
window.close();  //close the window
}

function resetTimer() {
clearTimeout(t);
t = setTimeout(logout, 120000);  // time is in milliseconds (1000 is 1 second)
}
}
idleTimer();"


# data.frame with credentials info
credentials <- data.frame(
  user = c("bscott", "mwoodward", "cmarang", "kpatwari"),
  password = c("bscott", "mwoodward", "cmarang", "kpatwari"),
  comment = c("logged in as bscott", "logged in as mwoodward", "logged in as cmarang", "logged in as kpatwari"),
  stringsAsFactors = FALSE
)

#authorize dropbox
drop_auth(rdstoken = "biophysr_dropbox_token.rds")
#drop_auth(rdstoken = "inst/shiny/biophysr_dropbox_token.rds")
brentscott93/biophysr documentation built on Sept. 14, 2021, 2:35 a.m.