feat: 修改以来地址
This commit is contained in:
parent
01ac12c171
commit
c8bf1d484e
@ -3,7 +3,7 @@ NEXT_PUBLIC_DEFAULT_LANGUAGE=en-US
|
||||
|
||||
# Site URL and API URL
|
||||
NEXT_PUBLIC_SITE_URL=https://user.ppanel.dev
|
||||
NEXT_PUBLIC_API_URL=https://api.ppanel.dev
|
||||
NEXT_PUBLIC_API_URL=https://api.kxsw.us
|
||||
NEXT_PUBLIC_CDN_URL=https://cdn.jsdelivr.net
|
||||
|
||||
# Home Page Settings
|
||||
|
||||
@ -6,7 +6,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
import { useImperativeHandle, useState } from 'react';
|
||||
|
||||
export interface PopupData {
|
||||
|
||||
@ -7,15 +7,15 @@ import ResetTraffic from '@/components/subscribe/reset-traffic';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { queryUserSubscribe, resetUserSubscribeToken } from '@/services/user/user';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card } from '@workspace/ui/components/card';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card } from '@workspace/airo-ui/components/card';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@workspace/ui/components/select';
|
||||
} from '@workspace/airo-ui/components/select';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Link from 'next/link';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
@ -32,7 +32,6 @@ import {
|
||||
import { Empty } from '@/components/empty';
|
||||
import SvgIcon from '@/components/SvgIcon';
|
||||
import { queryAnnouncement } from '@/services/user/announcement';
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@workspace/airo-ui/components/popover';
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
@ -43,9 +42,10 @@ import {
|
||||
AlertDialogHeader,
|
||||
AlertDialogTitle,
|
||||
AlertDialogTrigger,
|
||||
} from '@workspace/ui/components/alert-dialog';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import { differenceInDays, formatDate } from '@workspace/ui/utils';
|
||||
} from '@workspace/airo-ui/components/alert-dialog';
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@workspace/airo-ui/components/popover';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/airo-ui/components/tabs';
|
||||
import { differenceInDays, formatDate } from '@workspace/airo-ui/utils';
|
||||
import { QRCodeCanvas } from 'qrcode.react';
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { motion } from 'framer-motion';
|
||||
|
||||
export const CloseIcon = ({ className }: { className?: string }) => {
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
|
||||
import { queryDocumentDetail } from '@/services/user/document';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Avatar, AvatarFallback } from '@workspace/ui/components/avatar';
|
||||
import { buttonVariants } from '@workspace/ui/components/button';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { useOutsideClick } from '@workspace/ui/hooks/use-outside-click';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
import { Avatar, AvatarFallback } from '@workspace/airo-ui/components/avatar';
|
||||
import { buttonVariants } from '@workspace/airo-ui/components/button';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
import { useOutsideClick } from '@workspace/airo-ui/hooks/use-outside-click';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { RefObject, useEffect, useId, useRef, useState } from 'react';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import { queryDocumentList } from '@/services/user/document';
|
||||
import { getTutorialList } from '@/utils/tutorial';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@workspace/airo-ui/components/tabs';
|
||||
import { useLocale, useTranslations } from 'next-intl';
|
||||
import { TutorialButton } from './tutorial-button';
|
||||
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
|
||||
import { getTutorial } from '@/utils/tutorial';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@workspace/ui/components/avatar';
|
||||
import { buttonVariants } from '@workspace/ui/components/button';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { useOutsideClick } from '@workspace/ui/hooks/use-outside-click';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@workspace/airo-ui/components/avatar';
|
||||
import { buttonVariants } from '@workspace/airo-ui/components/button';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
import { useOutsideClick } from '@workspace/airo-ui/hooks/use-outside-click';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { AnimatePresence, motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { RefObject, useEffect, useId, useRef, useState } from 'react';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import Announcement from '@/components/announcement';
|
||||
import LanguageSwitch from '@/components/language-switch';
|
||||
// import LanguageSwitch from '@/components/language-switch';
|
||||
import { SidebarInset, SidebarProvider } from '@workspace/airo-ui/components/sidebar';
|
||||
import { cookies } from 'next/headers';
|
||||
import { Header } from './Header';
|
||||
@ -13,7 +13,7 @@ export default async function DashboardLayout({ children }: { children: React.Re
|
||||
<SidebarProvider className='' defaultOpen={defaultOpen}>
|
||||
<SidebarLeft className='w-[288px] border-r-0 bg-transparent lg:flex' />
|
||||
<SidebarInset className='relative flex-grow overflow-hidden'>
|
||||
<LanguageSwitch />
|
||||
{/*<LanguageSwitch />*/}
|
||||
<div className='h-[calc(100vh-56px)] flex-grow gap-4 overflow-auto p-4'>
|
||||
<Header />
|
||||
{children}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Dialog, DialogContent } from '@workspace/airo-ui/components/dialog';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { forwardRef, useImperativeHandle, useState } from 'react';
|
||||
|
||||
@ -4,9 +4,9 @@ import { Display } from '@/components/display';
|
||||
import { Empty } from '@/components/empty';
|
||||
import { ProList, ProListActions } from '@/components/pro-list';
|
||||
import { closeOrder, queryOrderList } from '@/services/user/order';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card, CardContent } from '@workspace/ui/components/card';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card, CardContent } from '@workspace/airo-ui/components/card';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRef } from 'react';
|
||||
import OrderDetailDialog from './components/OrderDetailDialog';
|
||||
|
||||
@ -8,18 +8,18 @@ import useGlobalStore from '@/config/use-global';
|
||||
import { queryOrderDetail } from '@/services/user/order';
|
||||
import { purchaseCheckout } from '@/services/user/portal';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Badge } from '@workspace/ui/components/badge';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Badge } from '@workspace/airo-ui/components/badge';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '@workspace/ui/components/card';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
} from '@workspace/airo-ui/components/card';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useCountDown } from 'ahooks';
|
||||
import { addMinutes, format } from 'date-fns';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
@ -2,10 +2,16 @@
|
||||
|
||||
import { updateUserPassword } from '@/services/user/user';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card } from '@workspace/ui/components/card';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card } from '@workspace/airo-ui/components/card';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
@ -3,10 +3,16 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { updateUserNotify } from '@/services/user/user';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card } from '@workspace/ui/components/card';
|
||||
import { Form, FormControl, FormField, FormItem, FormLabel } from '@workspace/ui/components/form';
|
||||
import { Switch } from '@workspace/ui/components/switch';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card } from '@workspace/airo-ui/components/card';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Switch } from '@workspace/airo-ui/components/switch';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
@ -4,18 +4,24 @@ import SendCode from '@/app/auth/send-code';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { bindOAuth, unbindOAuth, updateBindEmail, updateBindMobile } from '@/services/user/user';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card } from '@workspace/ui/components/card';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card } from '@workspace/airo-ui/components/card';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@workspace/ui/components/dialog';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/ui/custom-components/area-code-select';
|
||||
} 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 { AreaCodeSelect } from '@workspace/airo-ui/custom-components/area-code-select';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { Display } from '@/components/display';
|
||||
import Recharge from '@/components/subscribe/recharge';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@workspace/ui/components/card';
|
||||
import { Sidebar, SidebarContent } from '@workspace/ui/components/sidebar';
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@workspace/ui/components/tooltip';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { isBrowser } from '@workspace/ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
export function SidebarRight({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
||||
const { user } = useGlobalStore();
|
||||
const t = useTranslations('layout');
|
||||
|
||||
return (
|
||||
<Sidebar collapsible='none' side='right' {...props}>
|
||||
<SidebarContent>
|
||||
<Card>
|
||||
<CardHeader className='flex flex-row items-center justify-between space-y-0 p-3 pb-2'>
|
||||
<CardTitle className='text-sm font-medium'>{t('accountBalance')}</CardTitle>
|
||||
<Recharge variant='link' className='p-0' />
|
||||
</CardHeader>
|
||||
<CardContent className='p-3 text-2xl font-bold'>
|
||||
<Display type='currency' value={user?.balance} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card>
|
||||
<CardHeader className='space-y-0 p-3 pb-2'>
|
||||
<CardTitle className='text-sm font-medium'>{t('giftAmount')}</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className='p-3 text-2xl font-bold'>
|
||||
<Display type='currency' value={user?.gift_amount} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card>
|
||||
<CardHeader className='space-y-0 p-3 pb-2'>
|
||||
<CardTitle className='text-sm font-medium'>{t('commission')}</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className='p-3 text-2xl font-bold'>
|
||||
<Display type='currency' value={user?.commission} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
{user?.refer_code && (
|
||||
<Card>
|
||||
<CardHeader className='flex flex-row items-center justify-between space-y-0 p-3 pb-2'>
|
||||
<CardTitle className='text-sm font-medium'>{t('inviteCode')}</CardTitle>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span>
|
||||
<CopyToClipboard
|
||||
text={`${isBrowser() && location?.origin}/auth?invite=${user?.refer_code}`}
|
||||
onCopy={(text, result) => {
|
||||
if (result) {
|
||||
toast.success(t('copySuccess'));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button variant='ghost' className='size-5 p-0'>
|
||||
<Icon icon='mdi:content-copy' className='text-primary text-2xl' />
|
||||
</Button>
|
||||
</CopyToClipboard>
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{t('copyInviteLink')}</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</CardHeader>
|
||||
<CardContent className='truncate p-3 font-bold'>{user?.refer_code}</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
</SidebarContent>
|
||||
</Sidebar>
|
||||
);
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import { querySubscribeList } from '@/services/user/subscribe';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/airo-ui/components/tabs';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useMemo, useRef, useState } from 'react';
|
||||
|
||||
@ -10,7 +10,7 @@ import { LoginDialogProvider } from '@/app/auth/LoginDialogContext';
|
||||
import { TabContent } from '@/components/main/OfferDialog/TabContent';
|
||||
import { ProcessedPlanData } from '@/components/main/OfferDialog/types';
|
||||
import Purchase from '@/components/subscribe/purchase';
|
||||
import { unitConversion } from '@workspace/ui/utils';
|
||||
import { unitConversion } from '@workspace/airo-ui/utils';
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations('subscribe');
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
updateUserTicketStatus,
|
||||
} from '@/services/user/ticket';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
@ -18,7 +18,7 @@ import {
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '@workspace/ui/components/card';
|
||||
} from '@workspace/airo-ui/components/card';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@ -27,7 +27,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@workspace/ui/components/dialog';
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import {
|
||||
Drawer,
|
||||
DrawerContent,
|
||||
@ -35,15 +35,15 @@ import {
|
||||
DrawerFooter,
|
||||
DrawerHeader,
|
||||
DrawerTitle,
|
||||
} from '@workspace/ui/components/drawer';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Label } from '@workspace/ui/components/label';
|
||||
import { ScrollArea } from '@workspace/ui/components/scroll-area';
|
||||
import { Textarea } from '@workspace/ui/components/textarea';
|
||||
import { ConfirmButton } from '@workspace/ui/custom-components/confirm-button';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
} from '@workspace/airo-ui/components/drawer';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { Label } from '@workspace/airo-ui/components/label';
|
||||
import { ScrollArea } from '@workspace/airo-ui/components/scroll-area';
|
||||
import { Textarea } from '@workspace/airo-ui/components/textarea';
|
||||
import { ConfirmButton } from '@workspace/airo-ui/custom-components/confirm-button';
|
||||
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 NextImage from 'next/legacy/image';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
@ -4,15 +4,15 @@ import { Display } from '@/components/display';
|
||||
import { ProList, ProListActions } from '@/components/pro-list';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { queryUserBalanceLog } from '@/services/user/user';
|
||||
import { Card, CardContent } from '@workspace/ui/components/card';
|
||||
import { Card, CardContent } from '@workspace/airo-ui/components/card';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRef } from 'react';
|
||||
|
||||
import { Empty } from '@/components/empty';
|
||||
import Recharge from '@/components/subscribe/recharge';
|
||||
import SvgIcon from '@/components/SvgIcon';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import Link from 'next/link';
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { getPrivacyPolicy } from '@/services/common/common';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
|
||||
export default async function Page() {
|
||||
const { data } = await getPrivacyPolicy();
|
||||
|
||||
@ -8,12 +8,12 @@ import PaymentMethods from '@/components/subscribe/payment-methods';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { prePurchaseOrder, purchase } from '@/services/user/portal';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card, CardContent, CardHeader } from '@workspace/ui/components/card';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { EnhancedInput } from '@workspace/ui/custom-components/enhanced-input';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card, CardContent, CardHeader } from '@workspace/airo-ui/components/card';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { EnhancedInput } from '@workspace/airo-ui/custom-components/enhanced-input';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { LoaderCircle } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
@ -8,18 +8,18 @@ import useGlobalStore from '@/config/use-global';
|
||||
import { purchaseCheckout, queryPurchaseOrder } from '@/services/user/portal';
|
||||
import { setAuthorization } from '@/utils/common';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Badge } from '@workspace/ui/components/badge';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Badge } from '@workspace/airo-ui/components/badge';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '@workspace/ui/components/card';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
} from '@workspace/airo-ui/components/card';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useCountDown } from 'ahooks';
|
||||
import { addMinutes, format } from 'date-fns';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { getTos } from '@/services/common/common';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
|
||||
export default async function Page() {
|
||||
const { data } = await getTos();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
import EmailAuthForm from '@/app/auth/email/auth-form';
|
||||
import CloseSvg from '@/components/CustomIcon/icons/close.svg';
|
||||
import { Dialog, DialogContent, DialogTitle } from '@workspace/ui/components/dialog';
|
||||
import { Dialog, DialogContent, DialogTitle } from '@workspace/airo-ui/components/dialog';
|
||||
import Image from 'next/image';
|
||||
import {
|
||||
createContext,
|
||||
|
||||
@ -5,8 +5,8 @@ import LanguageSwitch from '@/components/language-switch';
|
||||
import ThemeSwitch from '@/components/theme-switch';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import LoginLottie from '@workspace/ui/lotties/login.json';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@workspace/airo-ui/components/tabs';
|
||||
import LoginLottie from '@workspace/airo-ui/lotties/login.json';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Image from 'next/legacy/image';
|
||||
import Link from 'next/link';
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Dispatch, SetStateAction, useRef } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Dispatch, SetStateAction, useRef } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Dispatch, SetStateAction, useRef } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/ui/custom-components/area-code-select';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/airo-ui/custom-components/area-code-select';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Dispatch, SetStateAction, useRef, useState } from 'react';
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/ui/custom-components/area-code-select';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/airo-ui/custom-components/area-code-select';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Dispatch, SetStateAction, useRef } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@workspace/ui/components/form';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/ui/custom-components/area-code-select';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormMessage,
|
||||
} from '@workspace/airo-ui/components/form';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { AreaCodeSelect } from '@workspace/airo-ui/custom-components/area-code-select';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Dispatch, SetStateAction, useRef, useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { sendEmailCode, sendSmsCode } from '@/services/common/common';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { useCountDown } from 'ahooks';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import Providers from '@/components/providers';
|
||||
import { getGlobalConfig } from '@/services/common/common';
|
||||
import { queryUserInfo } from '@/services/user/user';
|
||||
import { Toaster } from '@workspace/ui/components/sonner';
|
||||
import '@workspace/ui/globals.css';
|
||||
import { getLangDir } from '@workspace/ui/hooks/use-lang-dir';
|
||||
import { Toaster } from '@workspace/airo-ui/components/sonner';
|
||||
import '@workspace/airo-ui/globals.css';
|
||||
import { getLangDir } from '@workspace/airo-ui/hooks/use-lang-dir';
|
||||
import { NextIntlClientProvider } from 'next-intl';
|
||||
import { getLocale, getMessages } from 'next-intl/server';
|
||||
import { PublicEnvScript } from 'next-runtime-env';
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
"components": "@/components",
|
||||
"hooks": "@/hooks",
|
||||
"lib": "@/lib",
|
||||
"utils": "@workspace/ui/lib/utils",
|
||||
"ui": "@workspace/ui/components"
|
||||
"utils": "@workspace/airo-ui/lib/utils",
|
||||
"ui": "@workspace/airo-ui/components"
|
||||
},
|
||||
"iconLibrary": "lucide",
|
||||
"rsc": true,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { buttonVariants } from '@workspace/ui/components/button';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { buttonVariants } from '@workspace/airo-ui/components/button';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Image from 'next/legacy/image';
|
||||
import Link from 'next/link';
|
||||
|
||||
@ -8,8 +8,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { ProList } from '@workspace/ui/custom-components/pro-list/pro-list';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
import { ProList } from '@workspace/airo-ui/custom-components/pro-list/pro-list';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useImperativeHandle, useState } from 'react';
|
||||
|
||||
|
||||
@ -10,10 +10,10 @@ import SvgIcon from '@/components/SvgIcon';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { queryUserAffiliate, queryUserAffiliateList } from '@/services/user/user';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card, CardContent } from '@workspace/ui/components/card';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { formatDate } from '@workspace/ui/utils';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card, CardContent } from '@workspace/airo-ui/components/card';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRef, useState } from 'react';
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
||||
|
||||
@ -5,7 +5,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { Markdown } from '@workspace/ui/custom-components/markdown';
|
||||
import { Markdown } from '@workspace/airo-ui/custom-components/markdown';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
export default async function Announcement({
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { oAuthLogin } from '@/services/common/oauth';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
|
||||
const icons = {
|
||||
apple: 'uil:apple',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { formatBytes, unitConversion } from '@workspace/ui/utils';
|
||||
import { formatBytes, unitConversion } from '@workspace/airo-ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
type DisplayType = 'currency' | 'traffic' | 'number' | 'trafficSpeed';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { default as _Empty } from '@workspace/ui/custom-components/empty';
|
||||
import { default as _Empty } from '@workspace/airo-ui/custom-components/empty';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
|
||||
@ -10,8 +10,8 @@ import {
|
||||
NEXT_PUBLIC_TWITTER_LINK,
|
||||
} from '@/config/constants';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Link from 'next/link';
|
||||
import { Fragment } from 'react';
|
||||
|
||||
@ -8,9 +8,9 @@ import {
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@workspace/ui/components/select';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { getCountry } from '@workspace/ui/utils';
|
||||
} from '@workspace/airo-ui/components/select';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { getCountry } from '@workspace/airo-ui/utils';
|
||||
import { useLocale } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { useRef } from 'react';
|
||||
import OfferDialog, { OfferDialogRef } from './OfferDialog/index';
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import CloseSvg from '@/components/CustomIcon/icons/close.svg';
|
||||
import { getSubscription } from '@/services/user/portal';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Dialog, DialogContent, DialogTitle } from '@workspace/ui/components/dialog';
|
||||
import { ScrollArea } from '@workspace/ui/components/scroll-area';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import { unitConversion } from '@workspace/ui/utils';
|
||||
import { Dialog, DialogContent, DialogTitle } from '@workspace/airo-ui/components/dialog';
|
||||
import { ScrollArea } from '@workspace/airo-ui/components/scroll-area';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/airo-ui/components/tabs';
|
||||
import { unitConversion } from '@workspace/airo-ui/utils';
|
||||
import Image from 'next/image';
|
||||
import {
|
||||
forwardRef,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
||||
import GlobalMapLottie from '@workspace/ui/lotties/global-map.json';
|
||||
import GlobalMapLottie from '@workspace/airo-ui/lotties/global-map.json';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
||||
import { HoverBorderGradient } from '@workspace/ui/components/hover-border-gradient';
|
||||
import { TextGenerateEffect } from '@workspace/ui/components/text-generate-effect';
|
||||
import NetworkSecurityLottie from '@workspace/ui/lotties/network-security.json';
|
||||
import { HoverBorderGradient } from '@workspace/airo-ui/components/hover-border-gradient';
|
||||
import { TextGenerateEffect } from '@workspace/airo-ui/components/text-generate-effect';
|
||||
import NetworkSecurityLottie from '@workspace/airo-ui/lotties/network-security.json';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Link from 'next/link';
|
||||
|
||||
@ -3,11 +3,11 @@
|
||||
import { Display } from '@/components/display';
|
||||
import { SubscribeDetail } from '@/components/subscribe/detail';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card, CardContent, CardFooter, CardHeader } from '@workspace/ui/components/card';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card, CardContent, CardFooter, CardHeader } from '@workspace/airo-ui/components/card';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Link from 'next/link';
|
||||
|
||||
@ -6,9 +6,9 @@ import {
|
||||
NEXT_PUBLIC_HOME_USER_COUNT,
|
||||
} from '@/config/constants';
|
||||
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
||||
import LocationsLittie from '@workspace/ui/lotties/locations.json';
|
||||
import ServersLottie from '@workspace/ui/lotties/servers.json';
|
||||
import UsersLottie from '@workspace/ui/lotties/users.json';
|
||||
import LocationsLittie from '@workspace/airo-ui/lotties/locations.json';
|
||||
import ServersLottie from '@workspace/airo-ui/lotties/servers.json';
|
||||
import UsersLottie from '@workspace/airo-ui/lotties/users.json';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
@ -12,9 +12,9 @@ import {
|
||||
StripeCardNumberElementOptions,
|
||||
StripeElementStyle,
|
||||
} from '@stripe/stripe-js';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Label } from '@workspace/ui/components/label';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { Label } from '@workspace/airo-ui/components/label';
|
||||
import { CheckCircle } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Display } from '@/components/display';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
interface SubscribeBillingProps {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { Input } from '@workspace/ui/components/input';
|
||||
import { Input } from '@workspace/airo-ui/components/input';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import React from 'react';
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { Badge } from '@workspace/ui/components/badge';
|
||||
import { Label } from '@workspace/ui/components/label';
|
||||
import { RadioGroup, RadioGroupItem } from '@workspace/ui/components/radio-group';
|
||||
import { Badge } from '@workspace/airo-ui/components/badge';
|
||||
import { Label } from '@workspace/airo-ui/components/label';
|
||||
import { RadioGroup, RadioGroupItem } from '@workspace/airo-ui/components/radio-group';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
import { getAvailablePaymentMethods } from '@/services/user/portal';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Label } from '@workspace/ui/components/label';
|
||||
import { RadioGroup, RadioGroupItem } from '@workspace/ui/components/radio-group';
|
||||
import { cn } from '@workspace/ui/lib/utils';
|
||||
import { Label } from '@workspace/airo-ui/components/label';
|
||||
import { RadioGroup, RadioGroupItem } from '@workspace/airo-ui/components/radio-group';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Image from 'next/image';
|
||||
import React, { memo } from 'react';
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { preCreateOrder, purchase } from '@/services/user/order';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/ui/components/tabs';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { Tabs, TabsList, TabsTrigger } from '@workspace/airo-ui/components/tabs';
|
||||
import { LoaderCircle } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { recharge } from '@/services/user/order';
|
||||
import { Button, ButtonProps } from '@workspace/ui/components/button';
|
||||
import { Button, ButtonProps } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@ -10,9 +10,9 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@workspace/ui/components/dialog';
|
||||
import { EnhancedInput } from '@workspace/ui/custom-components/enhanced-input';
|
||||
import { unitConversion } from '@workspace/ui/utils';
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { EnhancedInput } from '@workspace/airo-ui/custom-components/enhanced-input';
|
||||
import { unitConversion } from '@workspace/airo-ui/utils';
|
||||
import { LoaderCircle } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
@ -6,16 +6,16 @@ import PaymentMethods from '@/components/subscribe/payment-methods';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { preCreateOrder, renewal } from '@/services/user/order';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Card, CardContent } from '@workspace/ui/components/card';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import { Card, CardContent } from '@workspace/airo-ui/components/card';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@workspace/ui/components/dialog';
|
||||
import { Separator } from '@workspace/ui/components/separator';
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { Separator } from '@workspace/airo-ui/components/separator';
|
||||
import { LoaderCircle } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import { Display } from '@/components/display';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { resetTraffic } from '@/services/user/order';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@ -11,7 +11,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@workspace/ui/components/dialog';
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { LoaderCircle } from 'lucide-react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { preUnsubscribe, unsubscribe } from '@/services/user/user';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@ -12,7 +12,7 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from '@workspace/ui/components/dialog';
|
||||
} from '@workspace/airo-ui/components/dialog';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useState } from 'react';
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
|
||||
import { Button } from '@workspace/ui/components/button';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from '@workspace/ui/components/dropdown-menu';
|
||||
import MoonLottie from '@workspace/ui/lotties/moon.json';
|
||||
import SunLottie from '@workspace/ui/lotties/sun.json';
|
||||
} from '@workspace/airo-ui/components/dropdown-menu';
|
||||
import MoonLottie from '@workspace/airo-ui/lotties/moon.json';
|
||||
import SunLottie from '@workspace/airo-ui/lotties/sun.json';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
export default function ThemeSwitch() {
|
||||
|
||||
@ -3,16 +3,15 @@
|
||||
import SvgIcon from '@/components/SvgIcon.tsx';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { Logout } from '@/utils/common';
|
||||
import { useSidebar } from '@workspace/airo-ui/components/sidebar';
|
||||
import { useIsMobile } from '@workspace/airo-ui/hooks/use-mobile';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@workspace/ui/components/avatar';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@workspace/airo-ui/components/avatar';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from '@workspace/ui/components/dropdown-menu';
|
||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||
} from '@workspace/airo-ui/components/dropdown-menu';
|
||||
import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { useIsMobile } from '@workspace/airo-ui/hooks/use-mobile';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { usePathname, useRouter } from 'next/navigation';
|
||||
|
||||
@ -21,7 +20,7 @@ export function UserNav({ from = '' }: { from?: string }) {
|
||||
const { user, setUser } = useGlobalStore();
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const { toggleSidebar } = useSidebar();
|
||||
// const { toggleSidebar } = useSidebar();
|
||||
const isMobile = useIsMobile();
|
||||
if (user) {
|
||||
return (
|
||||
@ -98,7 +97,7 @@ export function UserNav({ from = '' }: { from?: string }) {
|
||||
data-active={pathname === item.url}
|
||||
onClick={() => {
|
||||
if (pathname === item.url) return;
|
||||
toggleSidebar();
|
||||
/* toggleSidebar();*/
|
||||
router.push(`${item.url}`);
|
||||
}}
|
||||
className='flex cursor-pointer items-center gap-3 rounded-full bg-white px-5 py-2 text-base font-medium focus:bg-[#0F2C53] focus:text-white data-[active=true]:bg-[#0F2C53] data-[active=true]:text-white md:text-xl'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { NEXT_PUBLIC_API_URL, NEXT_PUBLIC_SITE_URL } from '@/config/constants';
|
||||
import { queryUserInfo } from '@/services/user/user';
|
||||
import { extractDomain } from '@workspace/ui/utils';
|
||||
import { extractDomain } from '@workspace/airo-ui/utils';
|
||||
import { create } from 'zustand';
|
||||
|
||||
export interface GlobalStore {
|
||||
|
||||
@ -4,7 +4,7 @@ import createNextIntlPlugin from 'next-intl/plugin';
|
||||
const withNextIntl = createNextIntlPlugin('./locales/request.ts');
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
transpilePackages: ['@workspace/ui', '@workspace/airo-ui'],
|
||||
transpilePackages: ['@workspace/airo-ui'],
|
||||
output: 'standalone',
|
||||
typescript: {
|
||||
ignoreBuildErrors: true, // 禁用 TypeScript 构建时的类型检查
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
"@tanstack/react-query": "^5.63.0",
|
||||
"@tanstack/react-query-next-experimental": "^5.63.0",
|
||||
"@workspace/airo-ui": "workspace:*",
|
||||
"@workspace/ui": "workspace:*",
|
||||
"ahooks": "^3.8.4",
|
||||
"axios": "^1.7.9",
|
||||
"framer-motion": "^11.16.1",
|
||||
|
||||
@ -1 +1 @@
|
||||
export { default } from '@workspace/ui/postcss.config';
|
||||
export { default } from '@workspace/airo-ui/postcss.config';
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import baseConfig from '@workspace/ui/tailwind.config';
|
||||
import baseConfig from '@workspace/airo-ui/tailwind.config';
|
||||
|
||||
const config = {
|
||||
...baseConfig,
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./*"],
|
||||
"@workspace/ui/*": ["../../packages/ui/src/*"],
|
||||
"@workspace/airo-ui/*": ["../../packages/airo-ui/src/*"]
|
||||
},
|
||||
"plugins": [
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { locales, NEXT_PUBLIC_DEFAULT_LANGUAGE } from '@/config/constants';
|
||||
import { isBrowser } from '@workspace/ui/utils';
|
||||
import { isBrowser } from '@workspace/airo-ui/utils';
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
import Cookies from 'universal-cookie';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { NEXT_PUBLIC_API_URL, NEXT_PUBLIC_SITE_URL } from '@/config/constants';
|
||||
import { getTranslations } from '@/locales/utils';
|
||||
import { isBrowser } from '@workspace/ui/utils';
|
||||
import { isBrowser } from '@workspace/airo-ui/utils';
|
||||
import axios, { InternalAxiosRequestConfig } from 'axios';
|
||||
import { toast } from 'sonner';
|
||||
import { getAuthorization, Logout } from './common';
|
||||
|
||||
@ -16,7 +16,7 @@ import {
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@workspace/airo-ui/components/tooltip';
|
||||
import { useIsMobile } from '@workspace/airo-ui/hooks/use-mobile';
|
||||
import { useIsMobile } from '@workspace/airo-ui/hooks/use-mobile.tsx';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
|
||||
const SIDEBAR_COOKIE_NAME = 'sidebar:state';
|
||||
@ -53,7 +53,7 @@ function useSidebar() {
|
||||
const context = React.useContext(SidebarContext);
|
||||
// Optionally warn in development when using the safe fallback
|
||||
if (process.env.NODE_ENV !== 'production' && context === SAFE_SIDEBAR_CONTEXT) {
|
||||
// console.warn('useSidebar is used outside of a SidebarProvider. Falling back to no-op context.');
|
||||
console.warn('useSidebar is used outside of a SidebarProvider. Falling back to no-op context.');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user