Skip to content

Commit d652378

Browse files
authored
chore: visual updates (#128)
* chore: update tests * chore: observer update * chore: visual update * chore: update
1 parent a12ee4e commit d652378

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

apps/storefront-telegram/app/components/ProductCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
<UButton
2929
variant="soft"
3030
color="neutral"
31-
size="md"
31+
size="sm"
3232
:trailing-icon="withSingleVariant ? 'i-lucide-plus' : 'i-lucide-arrow-right'"
33-
class="w-fit hover:bg-muted active:bg-muted"
33+
class="py-1 w-fit hover:bg-muted active:bg-muted"
3434
>
3535
<div class="text-base font-medium">
3636
<span v-if="!withSingleVariant" class="pr-1 lowercase">{{ $t('app.cart.from') }}</span>

apps/storefront-telegram/app/components/UserPointsCard.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<template>
2-
{{ x }} / {{ y }} / {{ z }}
3-
4-
<div ref="target" class="relative w-full h-auto aspect-3/2 perspective-normal motion-preset-slide-down">
2+
<div class="relative w-full h-auto aspect-3/2 perspective-normal motion-preset-slide-down">
53
<div
64
class="absolute inset-0 bg-primary rounded-lg"
75
:style="{
8-
transform: `rotateX(${x * 6}deg) rotateY(${y * 6}deg)`,
6+
transform: `rotateX(${x * 5}deg) rotateY(${y * 5}deg)`,
97
}"
108
/>
119

1210
<div
1311
class="z-10 w-full h-full p-4 flex flex-col justify-between tg-text-button"
1412
:style="{
15-
transform: `rotateX(${x * 4}deg) rotateY(${y * 4}deg)`,
13+
transform: `rotateX(${x * 3}deg) rotateY(${y * 3}deg)`,
1614
}"
1715
>
1816
<div class="flex flex-row justify-between items-center">
@@ -56,9 +54,6 @@
5654
import type { EventListener } from '@telegram-apps/sdk-vue'
5755
import { off, on } from '@telegram-apps/sdk-vue'
5856
59-
const target = useTemplateRef<HTMLElement>('target')
60-
// const parallax = reactive(useParallax(target))
61-
6257
const x = ref(0)
6358
const y = ref(0)
6459
const z = ref(0)

apps/storefront-telegram/app/components/catalog/CategoriesSliderMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
v-for="category in menuStore.menu?.categories"
77
:id="`to-${category.slug}`"
88
:key="category.id"
9-
class="scroll-ml-24 snap-start text-sm text-muted rounded-full"
9+
class="scroll-ml-24 snap-start text-sm text-muted font-medium rounded-full"
1010
:class="{ 'tg-text-button bg-primary': visibleCategory === category.slug }"
1111
>
12-
<button class="px-2.5 py-1" @click="scrollToCategory(category.slug)">
12+
<button class="px-2.5 py-1.25" @click="scrollToCategory(category.slug)">
1313
{{ category.name }}
1414
</button>
1515
</div>

apps/storefront-telegram/app/components/catalog/CategoryBlock.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
]"
77
class="flex flex-col gap-3 mb-10"
88
>
9-
<h2 :id="category?.slug" class="scroll-mt-22 text-2xl/5 font-semibold tracking-tight">
9+
<h2 :id="category?.slug" class="scroll-mt-28 text-2xl/5 font-semibold tracking-tight">
1010
{{ category?.name }}
1111
</h2>
1212

apps/storefront-telegram/app/composables/useCatalog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function _useCatalog() {
22
const visibleCategory = ref<string | null>(null)
33

4-
const observerOptions = { rootMargin: '0px 0px -400px 0px' }
4+
const observerOptions = { rootMargin: '0px 0px 0px 0px' }
55

66
const scrollToCategory = useDebounceFn(() => {
77
const category = window.document.getElementById(`to-${visibleCategory.value}`)

apps/storefront-telegram/app/utils/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export async function init(options: {
9292

9393
// Gyroscope
9494
postEvent('web_app_start_gyroscope', {
95-
refresh_rate: 50,
95+
refresh_rate: 500,
9696
})
9797

9898
if (mountViewport.isAvailable()) {

0 commit comments

Comments
 (0)