Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ pnpm --filter=<path> -r add <package>
# add local
pnpm --filter=<path> -r --offline add <package>
# such as:
# pnpm --filter=providers/costcenter -r --offline add sealos-desktop-sdk
# pnpm --filter=desktop -r --offline add sealos-desktop-sdk
# pnpm --filter=providers/costcenter -r --offline add @labring/sealos-desktop-sdk
# pnpm --filter=desktop -r --offline add @labring/sealos-desktop-sdk
```

## how to build
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the
"react-draggable": "^4.4.5",
"react-i18next": "^12.2.0",
"sass": "^1.62.0",
"sealos-desktop-sdk": "^0.1.12",
"@labring/sealos-desktop-sdk": "^0.1.12",
"typescript": "5.0.4",
"zustand": "^4.3.7"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const nextConfig = {
},
swcMinify: isProduction,
output: 'standalone',
transpilePackages: ['@sealos/ui', 'sealos-desktop-sdk', '@sealos/driver'],
transpilePackages: ['@labring/sealos-ui', '@labring/sealos-desktop-sdk', '@labring/sealos-driver-sdk'],
experimental: {
outputFileTracingRoot: path.join(__dirname, '../')
}
Expand Down
12 changes: 6 additions & 6 deletions frontend/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"@kubernetes/client-node": "^0.18.1",
"@marsidev/react-turnstile": "^1.1.0",
"@prisma/client": "^5.10.2",
"@sealos/driver": "workspace:^",
"@sealos/gtm": "workspace:^",
"@sealos/shadcn-ui": "workspace:^",
"@sealos/shared": "workspace:^",
"@sealos/ui": "workspace:^",
"@labring/sealos-driver-sdk": "workspace:^",
"@labring/sealos-gtm-sdk": "workspace:^",
"@labring/sealos-shadcn-ui": "workspace:^",
"@labring/sealos-shared-sdk": "workspace:^",
"@labring/sealos-ui": "workspace:^",
"@tailwindcss/postcss": "^4.1.10",
"@tanstack/react-query": "^4.35.3",
"@umami/node": "^0.4.0",
Expand Down Expand Up @@ -86,7 +86,7 @@
"react-hook-form": "^7.46.2",
"react-i18next": "^14.1.2",
"sass": "^1.68.0",
"sealos-desktop-sdk": "workspace:*",
"@labring/sealos-desktop-sdk": "workspace:*",
"sharp": "^0.32.6",
"sonner": "^2.0.5",
"tailwindcss": "^4.1.12",
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/AppDock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { APPTYPE, TApp } from '@/types';
import { I18nCommonKey } from '@/types/i18next';
import { Box, Center, Flex, Image, useBreakpointValue } from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import { useMessage } from '@sealos/ui';
import { useMessage } from '@labring/sealos-ui';
import { MouseEvent, useContext, useMemo, useRef, useState } from 'react';
import { useContextMenu } from 'react-contexify';
import { ChevronDownIcon } from '../icons';
Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/LangSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
Text
} from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import { EVENT_NAME } from 'sealos-desktop-sdk';
import { masterApp } from 'sealos-desktop-sdk/master';
import { EVENT_NAME } from '@labring/sealos-desktop-sdk';
import { masterApp } from '@labring/sealos-desktop-sdk/master';
import { ExpanMoreIcon } from '../../../../packages/ui';
import { ROLE_LIST } from '@/types/team';
import { router } from 'next/client';
Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/SecondaryLinks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import { useQuery } from '@tanstack/react-query';
import { useMemo, useEffect } from 'react';
import { getAmount } from '@/api/auth';
import Decimal from 'decimal.js';
import { CurrencySymbol } from '@sealos/ui';
import { CurrencySymbol } from '@labring/sealos-ui';
import { formatMoney } from '@/utils/format';
import useSessionStore from '@/stores/session';
import { useSubscriptionStore } from '@/stores/subscription';
import { JoinDiscordPrompt } from '../account/JoinDiscordPrompt';
import { MoreHorizontal, Sparkles } from 'lucide-react';
import { BalancePopover, getPlanBackground } from '@/components/account/BalancePopover';
import { cn } from '@sealos/shadcn-ui';
import { cn } from '@labring/sealos-shadcn-ui';

const baseItemStyle = {
minW: '36px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ import {
useDisclosure,
VStack
} from '@chakra-ui/react';
import { Badge } from '@sealos/shadcn-ui/badge';
import { cn } from '@sealos/shadcn-ui';
import { InfoCircleIcon, LinkIcon, WarnTriangeIcon } from '@sealos/ui';
import { Badge } from '@labring/sealos-shadcn-ui/badge';
import { cn } from '@labring/sealos-shadcn-ui';
import { InfoCircleIcon, LinkIcon, WarnTriangeIcon } from '@labring/sealos-ui';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { useRouter } from 'next/router';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { getSmsBindCodeRequest, verifySmsBindRequest, mergeUserRequest } from '@
import { ApiResp } from '@/types';
import { MERGE_USER_READY } from '@/types/response/utils';
import { ProviderType } from 'prisma/global/generated/client';
import { WarnTriangeIcon } from '@sealos/ui';
import { WarnTriangeIcon } from '@labring/sealos-ui';
import { ValueOf } from '@/types';
import { I18nErrorKey } from '@/types/i18next';
import { USER_MERGE_STATUS } from '@/types/response/merge';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
useDisclosure,
VStack
} from '@chakra-ui/react';
import { CloseIcon, LeftArrowIcon, SettingIcon } from '@sealos/ui';
import { CloseIcon, LeftArrowIcon, SettingIcon } from '@labring/sealos-ui';
import { useQuery } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { useMemo, useState, ReactNode } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
Text,
VStack
} from '@chakra-ui/react';
import { WarnTriangeIcon } from '@sealos/ui';
import { WarnTriangeIcon } from '@labring/sealos-ui';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { useEffect, useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
DialogHeader,
DialogTitle,
DialogDescription
} from '@sealos/shadcn-ui';
import { Checkbox } from '@sealos/shadcn-ui';
import { Button } from '@sealos/shadcn-ui/button';
import { Badge } from '@sealos/shadcn-ui/badge';
} from '@labring/sealos-shadcn-ui';
import { Checkbox } from '@labring/sealos-shadcn-ui';
import { Button } from '@labring/sealos-shadcn-ui/button';
import { Badge } from '@labring/sealos-shadcn-ui/badge';
import { DeleteConfirmDialog } from './DeleteConfirmDialog';
import { BindDialog } from './BindDialog';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use client';

import React, { useEffect, useState } from 'react';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@sealos/shadcn-ui';
import { Button } from '@sealos/shadcn-ui/button';
import { Input } from '@sealos/shadcn-ui/input';
import { Label } from '@sealos/shadcn-ui/label';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@labring/sealos-shadcn-ui';
import { Button } from '@labring/sealos-shadcn-ui/button';
import { Input } from '@labring/sealos-shadcn-ui/input';
import { Label } from '@labring/sealos-shadcn-ui/label';
import { ProviderType } from '@/types/alert';
import { useCustomToast } from '@/hooks/useCustomToast';
import { useTranslation } from 'next-i18next';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';

import { TriangleAlert } from 'lucide-react';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@sealos/shadcn-ui';
import { Button } from '@sealos/shadcn-ui/button';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@labring/sealos-shadcn-ui';
import { Button } from '@labring/sealos-shadcn-ui/button';
import { useTranslation } from 'next-i18next';

interface DeleteConfirmDialogProps {
Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/account/BalancePopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import useSessionStore from '@/stores/session';
import { useSubscriptionStore } from '@/stores/subscription';
import { useMemo, useEffect } from 'react';
import { Sparkles } from 'lucide-react';
import { Tooltip, Button, cn, Separator, TooltipContent, TooltipTrigger } from '@sealos/shadcn-ui';
import { Tooltip, Button, cn, Separator, TooltipContent, TooltipTrigger } from '@labring/sealos-shadcn-ui';
import { WorkspaceSubscription } from '@/types/plan';
import Decimal from 'decimal.js';
import { useQuery } from '@tanstack/react-query';
import { getAmount } from '@/api/auth';
import { formatMoney } from '@/utils/format';
import { CurrencySymbol } from '@sealos/ui';
import { CurrencySymbol } from '@labring/sealos-ui';
import { useConfigStore } from '@/stores/config';
import { useTranslation } from 'next-i18next';

Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/account/GuideModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import { WindowSize } from '@/types';
import { Image } from '@chakra-ui/react';
import { useGuideModalStore } from '@/stores/guideModal';
import { track } from '@sealos/gtm';
import { track } from '@labring/sealos-gtm-sdk';

const GuideModal = () => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
MenuItem,
Icon
} from '@chakra-ui/react';
import { CloseIcon, RefreshIcon, useMessage, WarningIcon } from '@sealos/ui';
import { CloseIcon, RefreshIcon, useMessage, WarningIcon } from '@labring/sealos-ui';
import { useTranslation } from 'next-i18next';
import React, {
forwardRef,
Expand Down
6 changes: 3 additions & 3 deletions frontend/desktop/src/components/account/driver.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Flex, Text, Box, Center } from '@chakra-ui/react';
import { driver } from '@sealos/driver';
import { Config } from '@sealos/driver/src/config';
import { driver } from '@labring/sealos-driver-sdk';
import { Config } from '@labring/sealos-driver-sdk/src/config';
import { X } from 'lucide-react';
import { TFunction } from 'next-i18next';
import { useGuideModalStore } from '@/stores/guideModal';
import { track } from '@sealos/gtm';
import { track } from '@labring/sealos-gtm-sdk';

export let currentDriver: any = null;

Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import { useLanguageSwitcher } from '@/hooks/useLanguageSwitcher';
import { useGuideModalStore } from '@/stores/guideModal';
import SecondaryLinks from '../SecondaryLinks';
import { useSubscriptionStore } from '@/stores/subscription';
import { Badge } from '@sealos/shadcn-ui/badge';
import { cn } from '@sealos/shadcn-ui';
import { Badge } from '@labring/sealos-shadcn-ui/badge';
import { cn } from '@labring/sealos-shadcn-ui';
import { getPlanBackgroundClass } from '@/utils/styling';
import { AlertSettings } from './AlertSettings';
import { rotateKubeconfig } from '@/api/auth';
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Center, Fade, Flex, Text, useMediaQuery } from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import { CurrencySymbol } from '@sealos/ui';
import { CurrencySymbol } from '@labring/sealos-ui';

interface SaleBannerProps {
isBannerVisible: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import DOMPurify from 'dompurify';
import { useConfigStore } from '@/stores/config';
import useSessionStore from '@/stores/session';
import { useGuideModalStore } from '@/stores/guideModal';
import { track } from '@sealos/gtm';
import { track } from '@labring/sealos-gtm-sdk';

function GlobalAnnouncementComponent() {
const { i18n, t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getGlobalNotification } from '@/api/platform';
import { Alert, AlertIcon, AlertDescription, CloseButton, Box } from '@chakra-ui/react';
import { useMessage } from '@sealos/ui';
import { useMessage } from '@labring/sealos-ui';
import { Info, X } from 'lucide-react';
import { useEffect, memo } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/desktop_content/apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
FlexProps
} from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import { useMessage } from '@sealos/ui';
import { useMessage } from '@labring/sealos-ui';
import {
DragEventHandler,
MouseEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Icon, Text } from '@chakra-ui/react';
import { useMessage } from '@sealos/ui';
import { useMessage } from '@labring/sealos-ui';
import { useTranslation } from 'next-i18next';

export default function Assistant() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useTranslation } from 'next-i18next';
import dynamic from 'next/dynamic';
import { useRouter } from 'next/router';
import { useCallback, useEffect, useRef, useState } from 'react';
import { createMasterAPP, masterApp } from 'sealos-desktop-sdk/master';
import { createMasterAPP, masterApp } from '@labring/sealos-desktop-sdk/master';
import { ChakraIndicator } from './ChakraIndicator';
// import Apps from './apps';
import IframeWindow from './iframe_window';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getResource } from '@/api/platform';
import { Box, CircularProgress, CircularProgressLabel, Flex, Text } from '@chakra-ui/react';
import { MonitorIcon } from '@sealos/ui';
import { MonitorIcon } from '@labring/sealos-ui';
import { useQuery } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { CpuIcon, FlowIcon, GpuIcon, MemoryIcon, StorageIcon } from '../icons';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import useAppStore from '@/stores/app';
import { useConfigStore } from '@/stores/config';
import { TApp } from '@/types';
import { Box, Center, Flex, Image, Input } from '@chakra-ui/react';
import { SearchIcon } from '@sealos/ui';
import { SearchIcon } from '@labring/sealos-ui';
import { useTranslation } from 'next-i18next';
import { useRef, useState } from 'react';
import { blurBackgroundStyles } from './index';
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/desktop_content/warn.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Center, Text } from '@chakra-ui/react';
import { WarnTriangleIcon } from '@sealos/ui';
import { WarnTriangleIcon } from '@labring/sealos-ui';
import { EmptyIcon } from '../icons';
import { blurBackgroundStyles } from './index';
import { useTranslation } from 'next-i18next';
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/notification/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Text,
UseDisclosureReturn
} from '@chakra-ui/react';
import { NotificationIcon, WarnIcon, useMessage } from '@sealos/ui';
import { NotificationIcon, WarnIcon, useMessage } from '@labring/sealos-ui';
import { useMutation, useQuery } from '@tanstack/react-query';
import clsx from 'clsx';
import { produce } from 'immer';
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/team/Abdication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { abdicateRequest } from '@/api/namespace';
import { useCustomToast } from '@/hooks/useCustomToast';
import { ApiResp } from '@/types';
import { useTranslation } from 'next-i18next';
import { ExchangeIcon, ExpanMoreIcon } from '@sealos/ui';
import { ExchangeIcon, ExpanMoreIcon } from '@labring/sealos-ui';
import { useConfigStore } from '@/stores/config';

export default function Abdication({
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/team/CreateTeam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { createRequest } from '@/api/namespace';
import { useCustomToast } from '@/hooks/useCustomToast';
import { ApiResp } from '@/types';
import { useTranslation } from 'next-i18next';
import { track } from '@sealos/gtm';
import { track } from '@labring/sealos-gtm-sdk';
import useAppStore from '@/stores/app';

/**
Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/team/DissolveTeam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import {
Text,
useDisclosure
} from '@chakra-ui/react';
import { DeleteIcon } from '@sealos/ui';
import { DeleteIcon } from '@labring/sealos-ui';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { useState } from 'react';
import CustomInput from './Input';
import { track } from '@sealos/gtm';
import { track } from '@labring/sealos-gtm-sdk';
export default function DissolveTeam({
nsid,
ns_uid,
Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/team/InviteMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import { getInviteCodeRequest, inviteMemberRequest } from '@/api/namespace';
import { vaildManage } from '@/utils/tools';
import { ApiResp } from '@/types';
import { useTranslation } from 'next-i18next';
import { GroupAddIcon } from '@sealos/ui';
import { GroupAddIcon } from '@labring/sealos-ui';
import { useCopyData } from '@/hooks/useCopyData';
import { track } from '@sealos/gtm';
import { track } from '@labring/sealos-gtm-sdk';
import { needsClipboardWorkaround } from '@/utils/browserDetect';

export default function InviteMember({
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/team/ModifyRole.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Text,
useDisclosure
} from '@chakra-ui/react';
import { ExpanMoreIcon } from '@sealos/ui';
import { ExpanMoreIcon } from '@labring/sealos-ui';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'next-i18next';
import { useState } from 'react';
Expand Down
4 changes: 2 additions & 2 deletions frontend/desktop/src/components/team/NsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { CheckIcon } from 'lucide-react';
import { useTranslation } from 'next-i18next';
import { useState, useEffect } from 'react';
import BoringAvatar from 'boring-avatars';
import { Badge } from '@sealos/shadcn-ui/badge';
import { cn } from '@sealos/shadcn-ui';
import { Badge } from '@labring/sealos-shadcn-ui/badge';
import { cn } from '@labring/sealos-shadcn-ui';
import { getPlanBackgroundClass } from '@/utils/styling';
import { useConfigStore } from '@/stores/config';

Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/team/RemoveMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { InvitedStatus } from '@/types/team';
import useSessionStore from '@/stores/session';
import { CancelIcon, DeleteIcon } from '@sealos/ui';
import { CancelIcon, DeleteIcon } from '@labring/sealos-ui';
import { removeMemberRequest } from '@/api/namespace';
import { useCustomToast } from '@/hooks/useCustomToast';
import { ApiResp } from '@/types';
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/components/team/RenameTeam.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useMutation, useQueryClient } from '@tanstack/react-query';
import { renameRequest } from '@/api/namespace';
import { ApiResp } from '@/types';
import { useTranslation } from 'next-i18next';
import { EditIcon } from '@sealos/ui';
import { EditIcon } from '@labring/sealos-ui';

export default function RenameTeam({
ns_uid,
Expand Down
Loading
Loading