soixantecircuits/idle-vue

Difficulty dynamically setting idleTime

Opened this issue · 3 comments

Hi!

I'm trying to set and get the idle time from a propety we've stored in our own vuex store and we've run in to a road block.

I want to try something like this, but whenever I try, the idleTime property is not available in vuex, where is this stored?

Is it possible to change the idleTime property during runtime or is it only during mounting the App component that it can be 'hot-reloaded'?

//IdleTime setup:
import Vue from 'vue';
import IdleVue from 'idle-vue';
import store from '@/store';

Vue.use(IdleVue, {
    // idleTime: 15000, // unable to change when un-commented
    store
});

//Store - different file
const state = {
    idleVue: {
        idleTime: 5000,
        isIdle: true
    }
};

export default {
    state
};```

any comment on this devs? I'm trying to do the same to no avail :(

Same problem here

I want to do the same - is there a workaround for this?