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