feat: filebrowser with encfs
This commit is contained in:
32
frontend/src/components/header/Action.vue
Normal file
32
frontend/src/components/header/Action.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<button @click="action" :aria-label="label" :title="label" class="action">
|
||||
<i class="material-icons">{{ icon }}</i>
|
||||
<span>{{ label }}</span>
|
||||
<span v-if="counter && counter > 0" class="counter">{{ counter }}</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useLayoutStore } from "@/stores/layout";
|
||||
|
||||
const props = defineProps<{
|
||||
icon?: string;
|
||||
label?: string;
|
||||
counter?: number;
|
||||
show?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "action"): any;
|
||||
}>();
|
||||
|
||||
const layoutStore = useLayoutStore();
|
||||
|
||||
const action = () => {
|
||||
if (props.show) {
|
||||
layoutStore.showHover(props.show);
|
||||
}
|
||||
|
||||
emit("action");
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user