ki-frontend/src/App.vue

48 lines
930 B
Vue
Raw Normal View History

2021-09-19 12:55:33 +02:00
<!--
SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
SPDX-License-Identifier: AGPL-3.0-or-later
-->
2021-05-31 16:14:28 +02:00
<template>
<header v-if="this.$route.path.includes('/s/')">
2021-09-19 15:56:48 +02:00
<Navbar />
</header>
<router-view />
2021-09-19 11:21:23 +02:00
<Footer />
</template>
<script>
2021-09-19 11:21:23 +02:00
import Footer from '@/views/partials/Footer.vue'
2021-09-19 15:56:48 +02:00
import Navbar from '@/views/partials/Navbar.vue'
2021-09-19 11:21:23 +02:00
export default {
name: "App",
2021-09-19 11:21:23 +02:00
components: {
2021-09-19 15:56:48 +02:00
Footer,
Navbar,
2021-09-19 11:21:23 +02:00
},
data() {
return {
showMobileNavbar: false,
memberId: null,
searchText: "",
};
},
created() {
this.memberId = localStorage.getItem("user_id");
},
2021-09-13 18:40:50 +02:00
updated() {
this.memberId = localStorage.getItem("user_id");
},
methods: {
logout() {
localStorage.clear();
this.$router.push({ path: "/" });
},
searchRedirect() {
this.$router.push({ path: `/s/search?text`, query: { query: this.searchText } } );
},
},
};
2021-07-28 21:52:12 +02:00
</script>