@@ -14,6 +14,7 @@
 | 
			
		||||
                      href="https://docs.lauf-fuer-kaya.de/">See our configuration guide.</a></p>
 | 
			
		||||
              <form class="flex flex-col pt-3 md:pt-8" onsubmit="event.preventDefault();" on:submit={()=>
 | 
			
		||||
              {
 | 
			
		||||
                  // TODO: validate token with backend api
 | 
			
		||||
                  console.log(token);
 | 
			
		||||
                  apikey.set(token)
 | 
			
		||||
              }}>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,7 @@
 | 
			
		||||
import { writable } from 'svelte/store';
 | 
			
		||||
 | 
			
		||||
export const apikey = writable('');
 | 
			
		||||
const stored_apikey = localStorage.getItem('apikey');
 | 
			
		||||
export const apikey = writable(stored_apikey);
 | 
			
		||||
apikey.subscribe((value) => {
 | 
			
		||||
	localStorage.setItem('apikey', value);
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user