Compare commits
No commits in common. "12f9ad6c066006ae624f718b7ca199383b3edae1" and "5f6f62a7e91a05d9c05a88f5467ec1e2026393bf" have entirely different histories.
12f9ad6c06
...
5f6f62a7e9
5 changed files with 654 additions and 807 deletions
1409
package-lock.json
generated
1409
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,16 +0,0 @@
|
||||||
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);
|
|
||||||
}
|
|
|
@ -10,7 +10,7 @@ import AuthModal from './components/auth/AuthModal.vue';
|
||||||
<template>
|
<template>
|
||||||
<!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
|
<!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
|
||||||
<!-- <HelloWorld msg="Hello Vue 3 + Vite" /> -->
|
<!-- <HelloWorld msg="Hello Vue 3 + Vite" /> -->
|
||||||
<div class="flex h-screen bg-white dark:bg-slate-800">
|
<div class="flex">
|
||||||
<Sidebar class="flex-none" />
|
<Sidebar class="flex-none" />
|
||||||
<div class="flex-1 m-10">
|
<div class="flex-1 m-10">
|
||||||
<Content />
|
<Content />
|
||||||
|
|
|
@ -10,16 +10,16 @@ const props = defineProps({
|
||||||
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-xl overflow-hidden bg-white dark:bg-slate-700 mx-auto max-w-md shadow-md hover:shadow-xl transition-shadow md:max-w-2">
|
<div class="rounded-xl overflow-hidden bg-white mx-auto max-w-md shadow-md hover:shadow-xl transition-shadow md:max-w-2">
|
||||||
<div class="md:flex">
|
<div class="md:flex">
|
||||||
<div class="md:shrink-0">
|
<div class="md:shrink-0">
|
||||||
<img class="h-48 w-full object-cover md:h-full md:w-48" :src="url">
|
<img class="h-48 w-full object-cover md:h-full md:w-48" :src="url">
|
||||||
</div>
|
</div>
|
||||||
<div class="p-8">
|
<div class="p-8">
|
||||||
<a class="block mt-1 text-lg leading-tight dark:text-white font-medium text-black hover:underline tracking-wide">
|
<a class="block mt-1 text-lg leading-tight font-medium text-black hover:underline tracking-wide">
|
||||||
{{title}}
|
{{title}}
|
||||||
</a>
|
</a>
|
||||||
<p class="mt-2 text-slate-500 dark:text-slate-300">
|
<p class="mt-2 text-slate-500">
|
||||||
{{description}}
|
{{description}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,27 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import AuthButton from './AuthButton.vue';
|
import AuthButton from './AuthButton.vue';
|
||||||
const id = 'authModal';
|
const id = 'authModal';
|
||||||
|
|
||||||
const worker = new Worker('/js/workers/auth_worker.js');
|
|
||||||
function saveTokenToWorker() {
|
|
||||||
const token = document.getElementById('tokenTextArea').value;
|
|
||||||
if (token.length <= 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
worker.postMessage({
|
|
||||||
action: 'save',
|
|
||||||
token
|
|
||||||
});
|
|
||||||
worker.onmessage = function (e) {
|
|
||||||
console.log(e.data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkTokenContent() {
|
|
||||||
worker.postMessage({
|
|
||||||
action: 'load'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="modal fade fixed top-0 left-0 hidden w-full h-full outline-none overflow-x-hidden overflow-y-auto"
|
<div class="modal fade fixed top-0 left-0 hidden w-full h-full outline-none overflow-x-hidden overflow-y-auto"
|
||||||
|
@ -49,21 +28,16 @@ function checkTokenContent() {
|
||||||
class="form-control block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none"
|
class="form-control block w-full px-3 py-1.5 text-base font-normal text-gray-700 bg-white bg-clip-padding border border-solid border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none"
|
||||||
id="tokenTextArea"
|
id="tokenTextArea"
|
||||||
rows="3"
|
rows="3"
|
||||||
type="password"
|
|
||||||
placeholder="Insert token here"></textarea>
|
placeholder="Insert token here"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="modal-footer flex flex-shrink-0 flex-wrap items-center justify-end p-4 border-t border-gray-200 rounded-b-md">
|
class="modal-footer flex flex-shrink-0 flex-wrap items-center justify-end p-4 border-t border-gray-200 rounded-b-md">
|
||||||
<button type="button"
|
|
||||||
class="inline-block px-6 py-2.5 bg-slate-500 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-slate-700 hover:shadow-lg focus:bg-purple-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-slate-800 active:shadow-lg transition duration-150 ease-in-out"
|
|
||||||
@click="checkTokenContent">Check token</button>
|
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="inline-block px-6 py-2.5 bg-slate-500 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-slate-700 hover:shadow-lg focus:bg-purple-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-slate-800 active:shadow-lg transition duration-150 ease-in-out"
|
class="inline-block px-6 py-2.5 bg-slate-500 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-slate-700 hover:shadow-lg focus:bg-purple-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-slate-800 active:shadow-lg transition duration-150 ease-in-out"
|
||||||
data-bs-dismiss="modal">Close</button>
|
data-bs-dismiss="modal">Close</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
data-bs-dismiss="modal"
|
data-bs-dismiss="modal"
|
||||||
@click="saveTokenToWorker"
|
|
||||||
class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out ml-1">Confirm</button>
|
class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out ml-1">Confirm</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue