Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

room invite friends #23

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions components/Room/Invite/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<script setup lang="ts">
const emit = defineEmits(['closeModals'])
const isOpen = false
function closeModal() {
emit('closeModals', isOpen)
}
const inputValues = ref('http://localhost:3000/rooms/1')
const copiedText = ref('')
function copied() {
navigator.clipboard.writeText(inputValues.value)
.then(() => {
copiedText.value = inputValues.value
})
.catch((error) => {
console.error('Copy failed:', error)
})
}
</script>

<template>
<div>
<div>
<UCard
:ui="{ divide: 'divide-y divide-gray-100 dark:divide-gray-800' } "
>
<template #header>
<div class="flex items-center justify-between">
<h3
class="text-base font-semibold leading-6 text-gray-900 dark:text-white"
>
Invite Friends
</h3>
<UButton
color="gray"
variant="ghost"
icon="i-heroicons-x-mark-20-solid"
class="-my-1"
@click="closeModal"
/>
</div>
</template>
<div class="mb-5">
<p class="mb-2">
You can copy this room link and share with friends.
</p>
<div class="flex justify-between items-center bg-gray-700 py-1 px-2 rounded-xl">
<p class="text-sm">{{ inputValues }}</p>
<UButton variant="text" icon="i-ph-copy" @click="copied" />
</div>
</div>

<div class="flex relative gap-5 flex-col overflow-scroll max-h-[350px] ">
<RoomInviteUser />
</div>
<div class="flex justify-end gap-3">
<UButton>Invite</UButton>
<UButton class="backdrop-blur-sm" variant="secondary" @click="closeModal">
Cancel
</UButton>
</div>
</UCard>
</div>
</div>
</template>

<style scoped>

</style>
59 changes: 59 additions & 0 deletions components/Room/Invite/user.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<script setup lang="ts">

</script>

<template>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
<div class="flex justify-between items-center bg-gray-600 p-2 rounded-lg ">
<div class="flex items-center justify-center gap-2">
<UAvatar size="lg" src="https://avatars.githubusercontent.com/u/739984?v=4" alt="Avatar" />
<span>Berke Kayada</span>
</div>
<UCheckbox />
</div>
</template>

<style scoped>

</style>
7 changes: 5 additions & 2 deletions pages/rooms/[id].vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<script setup lang="ts">
import { ref } from 'vue'

const crateVideoModal = ref(false)
const player = ref()
const isOpen = ref(false)
</script>

<template>
<UModal v-model="isOpen">
<RoomInvite @closeModals="isOpen = false" />
</UModal>
<div class="page h-full flex flex-col w-full">
<div class="flex justify-between w-full">
<div class="flex flex-col lg:flex-row items-center pb-4 gap-3">
Expand All @@ -23,7 +26,7 @@ const player = ref()
<UAvatar src="https://avatars.githubusercontent.com/u/739984?v=4" alt="benjamincanac" />
<UAvatar src="https://avatars.githubusercontent.com/u/7547335?v=4" alt="smarroufin" />
</UAvatarGroup>
<UButton class="!text-gray-600" :ui="{ size: { custom: 'text-4xl' } }" variant="ghost" size="custom" icon="i-ph-plus-circle" @click="crateVideoModal = !crateVideoModal" />
<UButton class="!text-gray-600" :ui="{ size: { custom: 'text-4xl' } }" variant="ghost" size="custom" icon="i-ph-plus-circle" @click="isOpen = true" />
</div>
</div>
<div class="h-full flex w-full">
Expand Down