soixantecircuits/idle-vue

isIdle for All Tabs

Opened this issue · 5 comments

i am facing a problem while implementing in my whole project.
isIdle works fine when my project is opened in single tab but when i open my project on second tab and no one is working on that tab isIdle value gets true whereas it should be false as user is working on the other tab of the project
How may i make it possible that if user is working on one tab of a site isIdle state must be false for all other tabs as well.
i am getting state by following
import store from './store'
Vue.use(IdleVue, { store})

const vm = new Vue({
store,
computed: {
messageStr() {
return this.isAppIdle ? 'ZZZ' : 'Hello'
}
}
})
putting condition on
$store.state.idleVue.isIdle

Same issue - when using multi tabs. While I am active in a tab other idle tabs goes expired....

Same issue - when using multi tabs.

based on what I understand, SPA is handling tabs like a new app, but you could share information/computing by using workers.

Shared Workers

Hello,

What are you talking about exactly ? The lib only watch for non-activity on one tab. If you have multiple tabs open it means multiple app. You can share information between your app on multiple tabs with things like : https://engineering.wingify.com/across-tabs/live-demo.html or http://localsync.js.org/.