feat: log out button should work?
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
162ca6833f
commit
fc266ffcc3
1 changed files with 6 additions and 11 deletions
|
@ -6,17 +6,13 @@
|
||||||
<ul>
|
<ul>
|
||||||
<template v-for="category in categories" :key="category.display_name">
|
<template v-for="category in categories" :key="category.display_name">
|
||||||
<h2>{{ category.display_name }}</h2>
|
<h2>{{ category.display_name }}</h2>
|
||||||
<li
|
<li v-for="page in category.pages" :key="page.display_name" @click="selectCategory(category, page)"
|
||||||
v-for="page in category.pages"
|
:class="{ 'sidebar-focus': selectedPage === page.display_name }">
|
||||||
:key="page.display_name"
|
|
||||||
@click="selectCategory(category, page)"
|
|
||||||
:class="{ 'sidebar-focus': selectedPage === page.display_name }"
|
|
||||||
>
|
|
||||||
{{ page.display_name }}
|
{{ page.display_name }}
|
||||||
</li>
|
</li>
|
||||||
<span class="spacer"></span>
|
<span class="spacer"></span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<ButtonScary text="Log Out" :callback=logout></ButtonScary>
|
<ButtonScary text="Log Out" :callback=logout></ButtonScary>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,6 +28,8 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import ButtonScary from '~/components/buttons/ButtonScary.vue';
|
import ButtonScary from '~/components/buttons/ButtonScary.vue';
|
||||||
|
|
||||||
|
const { logout } = useAuth()
|
||||||
|
|
||||||
interface Page {
|
interface Page {
|
||||||
display_name: string;
|
display_name: string;
|
||||||
page_data: any; // is actually Component but TS is yelling at me :(
|
page_data: any; // is actually Component but TS is yelling at me :(
|
||||||
|
@ -84,9 +82,6 @@ const selectCategory = (_category: Category, page: Page) => {
|
||||||
console.log(`switching to ${page.display_name}`)
|
console.log(`switching to ${page.display_name}`)
|
||||||
};
|
};
|
||||||
|
|
||||||
function logout() {
|
|
||||||
alert("hi")
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -109,7 +104,7 @@ function logout() {
|
||||||
color: white;
|
color: white;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue