如何在Shiningmanager中的auth_ui中添加不活动跟踪器?

问题描述

我想知道如何将这段代码中的非活动功能添加到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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...