Compare commits

..

No commits in common. "dfa0a6a7e8a033cb992b5c7e97b3f31162b11b48" and "9244e94dd766015214dd925e7183fcf478a6ea39" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
import ThemeToggle from './ThemeToggle.vue'
const props = defineProps(['modelValue'])
const emit = defineEmits(['update:modelValue'])
defineEmits(['update:modelValue'])
async function signout(ev) {
ev.preventDefault()
@ -16,7 +16,6 @@ async function signout(ev) {
}
let resp = await fetch(api_url, fetch_options)
console.log(resp)
emit('update:modelValue', '')
window.location.reload()
}
</script>
@ -42,10 +41,11 @@ async function signout(ev) {
<div class="offcanvas-body px-2">
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
<li v-if="modelValue.hasOwnProperty('username')" class="nav-item m-2">
<!--<li v-if="modelValue !== ''" class="nav-item mx-2 mt-2">-->
<li v-if="modelValue.hasOwnProperty('username')" class="nav-item mx-2 mt-2">
<button @click="signout" class="btn btn-outline-success">Sign out</button>
</li>
<li class="nav-item m-2">
<li class="nav-item mf-3 mt-1">
<div>
<ThemeToggle />
</div>

View File

@ -22,7 +22,7 @@ async function login(ev) {
let resp = await fetch(api_url, fetch_options)
if (resp.ok) {
emit('update:modelValue', await resp.json())
emit('update:modelValue', user.value)
window.location.hash = "/"
} else {
user.value = ''