-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
160 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<script setup> | ||
import AppLayout from '@/Layouts/AppLayout.vue'; | ||
import Welcome from '@/Components/Welcome.vue'; | ||
import PrimaryButton from '@/Components/PrimaryButton.vue'; | ||
import { computed, onMounted, ref } from 'vue'; | ||
import { useDropzone } from "vue3-dropzone"; | ||
import { router, useForm } from '@inertiajs/vue3'; | ||
import FileUploader from './Components/FileUploader.vue'; | ||
const props = defineProps({ | ||
collection: { | ||
type: Object, | ||
required: true, | ||
}, | ||
chat: { | ||
type: Object, | ||
}, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<AppLayout title="Dashboard"> | ||
<template #header> | ||
<h2 class="font-semibold text-xl text-gray-800 leading-tight"> | ||
Chat with {{ collection.data.name }} | ||
</h2> | ||
</template> | ||
|
||
<div class="py-12"> | ||
|
||
|
||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> | ||
|
||
|
||
<div class="bg-white overflow-hidden shadow-xl sm:rounded-lg"> | ||
|
||
|
||
<!-- Top area --> | ||
|
||
<div class="border-b pb-5 px-3 py-4"> | ||
<h3 class="text-base font-semibold leading-6 text-gray-900">{{ collection.data.name }}</h3> | ||
<p class="mt-2 max-w-4xl text-sm text-gray-500"> | ||
{{ collection.data.description }} | ||
</p> | ||
</div> | ||
<div class="p-10"> | ||
Chat widget here | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</AppLayout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<SecondaryButton | ||
type="button" | ||
@click="start" | ||
class="flex justify-between items-center gap-4"> | ||
<ChatBubbleLeftIcon class="h-5 w-5"></ChatBubbleLeftIcon> | ||
start a new chat</SecondaryButton> | ||
</template> | ||
|
||
<script setup> | ||
import { useForm } from '@inertiajs/vue3'; | ||
import { useToast } from 'vue-toastification'; | ||
import SecondaryButton from "@/Components/SecondaryButton.vue"; | ||
import { ChatBubbleLeftIcon } from '@heroicons/vue/24/outline'; | ||
const toast = useToast(); | ||
const props = defineProps({ | ||
collection: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}) | ||
const form = useForm({}); | ||
const start = () => { | ||
form.post(route('chats.collection.store', { | ||
collection: props.collection.id | ||
}), { | ||
onError: () => { | ||
toast.error('Failed to start chat :('); | ||
}, | ||
}); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters