2021-08-02 19:06:41 +02:00
|
|
|
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
|
2021-05-31 16:14:28 +02:00
|
|
|
<template>
|
2021-08-02 18:24:27 +02:00
|
|
|
<div class="alert alert-success text-center mb-0" role="alert">
|
2021-08-15 20:35:15 +02:00
|
|
|
Willkommen beim Alpha-Test!
|
2021-09-15 21:02:51 +02:00
|
|
|
<a target="_blank" href="https://git.wtf-eg.de/kompetenzinventar/ki-frontend/issues/new">Problem gefunden? Bitte hier ein Issue anlegen.</a>
|
2021-08-02 18:24:27 +02:00
|
|
|
</div>
|
2021-07-27 12:36:10 +02:00
|
|
|
<header v-if="this.$route.path.includes('/s/')">
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<a class="navbar-brand" href="#">KI</a>
|
|
|
|
<button
|
|
|
|
@click="showMobileNavbar = !showMobileNavbar"
|
|
|
|
class="navbar-toggler"
|
|
|
|
type="button"
|
|
|
|
data-bs-toggle="collapse"
|
|
|
|
data-bs-target="#navbarSupportedContent"
|
|
|
|
aria-controls="navbarSupportedContent"
|
|
|
|
aria-expanded="false"
|
|
|
|
aria-label="Toggle navigation"
|
|
|
|
>
|
|
|
|
<span class="navbar-toggler-icon"></span>
|
2021-06-25 19:28:41 +02:00
|
|
|
</button>
|
2021-07-27 12:36:10 +02:00
|
|
|
<div
|
|
|
|
class="collapse navbar-collapse"
|
|
|
|
:class="{
|
|
|
|
show: showMobileNavbar,
|
|
|
|
}"
|
|
|
|
id="navbarSupportedContent"
|
|
|
|
>
|
|
|
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
class="nav-link"
|
|
|
|
:to="{ path: `/s/search` }"
|
|
|
|
active-class="active"
|
|
|
|
>Suche</router-link
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
class="nav-link"
|
|
|
|
:to="{ path: `/s/profile/${memberId}` }"
|
|
|
|
active-class="active"
|
|
|
|
>Mein Profil</router-link
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<router-link
|
|
|
|
class="nav-link"
|
|
|
|
:to="{ path: `/s/profile-edit` }"
|
|
|
|
active-class="active"
|
|
|
|
>Bearbeiten</router-link
|
|
|
|
>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<button class="btn btn-outline-danger" @click="logout()">
|
|
|
|
Logout
|
|
|
|
</button>
|
|
|
|
<a class="nav-link active" aria-current="page" href="#"></a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<form class="d-flex" @submit.prevent="searchRedirect()">
|
|
|
|
<input
|
|
|
|
class="form-control me-2"
|
|
|
|
v-model="searchText"
|
|
|
|
type="search"
|
2021-08-15 20:35:15 +02:00
|
|
|
placeholder="Profile durchsuchen"
|
2021-07-27 12:36:10 +02:00
|
|
|
aria-label="Search"
|
|
|
|
/>
|
|
|
|
<button
|
|
|
|
class="btn btn-outline-primary"
|
|
|
|
type="submit"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
src="/img/bootstrap-icons-1.5.0/search.svg"
|
|
|
|
alt="Suche Icon"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</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-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: {
|
|
|
|
Footer
|
|
|
|
},
|
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>
|