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>
|
2021-07-27 12:36:10 +02:00
|
|
|
<header v-if="this.$route.path.includes('/s/')">
|
2021-09-19 15:56:48 +02:00
|
|
|
<Navbar />
|
2021-07-27 12:36:10 +02:00
|
|
|
</header>
|
|
|
|
<router-view />
|
2021-09-19 11:21:23 +02:00
|
|
|
<Footer />
|
2021-06-25 19:28:41 +02:00
|
|
|
</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
|
|
|
|
2021-06-25 19:28:41 +02:00
|
|
|
export default {
|
2021-07-27 12:36:10 +02:00
|
|
|
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
|
|
|
},
|
2021-06-25 19:28:41 +02:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
showMobileNavbar: false,
|
2021-07-27 12:36:10 +02:00
|
|
|
memberId: null,
|
|
|
|
searchText: "",
|
2021-06-25 19:28:41 +02:00
|
|
|
};
|
|
|
|
},
|
2021-07-27 12:36:10 +02:00
|
|
|
created() {
|
|
|
|
this.memberId = localStorage.getItem("user_id");
|
2021-06-25 19:28:41 +02:00
|
|
|
},
|
2021-09-13 18:40:50 +02:00
|
|
|
updated() {
|
|
|
|
this.memberId = localStorage.getItem("user_id");
|
|
|
|
},
|
2021-06-25 19:28:41 +02:00
|
|
|
methods: {
|
2021-07-27 12:36:10 +02:00
|
|
|
logout() {
|
2021-06-25 19:28:41 +02:00
|
|
|
localStorage.clear();
|
|
|
|
this.$router.push({ path: "/" });
|
2021-07-27 12:36:10 +02:00
|
|
|
},
|
|
|
|
searchRedirect() {
|
|
|
|
this.$router.push({ path: `/s/search?text`, query: { query: this.searchText } } );
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2021-07-28 21:52:12 +02:00
|
|
|
</script>
|