parent
e4f5a810a4
commit
df3621d086
@ -15,6 +15,7 @@
|
||||
<form class="flex flex-col pt-3 md:pt-8" onsubmit="event.preventDefault();" on:submit={()=>
|
||||
{
|
||||
console.log(token);
|
||||
apikey.set(token)
|
||||
}}>
|
||||
<div class="flex flex-col pt-4">
|
||||
<label for="token" class="text-lg">Client Token</label>
|
||||
@ -75,6 +76,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
import {apikey} from './store.js';
|
||||
let token;
|
||||
$: isTokenValid=token?.length===44&& token.split(".")[0].length===7 &&isUUID(token.split(".")[1]);
|
||||
function isUUID ( uuid ) {
|
||||
|
3
app/src/store.js
Normal file
3
app/src/store.js
Normal file
@ -0,0 +1,3 @@
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const apikey = writable('');
|
Loading…
x
Reference in New Issue
Block a user