nuxt-community / universal-storage-module

Universal Storage Utilities for Nuxt 2
MIT License
276 stars 15 forks source link

Add tabSync option #79

Open xtoolkit opened 4 years ago

xtoolkit commented 4 years ago

hi i add tab sync option with storage event

how to use?

  1. initial your key data (like with syncUniversal method).
  2. next enable track your key with enableTabTrack method.
  3. you can disable track key with disableTabTrack
  4. now your key sync in all tabs in your browser

example:

this.keyname = 'appAuthorize';

// initial data
this.$storage.syncUniversal(this.keyname , {
    login: false,
    token: '',
    ...
);

// enable key track
this.$storage.enableTabTrack(this.keyname );

ezgif com-video-to-gif

xtoolkit commented 4 years ago

hello!?!

SebastianMieszczanczyk commented 3 years ago

@pi0 could you check it please? It is a nice feature which I need