soixantecircuits / idle-vue

Vue component wrapper for idle-js
MIT License
125 stars 40 forks source link

Is idle vue supports foe multiple tabs ? #56

Open html-helpers opened 1 year ago

html-helpers commented 1 year ago

How to enable support for multiple tabs opened of the same app ?

Currently, plugin works fine for single tab.

ArnoldNicole commented 1 year ago

I did override the value of this.$store.state.idleVue.isIdle in a tab that document.hidden is true


computed: {
    AppIsIdle() {
      if (document.hidden) {
        return false;
      } else {
        return this.$store.state.idleVue.isIdle;
      }
    },
  }