2022-03-21 20:34:34 +00:00
|
|
|
<template>
|
|
|
|
<v-card
|
|
|
|
style="height: 4rem !important; display: flex; box-shadow: none !important"
|
2022-03-21 21:32:59 +00:00
|
|
|
color="accent2"
|
2022-03-21 21:01:37 +00:00
|
|
|
class="topNav rounded-0 pa-3"
|
2022-03-21 20:34:34 +00:00
|
|
|
>
|
|
|
|
<h3 class="my-auto ml-4" v-text="page" v-show="!search" />
|
|
|
|
|
2022-03-21 21:32:59 +00:00
|
|
|
<v-btn icon v-if="search" class="mr-3 my-auto" @click="$emit('close-search')">
|
2022-03-21 20:34:34 +00:00
|
|
|
<v-icon>mdi-close</v-icon>
|
|
|
|
</v-btn>
|
|
|
|
|
|
|
|
<v-text-field
|
|
|
|
solo
|
|
|
|
dense
|
|
|
|
flat
|
|
|
|
label="Search"
|
|
|
|
v-model="text"
|
|
|
|
@input="$emit('text-changed', text)"
|
|
|
|
class="searchBar"
|
|
|
|
v-if="search"
|
|
|
|
v-on:keyup.enter="$emit('search-btn', text)"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<v-spacer v-if="!search" />
|
|
|
|
|
|
|
|
<v-btn
|
|
|
|
icon
|
|
|
|
tile
|
2022-03-21 21:01:37 +00:00
|
|
|
class="ml-3 my-auto fill-height"
|
2022-03-21 20:34:34 +00:00
|
|
|
style="border-radius: 0.25rem !important"
|
|
|
|
@click="$emit('search-btn', text)"
|
|
|
|
><v-icon>mdi-magnify</v-icon></v-btn
|
|
|
|
>
|
|
|
|
<v-btn
|
|
|
|
icon
|
|
|
|
tile
|
|
|
|
class="ml-4 mr-2 my-auto fill-height"
|
|
|
|
style="border-radius: 0.25rem !important"
|
|
|
|
v-show="!search"
|
|
|
|
to="/settings"
|
|
|
|
><v-icon>mdi-dots-vertical</v-icon></v-btn
|
|
|
|
>
|
|
|
|
</v-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: ["search", "page"],
|
|
|
|
events: ["searchBtn", "textChanged", "closeSearch"],
|
|
|
|
data: () => ({
|
|
|
|
text: "",
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.topNav {
|
|
|
|
position: fixed;
|
|
|
|
width: 100%;
|
|
|
|
top: 0;
|
|
|
|
z-index: 999;
|
|
|
|
/*border-radius: 0 0 1em 1em !important;*/
|
|
|
|
}
|
|
|
|
.topNavSearch {
|
|
|
|
margin-bottom: -10em;
|
|
|
|
margin-left: 2em;
|
|
|
|
/*transform: translateY(-2.5%);*/
|
|
|
|
}
|
|
|
|
.searchBar {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
.searchButton {
|
|
|
|
width: 100%;
|
|
|
|
justify-content: left !important;
|
|
|
|
}
|
|
|
|
</style>
|