Merge pull request #6 from SamandarTurgunboyev/samandar
translation added
This commit is contained in:
38
package-lock.json
generated
38
package-lock.json
generated
@@ -71,6 +71,7 @@
|
|||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"lint-staged": "^16.2.1",
|
"lint-staged": "^16.2.1",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
|
"tailwind-scrollbar": "^4.0.2",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"typescript": "~5.9.2",
|
"typescript": "~5.9.2",
|
||||||
"typescript-eslint": "^8.44.1",
|
"typescript-eslint": "^8.44.1",
|
||||||
@@ -3056,6 +3057,13 @@
|
|||||||
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
|
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/prismjs": {
|
||||||
|
"version": "1.26.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.5.tgz",
|
||||||
|
"integrity": "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/prop-types": {
|
"node_modules/@types/prop-types": {
|
||||||
"version": "15.7.15",
|
"version": "15.7.15",
|
||||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
|
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
|
||||||
@@ -5642,6 +5650,20 @@
|
|||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/prism-react-renderer": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-ey8Ls/+Di31eqzUxC46h8MksNuGx/n0AAC8uKpwFau4RPDYLuE3EXTp8N8G2vX2N7UC/+IXeNUnlWBGGcAG+Ig==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/prismjs": "^1.26.0",
|
||||||
|
"clsx": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": ">=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/prop-types": {
|
"node_modules/prop-types": {
|
||||||
"version": "15.8.1",
|
"version": "15.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||||
@@ -6308,6 +6330,22 @@
|
|||||||
"url": "https://github.com/sponsors/dcastil"
|
"url": "https://github.com/sponsors/dcastil"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tailwind-scrollbar": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/tailwind-scrollbar/-/tailwind-scrollbar-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-wAQiIxAPqk0MNTPptVe/xoyWi27y+NRGnTwvn4PQnbvB9kp8QUBiGl/wsfoVBHnQxTmhXJSNt9NHTmcz9EivFA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"prism-react-renderer": "^2.4.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.13.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"tailwindcss": "4.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "4.1.13",
|
"version": "4.1.13",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.13.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.13.tgz",
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
"lint-staged": "^16.2.1",
|
"lint-staged": "^16.2.1",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
|
"tailwind-scrollbar": "^4.0.2",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
"typescript": "~5.9.2",
|
"typescript": "~5.9.2",
|
||||||
"typescript-eslint": "^8.44.1",
|
"typescript-eslint": "^8.44.1",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@import 'tailwindcss';
|
@import "tailwindcss";
|
||||||
@import 'tw-animate-css';
|
@import "tw-animate-css";
|
||||||
|
|
||||||
@custom-variant dark (&:is(.dark *));
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
@@ -118,3 +118,27 @@
|
|||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ==== Custom Sidebar Scrollbar ==== */
|
||||||
|
.sidebar-scroll {
|
||||||
|
scrollbar-width: thin; /* Firefox uchun */
|
||||||
|
scrollbar-color: #4b5563 #1f2937; /* Thumb va track rangi */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chrome, Edge, Safari uchun */
|
||||||
|
.sidebar-scroll::-webkit-scrollbar {
|
||||||
|
width: 6px; /* juda nozik scroll */
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-scroll::-webkit-scrollbar-track {
|
||||||
|
background: #1f2937; /* fon (track) */
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-scroll::-webkit-scrollbar-thumb {
|
||||||
|
background-color: #4b5563; /* thumb rangi */
|
||||||
|
border-radius: 9999px; /* yumaloq scroll */
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
|
||||||
|
background-color: #6b7280; /* hover effekti */
|
||||||
|
}
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ const StepTwo = ({
|
|||||||
name="desc"
|
name="desc"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Label>{t("Qisqacha ta'rif (UZ)")}</Label>
|
<Label>{t("Qisqacha ta'rif")}</Label>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea {...field} placeholder={t("Qisqacha ta'rif")} />
|
<Textarea {...field} placeholder={t("Qisqacha ta'rif")} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -231,11 +231,11 @@ const StepTwo = ({
|
|||||||
name="desc_ru"
|
name="desc_ru"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Label>{t("Qisqacha ta'rif (RU)")}</Label>
|
<Label>{t("Qisqacha ta'rif")} (ru)</Label>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
{...field}
|
{...field}
|
||||||
placeholder={t("Qisqacha ta'rif (rus tilida)")}
|
placeholder={t("Qisqacha ta'rif") + " (ru)"}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
@@ -254,7 +254,7 @@ const StepTwo = ({
|
|||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field} placeholder={t("Teg (UZ)")} />
|
<Input {...field} placeholder={t("Teg")} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -266,7 +266,7 @@ const StepTwo = ({
|
|||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input {...field} placeholder={t("Teg (RU)")} />
|
<Input {...field} placeholder={t("Teg") + " (ru)"} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
@@ -301,7 +301,7 @@ const StepTwo = ({
|
|||||||
>
|
>
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
<p className="text-sm text-gray-300">
|
<p className="text-sm text-gray-300">
|
||||||
{t("Bo‘lim")} #{index + 1}
|
{t(" ")} #{index + 1}
|
||||||
</p>
|
</p>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -364,7 +364,7 @@ const StepTwo = ({
|
|||||||
name={`sections.${index}.text`}
|
name={`sections.${index}.text`}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Label>{t("Matn (UZ)")}</Label>
|
<Label>{t("Matn")}</Label>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea {...field} placeholder={t("Matn kiriting")} />
|
<Textarea {...field} placeholder={t("Matn kiriting")} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -378,9 +378,9 @@ const StepTwo = ({
|
|||||||
name={`sections.${index}.text_ru`}
|
name={`sections.${index}.text_ru`}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<Label>{t("Matn (RU)")}</Label>
|
<Label>{t("Matn") + " (ru)"}</Label>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea {...field} placeholder={t("Matn (rus tilida)")} />
|
<Textarea {...field} placeholder={t("Matn") + " (ru)"} />
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1455,13 +1455,13 @@ const StepOne = ({
|
|||||||
<div className="flex gap-3 items-end flex-wrap">
|
<div className="flex gap-3 items-end flex-wrap">
|
||||||
<Input
|
<Input
|
||||||
id="extra_service_name"
|
id="extra_service_name"
|
||||||
placeholder={t("Xizmat nomi (UZ)")}
|
placeholder={t("Xizmat nomi")}
|
||||||
className="h-12 !text-md flex-1 min-w-[200px]"
|
className="h-12 !text-md flex-1 min-w-[200px]"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
id="extra_service_name_ru"
|
id="extra_service_name_ru"
|
||||||
placeholder={t("Xizmat nomi (RU)")}
|
placeholder={t("Xizmat nomi") + " (ru)"}
|
||||||
className="h-12 !text-md flex-1 min-w-[200px]"
|
className="h-12 !text-md flex-1 min-w-[200px]"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -1518,7 +1518,7 @@ const StepOne = ({
|
|||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
{item.name} —{" "}
|
{item.name} —{" "}
|
||||||
<strong>{formatPrice(item.price)} so‘m</strong>
|
<strong>{formatPrice(item.price, true)}</strong>
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -1542,17 +1542,16 @@ const StepOne = ({
|
|||||||
<div className="flex gap-3 items-end flex-wrap">
|
<div className="flex gap-3 items-end flex-wrap">
|
||||||
<Input
|
<Input
|
||||||
id="paid_service_name"
|
id="paid_service_name"
|
||||||
placeholder={t("Xizmat nomi (UZ)")}
|
placeholder={t("Xizmat nomi")}
|
||||||
className="h-12 !text-md flex-1 min-w-[200px]"
|
className="h-12 !text-md flex-1 min-w-[200px]"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
id="paid_service_name_ru"
|
id="paid_service_name_ru"
|
||||||
placeholder={t("Xizmat nomi (RU)")}
|
placeholder={t("Xizmat nomi") + " (ru)"}
|
||||||
className="h-12 !text-md flex-1 min-w-[200px]"
|
className="h-12 !text-md flex-1 min-w-[200px]"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Narx maydoni */}
|
|
||||||
<Input
|
<Input
|
||||||
id="paid_service_price"
|
id="paid_service_price"
|
||||||
type="text"
|
type="text"
|
||||||
|
|||||||
@@ -533,5 +533,23 @@
|
|||||||
"Sizga tizimga kirishga ruxsat berilmagan": "Вам не разрешен доступ к системе.",
|
"Sizga tizimga kirishga ruxsat berilmagan": "Вам не разрешен доступ к системе.",
|
||||||
"Оmmaviy": "Публичный",
|
"Оmmaviy": "Публичный",
|
||||||
"Shaxsiy": "Личный",
|
"Shaxsiy": "Личный",
|
||||||
"Status o'zgartirildi": "Статус изменён"
|
"Status o'zgartirildi": "Статус изменён",
|
||||||
|
"Chiqish": "Выход",
|
||||||
|
"Savollar ro'yxati": "Список вопросов",
|
||||||
|
"Pul olish so'rovlari": "Запросы на получение средств",
|
||||||
|
"Bepul xizmatlar": "Бесплатные услуги",
|
||||||
|
"Qulaylik tanlang": "Выберите удобство",
|
||||||
|
"Mavjud qulayliklar": "Доступные удобства",
|
||||||
|
"Avval xususiyat tanlang": "Сначала выберите свойство",
|
||||||
|
"Avval mehmonxona xususiyatini tanlang": "Сначала выберите свойство отеля.",
|
||||||
|
"Yangilik bo‘limlari": "Новостные разделы",
|
||||||
|
"Qisqacha ta'rif": "Краткое описание",
|
||||||
|
"Teglar": "Теги",
|
||||||
|
"Teg": "Тег",
|
||||||
|
"Teg qo'shish": "Добавить тег",
|
||||||
|
"Bo‘lim": "Отдел",
|
||||||
|
"Rasm tanlash": "Выбрать изображение",
|
||||||
|
"Matn": "Текст",
|
||||||
|
"Matn kiriting": "Введите текст",
|
||||||
|
"Bo‘lim qo‘shish": "Добавить раздел"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -534,5 +534,23 @@
|
|||||||
"Sizga tizimga kirishga ruxsat berilmagan": "Sizga tizimga kirishga ruxsat berilmagan",
|
"Sizga tizimga kirishga ruxsat berilmagan": "Sizga tizimga kirishga ruxsat berilmagan",
|
||||||
"Оmmaviy": "Ommaviy",
|
"Оmmaviy": "Ommaviy",
|
||||||
"Shaxsiy": "Shaxsiy",
|
"Shaxsiy": "Shaxsiy",
|
||||||
"Status o'zgartirildi": "Status o'zgartirildi"
|
"Status o'zgartirildi": "Status o'zgartirildi",
|
||||||
|
"Chiqish": "Chiqish",
|
||||||
|
"Savollar ro'yxati": "Savollar ro'yxati",
|
||||||
|
"Pul olish so'rovlari": "Pul olish so'rovlari",
|
||||||
|
"Bepul xizmatlar": "Bepul xizmatlar",
|
||||||
|
"Qulaylik tanlang": "Qulaylik tanlang",
|
||||||
|
"Mavjud qulayliklar": "Mavjud qulayliklar",
|
||||||
|
"Avval xususiyat tanlang": "Avval xususiyat tanlang",
|
||||||
|
"Avval mehmonxona xususiyatini tanlang": "Avval mehmonxona xususiyatini tanlang",
|
||||||
|
"Yangilik bo‘limlari": "Yangilik bo‘limlari",
|
||||||
|
"Qisqacha ta'rif": "Qisqacha ta'rif",
|
||||||
|
"Teglar": "Teglar",
|
||||||
|
"Teg": "Teg",
|
||||||
|
"Teg qo'shish": "Teg qo'shish",
|
||||||
|
"Bo‘lim": "Bo‘lim",
|
||||||
|
"Rasm tanlash": "Rasm tanlash",
|
||||||
|
"Matn": "Matn",
|
||||||
|
"Matn kiriting": "Matn kiriting",
|
||||||
|
"Bo‘lim qo‘shish": "Bo‘lim qo‘shish"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ const MENU_ITEMS = [
|
|||||||
path: "/faq",
|
path: "/faq",
|
||||||
roles: ["moderator", "admin", "superuser"],
|
roles: ["moderator", "admin", "superuser"],
|
||||||
children: [
|
children: [
|
||||||
{ label: "Savollar ro‘yxati", path: "/faq" },
|
{ label: "Savollar ro'yxati", path: "/faq" },
|
||||||
{ label: "Savollar kategoriyasi", path: "/faq/categories" },
|
{ label: "Savollar kategoriyasi", path: "/faq/categories" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -149,7 +149,7 @@ const MENU_ITEMS = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Pul olish so‘rovlari",
|
label: "Pul olish so'rovlari",
|
||||||
icon: Wallet,
|
icon: Wallet,
|
||||||
path: "/withdraw/list",
|
path: "/withdraw/list",
|
||||||
roles: ["buxgalter", "moderator", "tour_admin"],
|
roles: ["buxgalter", "moderator", "tour_admin"],
|
||||||
@@ -204,8 +204,8 @@ export function Sidebar({ role }: SidebarProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const MenuList = (
|
const MenuList = (
|
||||||
<div className="flex flex-col h-full justify-between">
|
<div className="flex flex-col h-full">
|
||||||
<ul className="p-2 space-y-1 flex-1 overflow-y-auto">
|
<ul className="p-2 space-y-1 flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-600 scrollbar-track-gray-800 hover:scrollbar-thumb-gray-500">
|
||||||
{visibleMenu.map(({ label, icon: Icon, path, children }) => {
|
{visibleMenu.map(({ label, icon: Icon, path, children }) => {
|
||||||
const isActive = active.startsWith(path);
|
const isActive = active.startsWith(path);
|
||||||
const isOpen = openMenus.includes(label);
|
const isOpen = openMenus.includes(label);
|
||||||
@@ -281,7 +281,7 @@ export function Sidebar({ role }: SidebarProps) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="lg:border fixed max-lg:sticky">
|
<div className="lg:border fixed max-lg:sticky overflow-y-auto sidebar-scroll">
|
||||||
{/* Mobil versiya */}
|
{/* Mobil versiya */}
|
||||||
<div className="lg:hidden flex items-center justify-end bg-gray-900 p-4 sticky top-0 z-50">
|
<div className="lg:hidden flex items-center justify-end bg-gray-900 p-4 sticky top-0 z-50">
|
||||||
<Sheet open={isSheetOpen} onOpenChange={setIsSheetOpen}>
|
<Sheet open={isSheetOpen} onOpenChange={setIsSheetOpen}>
|
||||||
|
|||||||
Reference in New Issue
Block a user