问题描述
我想知道如何将这段代码中的非活动功能添加到auth_ui功能中?我的登录页面有一个自定义布局,但是要添加它具有的超时功能。不活动会进入auth_ui参数的什么地方?
这是无效代码:
inactivity <- "function idleTimer() {
var t = setTimeout(logout,60000);
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,60000); // time is in milliseconds (1000 is 1 second)
}
}
idleTimer();"
这是auth_ui代码:
ui <- fluidPage(
# authentication module
auth_ui(
id = "auth",# add image
tags_top =
tags$div(
tags$h4("Welcom to ",style = "align:center"),tags$img(
src = "iphaage.png",width = "50%",height = "50%",align = "center"
)
),# add information on bottom
tags_bottom = tags$div(
tags$p(
"For any questions,please contact ",tags$a(
href = "mailto: user@email.com?Subject=iPHAAGE_Application",target = "_top","user@email.com"
)
)
)
),# Classic app
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)