This commit is contained in:
marzban-dev
2025-01-06 19:26:16 +03:30
parent 73d68810be
commit cdc0ebec26
13 changed files with 536 additions and 0 deletions
@@ -0,0 +1,45 @@
<script setup lang="ts">
// types
type Props = {}
// props
const props = defineProps<Props>();
const {} = toRefs(props);
// state
const isOpen = ref(false);
// method
const closeChat = () => isOpen.value = false;
// provide-inject
provide("isOpen", {
isOpen,
closeChat
});
</script>
<template>
<button
v-if="!isOpen"
@click="isOpen = !isOpen"
class="cursor-pointer fixed shadow-xl shadow-black/30 right-8 bottom-8 bg-black size-[70px] flex justify-center items-center rounded-full"
>
<Icon
name="streamline:artificial-intelligence-spark"
class="**:stroke-white"
size="26"
/>
</button>
<ChatBoxContainer :isOpen="isOpen" />
</template>