diff --git a/apps/admin/app/dashboard/ticket/page.tsx b/apps/admin/app/dashboard/ticket/page.tsx index 8f3572b..f21fa63 100644 --- a/apps/admin/app/dashboard/ticket/page.tsx +++ b/apps/admin/app/dashboard/ticket/page.tsx @@ -120,6 +120,7 @@ export default function Page() { const { data } = await getTicketList({ ...pagination, ...filters, + issue_type: 0, }); return { list: data.data?.list || [], diff --git a/apps/admin/app/dashboard/user/page.tsx b/apps/admin/app/dashboard/user/page.tsx index 18d212a..c12071f 100644 --- a/apps/admin/app/dashboard/user/page.tsx +++ b/apps/admin/app/dashboard/user/page.tsx @@ -5,8 +5,16 @@ import { ProTable, ProTableActions } from '@/components/pro-table'; import { getSubscribeList } from '@/services/admin/subscribe'; import { createUser, deleteUser, getUserList, updateUserBasicInfo } from '@/services/admin/user'; import { useQuery } from '@tanstack/react-query'; -import { Badge } from '@workspace/ui/components/badge'; import { Button } from '@workspace/ui/components/button'; +import { Input } from '@workspace/ui/components/input'; +import { FilePenLine } from 'lucide-react'; + +import { + Popover, + PopoverClose, + PopoverContent, + PopoverTrigger, +} from '@workspace/ui/components/popover'; import { Switch } from '@workspace/ui/components/switch'; import { ConfirmButton } from '@workspace/ui/custom-components/confirm-button'; import { formatDate } from '@workspace/ui/utils'; @@ -17,6 +25,37 @@ import { toast } from 'sonner'; import { UserDetail } from './user-detail'; import UserForm from './user-form'; +// 新的子组件,现在管理它自己的备注状态 +const RemarkForm = ({ onSave, initialRemark, CloseComponent }) => { + const [remark, setRemark] = useState(initialRemark); + + const handleInputChange = (event) => { + setRemark(event.target.value); + }; + + const handleSaveClick = () => { + onSave(remark); + }; + + return ( + <> +
备注
+ + + + + + ); +}; + export default function Page() { const t = useTranslations('user'); const [loading, setLoading] = useState(false); @@ -32,7 +71,6 @@ export default function Page() { return data.data?.list as API.SubscribeGroup[]; }, }); - return ( action={ref} @@ -106,10 +144,42 @@ export default function Page() { const method = row.original.auth_methods?.[0]; return (
- - {method?.auth_type} - - {method?.auth_identifier} + + +
+ {method?.auth_identifier} + {row.original?.remark ? `(${row.original.remark})` : ''} + +
+
+ + { + const { + auth_methods, + user_devices, + enable_balance_notify, + enable_login_notify, + enable_subscribe_notify, + enable_trade_notify, + updated_at, + created_at, + id, + ...rest + } = row.original; + await updateUserBasicInfo({ + user_id: id, + ...rest, + remark, + } as unknown as API.UpdateUserBasiceInfoRequest); + toast.success(t('updateSuccess')); + ref.current?.refresh(); + }} + /> + +
); }, diff --git a/apps/admin/app/dashboard/withdraw-ticket/page.tsx b/apps/admin/app/dashboard/withdraw-ticket/page.tsx new file mode 100644 index 0000000..0c8ff67 --- /dev/null +++ b/apps/admin/app/dashboard/withdraw-ticket/page.tsx @@ -0,0 +1,192 @@ +'use client'; + +import { ProTable, ProTableActions } from '@/components/pro-table'; +import { getTicket, getTicketList, updateTicketStatus } from '@/services/admin/ticket'; +import { useQuery } from '@tanstack/react-query'; +import { Button } from '@workspace/ui/components/button'; +import { Drawer, DrawerContent, DrawerHeader, DrawerTitle } from '@workspace/ui/components/drawer'; +import { ScrollArea } from '@workspace/ui/components/scroll-area'; +import { ConfirmButton } from '@workspace/ui/custom-components/confirm-button'; +import { cn } from '@workspace/ui/lib/utils'; +import { formatDate } from '@workspace/ui/utils'; +import { useTranslations } from 'next-intl'; +import NextImage from 'next/legacy/image'; +import { useEffect, useRef, useState } from 'react'; +import { toast } from 'sonner'; +import { UserDetail } from '../user/user-detail'; + +export default function Page() { + const t = useTranslations('ticket'); + + const [ticketId, setTicketId] = useState(null); + + const [message, setMessage] = useState(''); + + const { data: ticket, refetch: refetchTicket } = useQuery({ + queryKey: ['getTicket', ticketId], + queryFn: async () => { + const { data } = await getTicket({ + id: ticketId, + }); + return data.data as API.Ticket; + }, + enabled: !!ticketId, + refetchInterval: 5000, + }); + + const scrollRef = useRef(null); + useEffect(() => { + setTimeout(() => { + if (scrollRef.current) { + scrollRef.current.children[1]?.scrollTo({ + top: scrollRef.current.children[1].scrollHeight, + behavior: 'smooth', + }); + } + }, 66); + }, [ticket?.follow?.length]); + + const ref = useRef(null); + return ( + <> + + action={ref} + header={{ + title: t('ticketList'), + }} + columns={[ + { + accessorKey: 'title', + header: t('title'), + }, + { + accessorKey: 'user_id', + header: t('user'), + cell: ({ row }) => , + }, + { + accessorKey: 'status', + header: t('status.0'), + cell: ({ row }) => ( + + {t(`status.${row.original.status}`)} + + ), + }, + { + accessorKey: 'updated_at', + header: t('updatedAt'), + cell: ({ row }) => formatDate(row.getValue('updated_at')), + }, + ]} + params={[ + { + key: 'status', + placeholder: t('status.0'), + options: [ + { + label: t('close'), + value: '4', + }, + ], + }, + ]} + request={async (pagination, filters) => { + const { data } = await getTicketList({ + ...pagination, + ...filters, + }); + return { + list: data.data?.list || [], + total: data.data?.total || 0, + }; + }} + actions={{ + render(row) { + if (row.status !== 4) { + return [ + , + + {t('close')} + + } + title={t('confirmClose')} + description={t('closeWarning')} + onConfirm={async () => { + await updateTicketStatus({ + id: row.id, + status: 4, + }); + toast.success(t('closeSuccess')); + ref.current?.refresh(); + }} + cancelText={t('cancel')} + confirmText={t('confirm')} + />, + ]; + } + return [ + , + ]; + }, + }} + /> + + { + if (!open) setTicketId(null); + }} + > + + + {ticket?.title} + + +
+
+
+
+
提现金额:{ticket?.title?.split('-')[1]}
+
提现方式:{ticket?.description?.split('-')[0]}
+ {ticket?.description?.split('-')[1].includes('data:image') ? ( +
+
收款码:
+ +
+ ) : ( +
提现地址:{ticket?.description?.split('-')[1]}
+ )} +
+
+
+
+
+
+
+ + ); +} diff --git a/apps/admin/config/navs.ts b/apps/admin/config/navs.ts index 2798654..7086348 100644 --- a/apps/admin/config/navs.ts +++ b/apps/admin/config/navs.ts @@ -104,6 +104,11 @@ export const navs = [ url: '/dashboard/ticket', icon: 'flat-color-icons:collaboration', }, + { + title: 'Withdraw Ticket Management', + url: '/dashboard/withdraw-ticket', + icon: 'flat-color-icons:collaboration', + }, { title: 'Document Management', url: '/dashboard/document', diff --git a/apps/admin/locales/en-US/menu.json b/apps/admin/locales/en-US/menu.json index 78eb51c..5f03424 100644 --- a/apps/admin/locales/en-US/menu.json +++ b/apps/admin/locales/en-US/menu.json @@ -23,5 +23,6 @@ "Ticket Management": "Ticket Management", "User": "User", "User Detail": "User Detail", - "User Management": "User Management" + "User Management": "User Management", + "Withdraw Ticket Management": "Withdraw Management" } diff --git a/apps/admin/locales/zh-CN/menu.json b/apps/admin/locales/zh-CN/menu.json index b5478b4..e82d131 100644 --- a/apps/admin/locales/zh-CN/menu.json +++ b/apps/admin/locales/zh-CN/menu.json @@ -23,5 +23,6 @@ "Ticket Management": "工单管理", "User": "用户", "User Detail": "用户详情", - "User Management": "用户管理" + "User Management": "用户管理", + "Withdraw Ticket Management": "提现管理" } diff --git a/apps/admin/services/admin/typings.d.ts b/apps/admin/services/admin/typings.d.ts index c779294..958ecdc 100644 --- a/apps/admin/services/admin/typings.d.ts +++ b/apps/admin/services/admin/typings.d.ts @@ -1878,6 +1878,7 @@ declare namespace API { id: number; avatar: string; balance: number; + remark: string; commission: number; gift_amount: number; telegram: number; diff --git a/apps/user/app/(main)/(content)/(user)/ticket/page.tsx b/apps/user/app/(main)/(content)/(user)/ticket/page.tsx index 1c81f2c..8e2bfbe 100644 --- a/apps/user/app/(main)/(content)/(user)/ticket/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/ticket/page.tsx @@ -46,10 +46,14 @@ import { Icon } from '@workspace/airo-ui/custom-components/icon'; import { cn } from '@workspace/airo-ui/lib/utils'; import { formatDate } from '@workspace/airo-ui/utils'; import { useTranslations } from 'next-intl'; +import Image from 'next/image'; import NextImage from 'next/legacy/image'; import { useEffect, useRef, useState } from 'react'; import { toast } from 'sonner'; +import { PhotoProvider, PhotoView } from 'react-photo-view'; +import 'react-photo-view/dist/react-photo-view.css'; + export default function Page() { const t = useTranslations('ticket'); @@ -178,13 +182,13 @@ export default function Page() { {item.status !== 4 ? ( <> - setTicketId(item.id)} - className={'hidden sm:flex'} - > - {t('reply')} - + {item.issue_type === 0 ? ( + setTicketId(item.id)} + className={'hidden sm:flex'} + /> + ) : null}
  • {t('description')} - +
  • {t('updatedAt')} @@ -305,6 +330,7 @@ export default function Page() { from: 'User', type: 1, content: message, + issue_type: 0, }); refetchTicket(); setMessage(''); diff --git a/apps/user/app/(main)/(content)/(user)/wallet/components/Withdraw/WithdrawDialog.tsx b/apps/user/app/(main)/(content)/(user)/wallet/components/Withdraw/WithdrawDialog.tsx new file mode 100644 index 0000000..f1051b9 --- /dev/null +++ b/apps/user/app/(main)/(content)/(user)/wallet/components/Withdraw/WithdrawDialog.tsx @@ -0,0 +1,372 @@ +import { zodResolver } from '@hookform/resolvers/zod'; +import { QueryClient, QueryClientProvider, useMutation } from '@tanstack/react-query'; +import { AiroButton } from '@workspace/airo-ui/components/AiroButton'; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogTrigger, +} from '@workspace/airo-ui/components/dialog'; +import { + Form, + FormControl, + FormField, + FormItem, + FormMessage, +} from '@workspace/airo-ui/components/form'; +import { Input } from '@workspace/airo-ui/components/input'; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@workspace/airo-ui/components/select'; +import { Icon } from '@workspace/airo-ui/custom-components/icon'; +import { UploadImage } from '@workspace/airo-ui/custom-components/upload-image'; +import { FormLabel } from '@workspace/ui/components/form'; +import { useRef, useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; + +// 创建一个 QueryClient 实例 +const queryClient = new QueryClient(); + +// 引入实际的 createUserTicket 服务 +import Modal from '@/components/Modal'; +import useGlobalStore from '@/config/use-global'; +import { createUserTicket, getUserTicketList } from '@/services/user/ticket'; +import { EnhancedInput } from '@workspace/airo-ui/custom-components/enhanced-input'; +import { Upload } from 'lucide-react'; +import { toast } from 'sonner'; + +interface WalletDialogProps { + commission: number; +} + +const WalletDialog: WalletDialogProps = (props) => { + const [open, setOpen] = useState(false); + const [pendingData, setPendingData] = useState(null); + const ModalRef = useRef(null); + const ErrorModalRef = useRef(null); + + const { common } = useGlobalStore(); + const { currency } = common; + + // 定义支持的账户类型 + const ACCOUNT_TYPE = ['USDT', '微信', '支付宝'] as const; + + // 根据账户类型定义 Zod 验证模式 + const formSchema = z + .object({ + type: z.enum(ACCOUNT_TYPE, { + required_error: '请选择一个提现方式', + }), + account: z.string().optional(), // 账号字段变为可选 + money: z + .string() + .min(1, '提现金额不能为空') + .regex(/^\d+(\.\d+)?$/, '请输入有效的金额') + .refine((value) => { + const amount = parseFloat(value); + return !isNaN(amount) && amount > 0; + }, '提现金额必须大于0'), + avatar: z.string().optional(), // 图片字段变为可选 + }) + .superRefine((data, ctx) => { + // 根据提现方式进行条件验证 + if (data.type === 'USDT') { + if (!data.account || data.account.trim().length === 0) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: 'USDT 账号不能为空', + path: ['account'], + }); + } + } else if (data.type === '微信' || data.type === '支付宝') { + if (!data.avatar) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: '请上传图片', + path: ['avatar'], + }); + } + } + }); + + const form = useForm({ + resolver: zodResolver(formSchema), + defaultValues: { + type: ACCOUNT_TYPE[0], + account: '', + money: '', + avatar: undefined, + }, + }); + + // 使用 useMutation 来处理表单提交 + const mutation = useMutation({ + mutationFn: async (data) => { + // 构建 title 和 description + const title = `提现金额-${data.money}`; + let description = ''; + if (data.type === 'USDT') { + description = `${data.type}-${data.account || ''}`; + } else if (data.type === '微信' || data.type === '支付宝') { + description = `${data.type}-${data.avatar || ''}`; + } + return createUserTicket({ title, description, issue_type: 1 }); + }, + onSuccess: (data) => { + console.log('提交成功:', data); + toast.success('提交成功,请耐心等待'); + // 成功后关闭弹窗并重置表单 + setOpen(false); + form.reset(); + setPendingData(null); + }, + onError: (error) => { + console.error('提交失败:', error); + // 可以在这里显示一个错误提示 + }, + }); + + const currentType = form.watch('type'); + const money = form.watch('money'); + const account = form.watch('account'); + + // 处理表单提交,先展示确认弹窗或错误弹窗 + const handleFormSubmit = async (data) => { + // 检查提现佣金和当前佣金,如果超过做提示 + const moneyValue = parseFloat(data.money); + if (moneyValue > parseFloat((props.commission / 100).toFixed(2))) { + toast.error('提现金额超过佣金总额'); + return; + } + + // 检查是否有待处理的工单,如果超过一个则返回 + const { data: ticketData } = await getUserTicketList({ + page: 1, + size: 1, + issue_type: 1, + }); + if (ticketData?.list?.length > 1) { + toast.info('已经存在待处理提现,请耐心等待'); + return; + } + + if (moneyValue < 200) { + if (ErrorModalRef.current) { + ErrorModalRef.current.show(); + } + return; + } + + // 将数据存储到 state 中,供确认弹窗使用 + setPendingData(data); + if (ModalRef.current) { + ModalRef.current.show(); + } + }; + + // 弹窗确认后执行的提交逻辑 + const handleModalConfirm = () => { + if (pendingData) { + mutation.mutate(pendingData); + } + }; + + const loading = mutation.isPending; + + // 根据提现方式动态生成弹窗描述 + const getModalDescription = () => { + if (currentType === 'USDT') { + const accountInfo = account || '未知地址'; + return `请确认您的提现地址及金额无误,您将提现${money}RMB至${accountInfo}地址账号。`; + } else { + return `请确认您的收款码及金额无误,您将提现${money}RMB至对应收款码账户。`; + } + }; + + return ( + <> + { + setOpen(newOpen); + if (!newOpen) { + form.reset(); + } + }} + > + + + 提现 + + + + + 佣金提现 + +
    +
    + {currentType === 'USDT' + ? '将佣金提现至您的个人数字钱包,无手续费' + : '该提现方式需10%手续费,该费率由支付平台收取'} +
    +
    + + {/* 提现方式选择 */} + ( + + 提现方式 + + + + + + )} + /> + + {/* 提现账号输入(仅当选择USDT时显示) */} + {currentType === 'USDT' && ( + ( + + 提现地址 + + + + + + )} + /> + )} + + {/* 提现金额输入 */} + ( + + 提现金额 + + { + field.onChange(String(value)); + }} + prefix={currency.currency_symbol} + suffix={currency.currency_unit} + /> + + + + )} + /> + + {/* 图片上传(仅当选择微信或支付宝时显示) */} + {(currentType === '微信' || currentType === '支付宝') && ( + ( + + 收款码 + + field.onChange(value)} + > + 点击上传收款码 + + + + + + )} + /> + )} + + {/* 按钮区域 */} +
    + + {loading && } + 确定 + +
    + + +
    +
    +
    + + {}} + /> + + ); +}; + +// 导出一个包装了 QueryClientProvider 的组件,以确保 useMutation 可用 +const WrappedWalletDialog = (props) => ( + + + +); + +export default WrappedWalletDialog; diff --git a/apps/user/app/(main)/(content)/(user)/wallet/page.tsx b/apps/user/app/(main)/(content)/(user)/wallet/page.tsx index b4c52bd..2bc02a2 100644 --- a/apps/user/app/(main)/(content)/(user)/wallet/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/wallet/page.tsx @@ -10,6 +10,7 @@ import Recharge from '@/components/subscribe/recharge'; import Link from 'next/link'; import Table from './components/Table/Table'; import WalletDialog from './components/WalletDialog/WalletDialog'; +import WhithdrawDialog from './components/Withdraw/WithdrawDialog'; export default function Page() { const t = useTranslations('wallet'); @@ -50,7 +51,10 @@ export default function Page() {

    -

    {t('commission')}

    +

    + {t('commission')} + +

    diff --git a/apps/user/components/CopyShortenedLink/CopyShortenedLink.tsx b/apps/user/components/CopyShortenedLink/CopyShortenedLink.tsx index dada304..40fb3b6 100644 --- a/apps/user/components/CopyShortenedLink/CopyShortenedLink.tsx +++ b/apps/user/components/CopyShortenedLink/CopyShortenedLink.tsx @@ -6,6 +6,7 @@ import useGlobalStore from '@/config/use-global'; import { useQuery } from '@tanstack/react-query'; import { Button } from '@workspace/airo-ui/components/button'; import { cn } from '@workspace/airo-ui/lib/utils'; +import { isBrowser } from '@workspace/airo-ui/utils'; import { useTranslations } from 'next-intl'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import { toast } from 'sonner'; @@ -15,7 +16,7 @@ const CopyShortenedLink = ({ className }: { className?: string }) => { const { user } = useGlobalStore(); // 构建长链接,使用用户的唯一标识符作为查询键 - const target = `${location?.origin}/?invite=${user?.refer_code}`; + const target = isBrowser ? `${location?.origin}/?invite=${user?.refer_code}` : ''; const queryKey = ['short-url', user?.refer_code]; const { data: shortUrl } = useQuery({ @@ -35,10 +36,9 @@ const CopyShortenedLink = ({ className }: { className?: string }) => { // 关键步骤:解析 JSON 数据并返回 const json = await response.json(); - console.log('CopyShortened link', json); return json.link ?? null; }, - enabled: !!user?.refer_code, // 默认不自动执行 + enabled: !!(user?.refer_code && target), // 默认不自动执行 staleTime: Infinity, // 数据永不过期,除非手动失效 }); // 渲染组件 diff --git a/apps/user/components/SubscribePlan/PlanContent/index.tsx b/apps/user/components/SubscribePlan/PlanContent/index.tsx index 1409f00..dbae2bf 100644 --- a/apps/user/components/SubscribePlan/PlanContent/index.tsx +++ b/apps/user/components/SubscribePlan/PlanContent/index.tsx @@ -340,12 +340,12 @@ const TabContent: React.FC = ({ // 使用 useMemo 优化数据处理性能 const yearlyPlans: PlanProps[] = useMemo( - () => (subscribeData || []).map((item) => processPlanData(item, true)), + () => subscribeData?.map((item) => processPlanData(item, true)), [subscribeData], ); const monthlyPlans: PlanProps[] = useMemo( - () => (subscribeData || []).map((item) => processPlanData(item, false)), + () => subscribeData?.map((item) => processPlanData(item, false)), [subscribeData], ); diff --git a/apps/user/package.json b/apps/user/package.json index 0ad30c9..3fff0ea 100644 --- a/apps/user/package.json +++ b/apps/user/package.json @@ -42,6 +42,7 @@ "react": "^19.0.0", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^19.0.0", + "react-photo-view": "^1.2.7", "react-turnstile": "^1.1.4", "rtl-detect": "^1.1.2", "three": "^0.178.0", diff --git a/apps/user/services/user/typings.d.ts b/apps/user/services/user/typings.d.ts index d2e86c0..473dfa5 100644 --- a/apps/user/services/user/typings.d.ts +++ b/apps/user/services/user/typings.d.ts @@ -321,6 +321,7 @@ declare namespace API { size: number; status?: number; search?: string; + issue_type?: 0 | 1; }; type GetUserTicketListRequest = { diff --git a/bun.lock b/bun.lock index 798b226..9d7613f 100644 --- a/bun.lock +++ b/bun.lock @@ -80,6 +80,7 @@ "react": "^19.0.0", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^19.0.0", + "react-photo-view": "^1.2.7", "react-turnstile": "^1.1.4", "rtl-detect": "^1.1.2", "three": "^0.178.0", @@ -2687,6 +2688,8 @@ "react-markdown": ["react-markdown@9.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-xaijuJB0kzGiUdG7nc2MOMDUDBWPyGAjZtUrow9XxUeua8IqeP+VlIfAZ3bphpcLTnSZXz6z9jcVC/TCwbfgdw=="], + "react-photo-view": ["react-photo-view@1.2.7", "", { "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-MfOWVPxuibncRLaycZUNxqYU8D9IA+rbGDDaq6GM8RIoGJal592hEJoRAyRSI7ZxyyJNJTLMUWWL3UIXHJJOpw=="], + "react-reconciler": ["react-reconciler@0.31.0", "", { "dependencies": { "scheduler": "^0.25.0" }, "peerDependencies": { "react": "^19.0.0" } }, "sha512-7Ob7Z+URmesIsIVRjnLoDGwBEG/tVitidU0nMsqX/eeJaLY89RISO/10ERe0MqmzuKUUB1rmY+h1itMbUHg9BQ=="], "react-remove-scroll": ["react-remove-scroll@2.7.1", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-HpMh8+oahmIdOuS5aFKKY6Pyog+FNaZV/XyJOq7b4YFwsFHe5yYfdbIalI4k3vU2nSDql7YskmUseHsRrJqIPA=="], diff --git a/packages/airo-ui/src/custom-components/enhanced-input.tsx b/packages/airo-ui/src/custom-components/enhanced-input.tsx index 28693c4..981e987 100644 --- a/packages/airo-ui/src/custom-components/enhanced-input.tsx +++ b/packages/airo-ui/src/custom-components/enhanced-input.tsx @@ -148,7 +148,7 @@ export function EnhancedInput({ step={0.01} {...props} value={value} - className='block h-[44px] rounded-full border-none bg-white shadow-[inset_0_0_7.6px_0_rgba(0,0,0,0.25)]' + className='block h-[40px] rounded-full border-none bg-white shadow-[inset_0_0_7.6px_0_rgba(0,0,0,0.25)]' onChange={handleChange} onBlur={handleBlur} /> diff --git a/packages/ui/src/components/popover.tsx b/packages/ui/src/components/popover.tsx index 6f7fd84..0197fe4 100644 --- a/packages/ui/src/components/popover.tsx +++ b/packages/ui/src/components/popover.tsx @@ -10,6 +10,7 @@ const Popover = PopoverPrimitive.Root; const PopoverTrigger = PopoverPrimitive.Trigger; const PopoverAnchor = PopoverPrimitive.Anchor; +const PopoverClose = PopoverPrimitive.Close; const PopoverContent = React.forwardRef< React.ElementRef, @@ -30,4 +31,4 @@ const PopoverContent = React.forwardRef< )); PopoverContent.displayName = PopoverPrimitive.Content.displayName; -export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger }; +export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger }; diff --git a/scripts/publish-dev.sh b/scripts/publish-dev.sh index 576df9b..dae8786 100755 --- a/scripts/publish-dev.sh +++ b/scripts/publish-dev.sh @@ -32,7 +32,6 @@ for ITEM in "${PROJECTS[@]}"; do cp -r $PROJECT_PATH/.next/standalone/. $PROJECT_BUILD_DIR/ cp -r $PROJECT_PATH/.next/static $PROJECT_BUILD_DIR/$PROJECT_PATH/.next/ cp -r $PROJECT_PATH/public $PROJECT_BUILD_DIR/$PROJECT_PATH/ - cp -r $PROJECT_PATH/.env.template $PROJECT_BUILD_DIR/$PROJECT_PATH/.env.template cp -r $PROJECT_PATH/.env $PROJECT_BUILD_DIR/$PROJECT_PATH/.env # Generate ecosystem.config.js for the project diff --git a/scripts/publish.sh b/scripts/publish.sh index 09e57e9..eae43c4 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -32,7 +32,6 @@ for ITEM in "${PROJECTS[@]}"; do cp -r $PROJECT_PATH/.next/standalone/. $PROJECT_BUILD_DIR/ cp -r $PROJECT_PATH/.next/static $PROJECT_BUILD_DIR/$PROJECT_PATH/.next/ cp -r $PROJECT_PATH/public $PROJECT_BUILD_DIR/$PROJECT_PATH/ - cp -r $PROJECT_PATH/.env.template $PROJECT_BUILD_DIR/$PROJECT_PATH/.env.template cp -f $PROJECT_PATH/.env.prod $PROJECT_BUILD_DIR/$PROJECT_PATH/.env # Generate ecosystem.config.js for the project