idle-vue icon indicating copy to clipboard operation
idle-vue copied to clipboard

Vue 3 support

Open LauBeck opened this issue 4 years ago • 9 comments

First of all.. Thank you for your nice work with handling of idle state.

We've encountered warnings using idle-vue with Vue 3 - regarding new naming conventions in Vue 3. Where the destroyed() functionality is now called unmounted.

Could this be changed in at new version bundle, to support Vue 3 ?

LauBeck avatar Apr 06 '21 14:04 LauBeck

+1 Could this be changed in at new version bundle, to support Vue 3 ?

Hoviadin avatar Apr 07 '21 14:04 Hoviadin

@afonso @gabrielstuff @emmanuelgeoffray

Hoviadin avatar Apr 07 '21 17:04 Hoviadin

@LauBeck were you able to make the plugin compatible with Vue 3 or have you maybe found any other good alternatives?

MoeBensu avatar Jul 08 '21 14:07 MoeBensu

@MoeNeuron idle-vue just wraps idle-js, you can use idle-js directly in Vue 3 without any issues.

brent-williams avatar Jul 27 '21 22:07 brent-williams

Upcoming?

ux-engineer avatar Sep 29 '21 07:09 ux-engineer

Upcoming?

ghost avatar Feb 25 '22 04:02 ghost

https://github.com/soixantecircuits/idle-vue/pull/59

pratik227 avatar Dec 07 '22 06:12 pratik227

@pratik227 how can this be implemented into Nuxt 3?

liamcharmer avatar Feb 22 '23 16:02 liamcharmer

@liamcharmer

I think you need to create one plugin like idle-vule.js file where you need to register the idle-vue and then add that in nuxt.config.ts.

//idle.js
import IdleVue from "idle-vue";
import emitter from "tiny-emitter/instance";

export default function ({ app }) {
  app.use(IdleVue, {
    eventEmitter: {
      $on: (...args) => emitter.on(...args),
      $once: (...args) => emitter.once(...args),
      $off: (...args) => emitter.off(...args),
      $emit: (...args) => emitter.emit(...args)
    },
    idleTime: 1000
  });
}

// nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'idle.js',
  ],
})

Something like this Not familiar with Nuxt too much but you can try this.

pratik227 avatar Feb 24 '23 10:02 pratik227