fix: layouts

This commit is contained in:
Mahyar Khanbolooki
2025-07-22 00:36:20 +03:30
parent 13a3c3ce8a
commit 2454107da0
15 changed files with 167 additions and 82 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ function FoodPage({ }: Props) {
const price = 0; // TODO: Replace with actual price if needed
return (
<div className='w-full -translate-y-2'>
<div className='w-full -translate-y-2 pt-6'>
<div className="relative w-full rounded-2xl overflow-hidden">
<Image
className='w-full'
+1 -1
View File
@@ -195,7 +195,7 @@ function AboutPage({ data }: Readonly<{ data: AboutDataModel; }>) {
}
return (
<div>
<div className='pt-8 h-full overflow-y-auto noscrollbar'>
<TabContainer>
<TabHeader
viewRenderer={firstTab()}
+80 -19
View File
@@ -12,13 +12,13 @@ function ChatIndex({ }: Props) {
};
return (
<section className='h-full pb-8'>
<h1 className='font-medium'>علی مصلحی</h1>
<section className="flex flex-col h-full pt-6">
<h1 className="font-medium">علی مصلحی</h1>
<div className='bg-container rounded-[30px] mt-6 pt-7 px-6 pb-8 h-full relative'>
<section aria-labelledby='پیام های اخیر'>
<ul className='grid gap-6'>
<li className='bg-[#F6F7FA] rounded-[30px] p-6'>
<div className="bg-container rounded-[30px] mt-6 flex flex-col flex-1 px-6 pt-7 pb-8 overflow-hidden">
<div className="flex-1 overflow-y-auto">
<ul className="grid gap-6 pb-6 ">
<li className='bg-[#F6F7FA] rounded-[30px] rounded-tr-none p-6'>
<article>
<p className='text-xs2'>
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است
@@ -30,7 +30,61 @@ function ChatIndex({ }: Props) {
</article>
</li>
<li className='bg-[#EBEDF5] rounded-[30px] p-6'>
<li className='bg-[#EBEDF5] rounded-[30px] rounded-tl-none p-6'>
<article>
<h6 className='text-xs font-medium'>
سیما فرهادی
</h6>
<p className='text-xs2 mt-2.5'>
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است،
</p>
<span dir='ltr' className='text-[11px] float-end text-disabled-text mt-2.5'>
10:07 | 1403/09/30
</span>
</article>
</li>
<li className='bg-[#F6F7FA] rounded-[30px] rounded-tr-none p-6'>
<article>
<p className='text-xs2'>
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است
</p>
<span dir='ltr' className='text-[11px] float-end text-disabled-text mt-2.5'>
10:07 | 1403/09/30
</span>
</article>
</li>
<li className='bg-[#EBEDF5] rounded-[30px] rounded-tl-none p-6'>
<article>
<h6 className='text-xs font-medium'>
سیما فرهادی
</h6>
<p className='text-xs2 mt-2.5'>
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است،
</p>
<span dir='ltr' className='text-[11px] float-end text-disabled-text mt-2.5'>
10:07 | 1403/09/30
</span>
</article>
</li>
<li className='bg-[#F6F7FA] rounded-[30px] rounded-tr-none p-6'>
<article>
<p className='text-xs2'>
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است
</p>
<span dir='ltr' className='text-[11px] float-end text-disabled-text mt-2.5'>
10:07 | 1403/09/30
</span>
</article>
</li>
<li className='bg-[#EBEDF5] rounded-[30px] rounded-tl-none p-6'>
<article>
<h6 className='text-xs font-medium'>
سیما فرهادی
@@ -45,23 +99,30 @@ function ChatIndex({ }: Props) {
</article>
</li>
</ul>
</section>
</div>
<section aria-labelledby='ارسال پیام' className="absolute w-full bottom-8 left-0 px-6">
<section aria-labelledby="ارسال پیام" className="w-full">
<form
action={submitMessage}
className="focus-within:outline-blue-400 outline outline-transparent transition-colors duration-100 flex items-center gap-0 bg-transparent border border-[#D0D0D0] h-12 rounded-xl py-2.5 px-2 mt-6">
<button type='button' className='active:bg-neutral-100 transition-colors duration-150 rounded-full p-1'><Microphone2 className='stroke-foreground' size={24} /></button>
className="focus-within:outline-blue-400 outline outline-transparent transition-colors duration-100 flex items-center gap-0 bg-transparent border border-[#D0D0D0] h-12 rounded-xl py-2.5 px-2"
>
<button type="button" className="active:bg-neutral-100 transition-colors duration-150 rounded-full p-1">
<Microphone2 className="stroke-foreground" size={24} />
</button>
<input
name='textMessage'
role='textbox'
autoComplete='off'
className='w-full text-[11px] h-full outline-none ms-1'
type='text'
placeholder='پیام خود را بنویسید'
name="textMessage"
role="textbox"
autoComplete="off"
className="w-full text-[11px] h-full outline-none ms-1"
type="text"
placeholder="پیام خود را بنویسید"
/>
<button type='button' className='active:bg-neutral-100 transition-colors duration-150 rounded-full p-1.5'><EmojiHappy className='stroke-disabled2' size={20} /></button>
<button type='button' className='active:bg-neutral-100 transition-colors duration-150 rounded-full p-1.5'><Paperclip2 className='stroke-disabled2' size={20} /></button>
<button type="button" className="active:bg-neutral-100 transition-colors duration-150 rounded-full p-1.5">
<EmojiHappy className="stroke-disabled2" size={20} />
</button>
<button type="button" className="active:bg-neutral-100 transition-colors duration-150 rounded-full p-1.5">
<Paperclip2 className="stroke-disabled2" size={20} />
</button>
</form>
</section>
</div>
+8 -2
View File
@@ -56,8 +56,14 @@ function ChatIndex() {
return (
<section ref={containerRef} className="h-full pb-8 relative overflow-hidden">
<section ref={containerRef} className="h-full relative">
<section className="relative h-full w-full mt-7">
<motion.div
className='size-[1145px] rounded-full fixed top-1/2 left-1/2 -translate-1/2'
style={{ background: 'linear-gradient(180deg, #EAECF0 4.52%, #DBDEE8 95.02%)', willChange: 'transform' }}
>
</motion.div>
<motion.div
animate={{ scale: [1, 0.95, 1] }}
transition={{ repeat: Infinity, duration: 13 }}
@@ -108,7 +114,7 @@ function ChatIndex() {
>
</motion.div>
<div className='grid grid-cols-6 grid-rows-6'>
<div>
{positions.length === users.length &&
users.map((v, i) => (
<Link
+1 -1
View File
@@ -156,7 +156,7 @@ function OrdersIndex() {
return (
<div>
<div className='pt-8'>
<TabContainer>
<TabHeader
viewRenderer={<PerformantTabRenderer rowHeight={310}>{firstTab()}</PerformantTabRenderer>}
+25 -23
View File
@@ -218,28 +218,30 @@ const MenuIndex = () => {
return (
<div className="flex flex-col gap-4 items-center" ref={wrapperRef}>
<SearchBox value={search} onChange={updateSearch} />
<HorizontalScrollView className="w-full noscrollbar py-4!">
{categories.map((item, index) => (
<CategoryItemRenderer
key={index}
className={clsx(
index === +selectedCategory && "bg-white!",
)}
onClick={() => updateCategory(index)}
>
<Image
priority
src="/assets/images/food-image.png"
width={32}
height={32}
alt="category image"
/>
<span className="text-xs text-black">{item.title}</span>
</CategoryItemRenderer>
))}
</HorizontalScrollView>
<div className="flex flex-col gap-4 items-center pt-8" ref={wrapperRef}>
<div className="w-full">
<SearchBox value={search} onChange={updateSearch} />
<HorizontalScrollView className="w-full noscrollbar mt-4! py-4!">
{categories.map((item, index) => (
<CategoryItemRenderer
key={index}
className={clsx(
index === +selectedCategory && "bg-white!",
)}
onClick={() => updateCategory(index)}
>
<Image
priority
src="/assets/images/food-image.png"
width={32}
height={32}
alt="category image"
/>
<span className="text-xs text-black">{item.title}</span>
</CategoryItemRenderer>
))}
</HorizontalScrollView>
</div>
<section className="w-full">
<div className="flex justify-between items-center relative" ref={smallCategoriesRef} >
@@ -249,7 +251,7 @@ const MenuIndex = () => {
<div className="inline-flex gap-2 justify-around items-center">
<button onClick={toggleFilterModal} className="rounded-xl h-8 bg-white ps-4 pe-2 py-1.5 inline-flex items-center justify-between gap-[7px]">
<EqualizerIcon />
<span className="text-xs leading-5">فیلتر بر اساس</span>
<span className="text-xs leading-5 font-medium">فیلتر بر اساس</span>
</button>
<button onClick={toggleSortingModal} className="rounded-lg h-8 bg-white p-1.5">
<TextAlignIcon />
+2 -2
View File
@@ -80,10 +80,10 @@ function RatingOrderIndex({ }: Props) {
}
return (
<section className='min-h-full'>
<section className='flex flex-col h-full pt-6'>
<h1 className='font-medium'>امتیاز شما به رستوران</h1>
<form action={submitForm} className='bg-container h-full flex flex-col justify-between rounded-[30px] pt-10 px-6 pb-7.5 mt-4'>
<form action={submitForm} className='bg-container flex flex-col h-min justify-between rounded-[30px] pt-10 px-6 pb-7.5 mt-4'>
<div>
<div className='w-full'>
+1 -1
View File
@@ -3,7 +3,7 @@ import React from 'react'
function TransactionsIndex() {
return (
<section>
<section className='pt-6'>
<h1 className='font-medium'>کدهای تخفیف</h1>
<section
+1 -1
View File
@@ -68,7 +68,7 @@ input[type="password"] {
/* width */
::-webkit-scrollbar {
width: 10px;
width: 4px;
height: 6px;
}
+5 -3
View File
@@ -15,13 +15,15 @@ export default function RootLayout({
return (
<html lang="en">
<html lang="en" className="h-svh overflow-hidden">
<body
dir="rtl"
className={`antialiased bg-background h-full`}
className={`antialiased bg-background h-svh overflow-hidden`}
>
<ReactQueryProvider>
{children}
<div id="root" className="h-svh overflow-hidden">
{children}
</div>
</ReactQueryProvider>
</body>
</html>
+3 -3
View File
@@ -56,12 +56,12 @@ function ProfileIndex({ }: Props) {
}
return (
<>
<div className='h-full noscrollbar overflow-y-auto flex flex-col'>
<div className='relative text-center'>
<div className='font-medium text-sm2 leading-6'>ویرایش اطلاعات</div>
</div>
<div className="mt-8 bg-container rounded-container w-full box-shadow-normal py-6 px-4 flex flex-col justify-between">
<div className="mt-8 flex-1 bg-container rounded-container w-full box-shadow-normal py-6 px-4 flex flex-col justify-between">
<div className="">
<div className="justify-self-center w-fit relative text-center pb-10"
@@ -158,7 +158,7 @@ function ProfileIndex({ }: Props) {
<Button className='bg-neutral-200! text-disabled-text!'>انصراف</Button>
</div>
</div>
</>
</div>
)
}
+4 -4
View File
@@ -24,15 +24,15 @@ function ProfileIndex({ }: Props) {
// }, [isAuthenticated])
return (
<>
<div className='overflow-y-auto h-full noscrollbar flex flex-col'>
<div className='relative text-center'>
<div className='font-bold text-sm2 leading-6'>پروفایل کاربری</div>
<h1 className='font-bold text-sm2 leading-6'>پروفایل کاربری</h1>
<button className='absolute top-0 left-0'>
<ArrowLeft size={24} className='stroke-foreground' />
</button>
</div>
<div className="mt-8 bg-white rounded-container w-full box-shadow-normal py-6 px-4 flex flex-col justify-between">
<div className="mt-8 flex-1 h-full bg-white rounded-container w-full box-shadow-normal py-6 px-4 flex flex-col justify-between">
<div className="">
<div className="flex items-center justify-start gap-4 pb-6 border-b-[1.5px] border-border">
@@ -85,7 +85,7 @@ function ProfileIndex({ }: Props) {
</Link>
</div>
</div>
</>
</div>
)
}