-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
e0ca74b
commit 3366de6
Showing
36 changed files
with
215 additions
and
180 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,5 @@ | ||
<template> | ||
<button class="p-3 bg-emerald-500 border-b-4 border-emerald-600 text-white w-full rounded-lg font-medium cursor-pointer active:scale-95 hover:opacity-80 duration-200"> | ||
<slot /> | ||
</button> | ||
</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,11 @@ | ||
<template> | ||
<img :src="getFullUrl(src)" alt=""> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
defineProps<{ src: string }>() | ||
function getFullUrl(src: string) { | ||
return new URL(`chatgame-assets${src}`, 'https://storage.yandexcloud.net/').href | ||
} | ||
</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
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
<template> | ||
<div | ||
class="z-40 left-0 right-0 top-0 bottom-0 bg-neutral-950 opacity-0 transition-all duration-500" | ||
:class="{ 'fixed! block! opacity-60': isOpened, 'opacity-0!': isClosing }" | ||
/> | ||
|
||
<div v-if="$slots.bg && isOpened && !isClosing"> | ||
<slot name="bg" /> | ||
</div> | ||
|
||
<div | ||
class="z-40 flex flex-col justify-end fixed left-0 right-0 bottom-0 mx-auto w-full max-w-xl max-h-[100dvh] overflow-y-hidden p-4 m-0 pb-16 shadow-none translate-y-full transition-transform duration-500" | ||
:class="{ 'top-0! translate-y-0!': isOpened, 'translate-y-full!': isClosing }" | ||
> | ||
<div ref="target" class="relative p-4 md:p-6 bg-orange-100 rounded-xl shadow-lg"> | ||
<div class="pb-20 max-h-[75dvh] !overflow-y-auto !overflow-hidden space-y-3"> | ||
<h3 class="text-xl md:text-2xl font-medium leading-tight"> | ||
{{ title }} | ||
</h3> | ||
|
||
<slot /> | ||
</div> | ||
|
||
<div class="absolute bottom-0 right-0 left-0 bg-orange-100 rounded-xl px-4 md:px-6 pt-2 pb-4"> | ||
<Button @click="onClose()"> | ||
Закрыть | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { onClickOutside, usePointerSwipe } from '@vueuse/core' | ||
const { isOpened } = defineProps<{ | ||
isOpened: boolean | ||
title: string | ||
}>() | ||
const emit = defineEmits(['close']) | ||
const isClosing = ref(false) | ||
const target = ref(null) | ||
onClickOutside(target, () => isOpened && onClose()) | ||
const { isSwiping, direction } = usePointerSwipe(target) | ||
watch(isSwiping, () => { | ||
if (direction.value === 'down') { | ||
onClose() | ||
} | ||
}) | ||
function onClose() { | ||
isClosing.value = true | ||
setTimeout(() => { | ||
emit('close') | ||
isClosing.value = false | ||
}, 500) | ||
} | ||
</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
Oops, something went wrong.