diff --git a/public/js/workers/auth_worker.js b/public/js/workers/auth_worker.js new file mode 100644 index 0000000..76f7231 --- /dev/null +++ b/public/js/workers/auth_worker.js @@ -0,0 +1,16 @@ +self.onmessage = function (event) { + console.log(event.data); + const action = event.data.action; + switch(action) { + case 'save': + token = event.data.token; + break; + case 'load': + console.log(token); + break; + default: + console.error('Invalid action'); + return; + } + self.postMessage(true); +} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 17b9deb..4347c0b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,7 +10,7 @@ import AuthModal from './components/auth/AuthModal.vue';