Front v2 #21

Merged
bytegrip merged 10 commits from front-v2 into master 2023-10-24 23:14:01 +00:00
Showing only changes of commit a583f4b765 - Show all commits

View File

@@ -63,12 +63,25 @@
<div id="profileSpace"> <div id="profileSpace">
<div id="profileInfo">Hello, {username}</div> <div id="profileInfo">Hello, {username}</div>
<button id="logout" on:click={() => { <div id="logout" role="button"
tabindex="0"
on:click={() => {
deleteCookie('access_token');
deleteCookie('refresh_token');
window.location.href = '/auth/login';
}}
on:keydown={e => {
if (e.key === 'Enter' || e.key === ' ') {
deleteCookie('access_token'); deleteCookie('access_token');
deleteCookie('refresh_token'); deleteCookie('refresh_token');
window.location.href = '/auth/login'; window.location.href = '/auth/login';
}}>Log out</button> }
}}
>
Log out
</div> </div>
</div>
</div> </div>
<style> <style>
@@ -117,6 +130,7 @@
#profileSpace { #profileSpace {
margin-bottom: 20px; margin-bottom: 20px;
display: flex; display: flex;
flex-direction: row;
justify-content: center; justify-content: center;
color:white; color:white;
font-weight: 900; font-weight: 900;