chore: add prettier frontent linter

This commit is contained in:
Oleg Lobanov
2021-03-21 12:51:58 +01:00
parent a721dc1f31
commit c44b37c50c
73 changed files with 18898 additions and 4499 deletions

View File

@@ -1,5 +1,5 @@
<template>
<button @click="action" :aria-label="label" :title="label" class="action">
<button @click="action" :aria-label="label" :title="label" class="action">
<i class="material-icons">{{ icon }}</i>
<span>{{ label }}</span>
<span v-if="counter > 0" class="counter">{{ counter }}</span>
@@ -8,25 +8,18 @@
<script>
export default {
name: 'action',
props: [
'icon',
'label',
'counter',
'show'
],
name: "action",
props: ["icon", "label", "counter", "show"],
methods: {
action: function () {
if (this.show) {
this.$store.commit('showHover', this.show)
this.$store.commit("showHover", this.show);
}
this.$emit('action')
}
}
}
this.$emit("action");
},
},
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,7 +1,13 @@
<template>
<header>
<img v-if="showLogo !== undefined" :src="logoURL" />
<action v-if="showMenu !== undefined" class="menu-button" icon="menu" :label="$t('buttons.toggleSidebar')" @action="openSidebar()" />
<action
v-if="showMenu !== undefined"
class="menu-button"
icon="menu"
:label="$t('buttons.toggleSidebar')"
@action="openSidebar()"
/>
<slot />
@@ -9,39 +15,44 @@
<slot name="actions" />
</div>
<action v-if="this.$slots.actions" id="more" icon="more_vert" :label="$t('buttons.more')" @action="$store.commit('showHover', 'more')" />
<action
v-if="this.$slots.actions"
id="more"
icon="more_vert"
:label="$t('buttons.more')"
@action="$store.commit('showHover', 'more')"
/>
<div class="overlay" v-show="this.$store.state.show == 'more'" @click="$store.commit('closeHovers')" />
<div
class="overlay"
v-show="this.$store.state.show == 'more'"
@click="$store.commit('closeHovers')"
/>
</header>
</template>
<script>
import { logoURL } from '@/utils/constants'
import { logoURL } from "@/utils/constants";
import Action from '@/components/header/Action'
import Action from "@/components/header/Action";
export default {
name: 'header-bar',
props: [
'showLogo',
'showMenu',
],
name: "header-bar",
props: ["showLogo", "showMenu"],
components: {
Action
Action,
},
data: function () {
return {
logoURL
}
logoURL,
};
},
methods: {
openSidebar () {
this.$store.commit('showHover', 'sidebar')
}
}
}
openSidebar() {
this.$store.commit("showHover", "sidebar");
},
},
};
</script>
<style>
</style>
<style></style>