Skip to content

Commit 7ba4945

Browse files
authored
feat: delivery selector on catalog (#145)
1 parent 51276f2 commit 7ba4945

4 files changed

Lines changed: 57 additions & 11 deletions

File tree

apps/storefront-telegram/app/app.config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@ export default defineAppConfig({
22
ui: {
33
input: {
44
slots: {
5-
base: '!ring-muted placeholder:text-muted/50',
5+
base: '!ring-default placeholder:text-muted/50',
66
},
77
},
88
inputMenu: {
99
slots: {
10-
base: '!ring-muted placeholder:text-muted/50',
10+
base: '!ring-default placeholder:text-muted/50',
11+
},
12+
},
13+
select: {
14+
slots: {
15+
base: '!ring-default placeholder:text-muted/50',
1116
},
1217
},
1318
selectMenu: {
1419
slots: {
15-
base: '!ring-muted placeholder:text-muted/50',
20+
base: '!ring-default placeholder:text-muted/50',
1621
},
1722
},
1823
textarea: {
1924
slots: {
20-
base: '!ring-muted placeholder:text-muted/50',
25+
base: '!ring-default placeholder:text-muted/50',
2126
},
2227
},
2328
button: {
@@ -46,7 +51,7 @@ export default defineAppConfig({
4651
},
4752
modal: {
4853
slots: {
49-
content: 'divide-y-0 !ring-muted/50',
54+
content: 'divide-y-0 !ring-default',
5055
header: 'pb-0 min-h-12',
5156
title: 'font-semibold',
5257
},

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div
33
v-if="isCatalogPage"
4-
class="tg-safe-area bg-violet-950 text-yellow-100 motion-preset-slide-down"
4+
class="tg-safe-area tg-text-button bg-gradient-to-b from-indigo-950 to-indigo-700 motion-preset-slide-down"
55
>
6-
<div class="px-4 py-3.5 max-w-[28rem] mx-auto tg-content-safe-area-top">
7-
<div class="flex flex-row items-center gap-2">
6+
<div class="px-4 py-4 max-w-[28rem] mx-auto tg-content-safe-area-top">
7+
<div class="pt-6 flex flex-row items-center gap-2">
88
<UIcon name="i-lucide-moon" class="size-12 motion-preset-oscillate-sm motion-preset-seesaw motion-duration-3000" />
99

1010
<div class="flex flex-col">
@@ -15,6 +15,8 @@
1515
</div>
1616
</div>
1717
</div>
18+
19+
<div class="tg-bg-secondary h-6 w-full rounded-t-lg overflow-hidden" />
1820
</div>
1921
</template>
2022

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template>
2+
<USelect
3+
v-model="value"
4+
color="neutral"
5+
variant="outline"
6+
size="lg"
7+
:items="items"
8+
:icon="icon"
9+
:ui="{
10+
base: 'mx-0 w-fit',
11+
}"
12+
/>
13+
</template>
14+
15+
<script setup lang="ts">
16+
import type { SelectItem } from '@nuxt/ui'
17+
18+
const items = ref([
19+
{
20+
label: 'Самовывоз',
21+
value: 'pickup',
22+
icon: 'i-lucide-store',
23+
},
24+
{
25+
label: 'Доставка',
26+
value: 'delivery',
27+
icon: 'i-lucide-bike',
28+
},
29+
] satisfies SelectItem[])
30+
31+
const value = ref(items.value[0]?.value)
32+
33+
const icon = computed(() => items.value.find((item) => item.value === value.value)?.icon)
34+
</script>

apps/storefront-telegram/app/pages/index.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<template>
22
<PageContainer :back="false">
3-
<div class="flex flex-row gap-3.5 items-center">
3+
<div class="flex flex-col gap-4">
4+
<CatalogDeliveryTypeSelector />
5+
46
<div class="flex flex-col gap-1">
5-
<h1 class="text-2xl/6 font-bold tracking-tight">
6-
Суши Love
7+
<p class="text-muted">
8+
Суши Love, Калининград-1
9+
</p>
10+
<h1 class="text-xl/6 font-semibold">
11+
улица Фрунзе, 6В
712
</h1>
813
</div>
914
</div>

0 commit comments

Comments
 (0)