filebrowser/frontend/src/components/header/HeaderBar.vue

47 lines
840 B
Vue
Raw Normal View History

2021-02-25 18:37:07 +00:00
<template>
<header>
2021-03-21 11:51:58 +00:00
<action
class="menu-button"
icon="menu"
:label="$t('buttons.toggleSidebar')"
2023-07-23 04:12:26 +00:00
@action="toggleSidebar()"
2021-03-21 11:51:58 +00:00
/>
2021-02-25 18:37:07 +00:00
<slot />
<div id="dropdown" :class="{ active: this.$store.state.show === 'more' }">
<slot name="actions" />
</div>
</header>
</template>
<script>
2021-03-21 11:51:58 +00:00
import { logoURL } from "@/utils/constants";
import Action from "@/components/header/Action";
2021-02-25 18:37:07 +00:00
export default {
2021-03-21 11:51:58 +00:00
name: "header-bar",
props: ["showLogo", "showMenu"],
2021-02-25 18:37:07 +00:00
components: {
2021-03-21 11:51:58 +00:00
Action,
2021-02-25 18:37:07 +00:00
},
data: function () {
return {
2021-03-21 11:51:58 +00:00
logoURL,
};
2021-02-25 18:37:07 +00:00
},
methods: {
2023-07-23 04:12:26 +00:00
toggleSidebar() {
if ( this.$store.state.show == "sidebar" ) {
this.$store.commit("closeHovers");
} else {
this.$store.commit("showHover", "sidebar");
}
2021-03-21 11:51:58 +00:00
},
},
};
2021-02-25 18:37:07 +00:00
</script>
2021-03-21 11:51:58 +00:00
<style></style>