diff --git a/frontend/desktop/next.config.js b/frontend/desktop/next.config.js index 69599c887c9..777b4e2d38f 100644 --- a/frontend/desktop/next.config.js +++ b/frontend/desktop/next.config.js @@ -15,7 +15,7 @@ const nextConfig = withPWA({ reactStrictMode: false, swcMinify: isProduction, output: 'standalone', - transpilePackages: ['@sealos/ui'], + transpilePackages: ['@sealos/ui', 'sealos-desktop-sdk'], experimental: { outputFileTracingRoot: path.join(__dirname, '../') } diff --git a/frontend/desktop/public/icons/clear-outlined.svg b/frontend/desktop/public/icons/clear-outlined.svg deleted file mode 100644 index 4f6a61741e0..00000000000 --- a/frontend/desktop/public/icons/clear-outlined.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/frontend/desktop/public/icons/download.svg b/frontend/desktop/public/icons/download.svg deleted file mode 100644 index 8aed8eea5b5..00000000000 --- a/frontend/desktop/public/icons/download.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/frontend/desktop/public/icons/wechat.svg b/frontend/desktop/public/icons/wechat.svg deleted file mode 100644 index b713640cbdf..00000000000 --- a/frontend/desktop/public/icons/wechat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/desktop/public/images/group_add.svg b/frontend/desktop/public/images/group_add.svg deleted file mode 100644 index e11d8133334..00000000000 --- a/frontend/desktop/public/images/group_add.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/frontend/desktop/public/images/list.svg b/frontend/desktop/public/images/list.svg deleted file mode 100644 index a4acf5093c7..00000000000 --- a/frontend/desktop/public/images/list.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/frontend/desktop/public/images/material-symbols_add.svg b/frontend/desktop/public/images/material-symbols_add.svg deleted file mode 100644 index 52d5e851747..00000000000 --- a/frontend/desktop/public/images/material-symbols_add.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/frontend/desktop/public/images/material-symbols_delete-outline-rounded.svg b/frontend/desktop/public/images/material-symbols_delete-outline-rounded.svg deleted file mode 100644 index 6fc5bbbd740..00000000000 --- a/frontend/desktop/public/images/material-symbols_delete-outline-rounded.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/frontend/desktop/public/images/uil_setting.svg b/frontend/desktop/public/images/uil_setting.svg deleted file mode 100644 index b31cc34bc78..00000000000 --- a/frontend/desktop/public/images/uil_setting.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/frontend/desktop/src/components/account/index.tsx b/frontend/desktop/src/components/account/index.tsx index c2dcaf3af02..3f0962bf627 100644 --- a/frontend/desktop/src/components/account/index.tsx +++ b/frontend/desktop/src/components/account/index.tsx @@ -12,7 +12,9 @@ import { PopoverTrigger, Popover, PopoverContent, - PopoverBody + PopoverBody, + IconButton, + HStack } from '@chakra-ui/react'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { useTranslation } from 'next-i18next'; @@ -20,16 +22,15 @@ import { useRouter } from 'next/router'; import { useMemo } from 'react'; import Iconfont from '../iconfont'; import useAppStore from '@/stores/app'; - import { ApiResp } from '@/types'; import { formatMoney } from '@/utils/format'; import TeamCenter from '@/components/team/TeamCenter'; import NsList from '@/components/team/NsList'; import { nsListRequest, switchRequest } from '@/api/namespace'; -import RightIcon from '../icons/RightArrow'; import { NSType } from '@/types/team'; import PasswordModify from './PasswordModify'; import { useGlobalStore } from '@/stores/global'; +import { CopyIcon, DownloadIcon, LogoutIcon, RightArrowIcon } from '@sealos/ui'; const NsMenu = () => { const { t } = useTranslation(); @@ -87,7 +88,7 @@ const NsMenu = () => { {namespace?.nstype === NSType.Private ? t('Default Team') : namespace?.teamName} - + } @@ -111,7 +112,7 @@ const NsMenu = () => { ); }; -export default function Index({ disclosure }: { disclosure: UseDisclosureReturn }) { +export default function Account({ disclosure }: { disclosure: UseDisclosureReturn }) { const router = useRouter(); const { t } = useTranslation(); const { delSession, getSession } = useSessionStore(); @@ -172,7 +173,7 @@ export default function Index({ disclosure }: { disclosure: UseDisclosureReturn backdropFilter={'blur(150px)'} > - + {t('Log Out')} @@ -186,9 +187,21 @@ export default function Index({ disclosure }: { disclosure: UseDisclosureReturn fallbackSrc="/images/sealos.svg" alt="user avator" /> - + {user?.name} + + + ID: {nsid} + + copyData(nsid)} + icon={} + aria-label={'copy nsid'} + /> + kubeconfig - download('kubeconfig.yaml', kubeconfig)} - > - - - } + aria-label={'Download kc'} + /> + copyData(kubeconfig)} - cursor={'pointer'} - > - - + icon={} + aria-label={'copy kc'} + /> } diff --git a/frontend/desktop/src/components/desktop_content/index.tsx b/frontend/desktop/src/components/desktop_content/index.tsx index d12c96769ea..b600162f77b 100644 --- a/frontend/desktop/src/components/desktop_content/index.tsx +++ b/frontend/desktop/src/components/desktop_content/index.tsx @@ -13,9 +13,7 @@ import styles from './index.module.scss'; const TimeComponent = dynamic(() => import('./time'), { ssr: false }); -const UserMenu = dynamic(() => import('@/components/user_menu'), { - ssr: false -}); +import UserMenu from '@/components/user_menu'; export default function DesktopContent(props: any) { const { t, i18n } = useTranslation(); diff --git a/frontend/desktop/src/components/icons/DeleteIcon.tsx b/frontend/desktop/src/components/icons/DeleteIcon.tsx deleted file mode 100644 index 9cffcf1e5e2..00000000000 --- a/frontend/desktop/src/components/icons/DeleteIcon.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { Icon } from '@chakra-ui/react'; -export default function DeleteIcon(props: Parameters[0]) { - return ( - - - - ); -} diff --git a/frontend/desktop/src/components/icons/GroupAdd.tsx b/frontend/desktop/src/components/icons/GroupAdd.tsx deleted file mode 100644 index 0e87b0c383a..00000000000 --- a/frontend/desktop/src/components/icons/GroupAdd.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Icon, IconProps } from '@chakra-ui/react'; - -export default function GroupAddIcon(props: IconProps) { - return ( - - - - ); -} diff --git a/frontend/desktop/src/components/notification/index.tsx b/frontend/desktop/src/components/notification/index.tsx index 44d1f8463df..3753960bc83 100644 --- a/frontend/desktop/src/components/notification/index.tsx +++ b/frontend/desktop/src/components/notification/index.tsx @@ -1,4 +1,4 @@ -import { Box, Flex, Text, Img, UseDisclosureReturn } from '@chakra-ui/react'; +import { Box, Flex, Text, Img, UseDisclosureReturn, Button } from '@chakra-ui/react'; import { useMutation, useQuery } from '@tanstack/react-query'; import clsx from 'clsx'; import Iconfont from '@/components/iconfont'; @@ -7,8 +7,8 @@ import request from '@/services/request'; import { formatTime } from '@/utils/tools'; import styles from './index.module.scss'; import { useTranslation } from 'next-i18next'; -import warnIcon from 'public/icons/clear-outlined.svg'; - +// import warnIcon from 'public/icons/clear-outlined.svg'; +import { ClearOutlineIcon } from '@sealos/ui'; type NotificationItem = { metadata: { creationTimestamp: string; @@ -122,12 +122,17 @@ export default function Notification(props: TNotification) { > {t('Have Read')} - markAllAsRead()}> - - + {notifications?.map((item: NotificationItem) => { diff --git a/frontend/desktop/src/components/signin/auth/useAuthList.tsx b/frontend/desktop/src/components/signin/auth/useAuthList.tsx index 2b003086242..b8c4e809e73 100644 --- a/frontend/desktop/src/components/signin/auth/useAuthList.tsx +++ b/frontend/desktop/src/components/signin/auth/useAuthList.tsx @@ -1,11 +1,9 @@ -import GithubIcon from '@/components/icons/GithubIcon'; -import GoogleIcon from '@/components/icons/GoogleIcon'; -import WechatIcon from '@/components/icons/WechatIcon'; import request from '@/services/request'; import useSessionStore from '@/stores/session'; import { ApiResp, SystemEnv } from '@/types'; import { OauthProvider } from '@/types/user'; import { Button, Flex, Icon, Image } from '@chakra-ui/react'; +import { GithubIcon, GoogleIcon, WechatIcon } from '@sealos/ui'; import { useQuery } from '@tanstack/react-query'; import { MouseEventHandler } from 'react'; @@ -31,7 +29,6 @@ const useAuthList = () => { const authList: { icon: typeof Icon; cb: MouseEventHandler; need: boolean }[] = [ { - // src: '/images/github.svg', icon: GithubIcon, cb: (e) => { e.preventDefault(); diff --git a/frontend/desktop/src/components/team/Abdication.tsx b/frontend/desktop/src/components/team/Abdication.tsx index f6ffeb7c7b0..bcb0456d5d5 100644 --- a/frontend/desktop/src/components/team/Abdication.tsx +++ b/frontend/desktop/src/components/team/Abdication.tsx @@ -14,17 +14,17 @@ import { Menu, MenuList, MenuItem, - MenuButton + MenuButton, + ButtonProps } from '@chakra-ui/react'; import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { UserRole } from '@/types/team'; import { TeamUserDto } from '@/types/user'; import { useState } from 'react'; -import ExchangeIcon from '../icons/ExchangeIcon'; 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'; export default function Abdication({ ns_uid, users, @@ -32,7 +32,7 @@ export default function Abdication({ }: { users: TeamUserDto[]; ns_uid: string; -} & Parameters[0]) { +} & ButtonProps) { const { t } = useTranslation(); const { onOpen, isOpen, onClose } = useDisclosure(); const queryClient = useQueryClient(); @@ -115,44 +115,34 @@ export default function Abdication({ mr="8px" /> {targetUser.name} - {users.length > 1 && ( - - )} + {users.length > 1 && } - {users - .map((user, idx) => ( - { - e.preventDefault(); - setTargetUser({ - name: user.name, - avatar: user.avatarUrl, - k8s_username: user.k8s_username, - uid: user.uid - }); - }} - key={idx} - > - - {targetUser.name} - - )) - .filter((_, i) => i != UserRole.Owner)} + {users.map((user) => ( + { + e.preventDefault(); + setTargetUser({ + name: user.name, + avatar: user.avatarUrl, + k8s_username: user.k8s_username, + uid: user.uid + }); + }} + key={user.uid} + > + + {user.name} + + ))} diff --git a/frontend/desktop/src/components/team/InviteMember.tsx b/frontend/desktop/src/components/team/InviteMember.tsx index ab2ae077879..56807a2df29 100644 --- a/frontend/desktop/src/components/team/InviteMember.tsx +++ b/frontend/desktop/src/components/team/InviteMember.tsx @@ -16,7 +16,8 @@ import { Flex, useToast, Spinner, - FlexProps + FlexProps, + ButtonProps } from '@chakra-ui/react'; import CustomInput from './Input'; import { useState } from 'react'; @@ -26,17 +27,15 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; import { inviteMemberRequest } from '@/api/namespace'; import { vaildManage } from '@/utils/tools'; import { ApiResp } from '@/types'; -import GroupAddIcon from '../icons/GroupAdd'; import { useTranslation } from 'react-i18next'; +import { GroupAddIcon } from '@sealos/ui'; export default function InviteMember({ ns_uid, ownRole, - buttonType = 'img', ...props -}: (FlexProps | Parameters[0]) & { +}: ButtonProps & { ns_uid: string; ownRole: UserRole; - buttonType?: 'img' | 'button'; }) { const { onOpen, isOpen, onClose } = useDisclosure(); const session = useSessionStore((s) => s.session); @@ -61,9 +60,8 @@ export default function InviteMember({ } }); const canManage = vaildManage(ownRole, 'x'); - const { t, i18n } = useTranslation(); + const { t } = useTranslation(); const submit = () => { - //!todo let trim_to = userId.trim(); if (!trim_to || trim_to.length < 6) { toast({ @@ -93,38 +91,21 @@ export default function InviteMember({ return ( <> {[UserRole.Manager, UserRole.Owner].includes(ownRole) ? ( - buttonType === 'img' ? ( - - - - ) : ( - - ) + ) : ( <> )} diff --git a/frontend/desktop/src/components/team/ModifyRole.tsx b/frontend/desktop/src/components/team/ModifyRole.tsx index 71a2f3eae91..c233a5c45bd 100644 --- a/frontend/desktop/src/components/team/ModifyRole.tsx +++ b/frontend/desktop/src/components/team/ModifyRole.tsx @@ -24,6 +24,7 @@ import { modifyRoleRequest } from '@/api/namespace'; import { useCustomToast } from '@/hooks/useCustomToast'; import { ApiResp } from '@/types'; import { useTranslation } from 'react-i18next'; +import { ExpanMoreIcon } from '@sealos/ui'; export default function ModifyRole({ ns_uid, k8s_username, @@ -99,16 +100,11 @@ export default function ModifyRole({ w="100%" mt="24px" px="12px" + display={'flex'} + justifyContent={'space-between'} + rightIcon={} > - - {ROLE_LIST[role]} - - + {ROLE_LIST[role]} {roles.map((_role, idx) => ( diff --git a/frontend/desktop/src/components/team/NsList.tsx b/frontend/desktop/src/components/team/NsList.tsx index 14a6a4e5b23..a3a9ce69105 100644 --- a/frontend/desktop/src/components/team/NsList.tsx +++ b/frontend/desktop/src/components/team/NsList.tsx @@ -1,8 +1,6 @@ import { useCopyData } from '@/hooks/useCopyData'; import { Box, Flex, Text } from '@chakra-ui/react'; import { useQueryClient } from '@tanstack/react-query'; -import Iconfont from '../iconfont'; -import InviteMember from './InviteMember'; import { NSType, NamespaceDto } from '@/types/team'; import { useTranslation } from 'react-i18next'; const NsList = ({ @@ -18,7 +16,6 @@ const NsList = ({ namespaces: NamespaceDto[]; } & Parameters[0]) => { const queryClient = useQueryClient(); - const { copyData } = useCopyData(); const { t } = useTranslation(); return ( diff --git a/frontend/desktop/src/components/team/RemoveMember.tsx b/frontend/desktop/src/components/team/RemoveMember.tsx index 97bf1d3a9cc..94853a89439 100644 --- a/frontend/desktop/src/components/team/RemoveMember.tsx +++ b/frontend/desktop/src/components/team/RemoveMember.tsx @@ -15,8 +15,7 @@ import { import { useMutation, useQueryClient } from '@tanstack/react-query'; import { InvitedStatus } from '@/types/team'; import useSessionStore from '@/stores/session'; -import CancelIcon from '../icons/CancelIcon'; -import DeleteIcon from '../icons/DeleteIcon'; +import { CancelIcon, DeleteIcon } from '@sealos/ui'; import { removeMemberRequest } from '@/api/namespace'; import { useCustomToast } from '@/hooks/useCustomToast'; import { ApiResp } from '@/types'; diff --git a/frontend/desktop/src/components/team/TeamCenter.tsx b/frontend/desktop/src/components/team/TeamCenter.tsx index 4934ad733cc..3b3211d9db7 100644 --- a/frontend/desktop/src/components/team/TeamCenter.tsx +++ b/frontend/desktop/src/components/team/TeamCenter.tsx @@ -11,7 +11,8 @@ import { useDisclosure, Divider, Stack, - FlexProps + IconButton, + ButtonProps } from '@chakra-ui/react'; import NsList from './NsList'; import { useState } from 'react'; @@ -19,7 +20,6 @@ import CreateTeam from './CreateTeam'; import DissolveTeam from './DissolveTeam'; import { useQuery } from '@tanstack/react-query'; import { useCopyData } from '@/hooks/useCopyData'; -import Iconfont from '../iconfont'; import { formatTime } from '@/utils/format'; import InviteMember from './InviteMember'; import UserTable from './userTable'; @@ -29,9 +29,10 @@ import { TeamUserDto } from '@/types/user'; import ReciveMessage from './ReciveMessage'; import { nsListRequest, reciveMessageRequest, teamDetailsRequest } from '@/api/namespace'; import { useTranslation } from 'react-i18next'; -export default function TeamCenter(props: FlexProps) { +import { CopyIcon, ListIcon, SettingIcon } from '@sealos/ui'; +export default function TeamCenter(props: ButtonProps) { const session = useSessionStore((s) => s.session); - const { ns_uid: default_ns_uid, nsid: default_nsid, userId, k8s_username } = session.user; + const { ns_uid: default_ns_uid, nsid: default_nsid, userId } = session.user; const { isOpen, onOpen, onClose } = useDisclosure(); const [nsid, setNsid] = useState(default_nsid); const [messageFilter, setMessageFilter] = useState([]); @@ -77,31 +78,19 @@ export default function TeamCenter(props: FlexProps) { } return ( <> - { + // 清理消息过滤 + setMessageFilter([]); + onOpen(); }} - w="28px" - h="28px" - mr="6px" - transition={'all 0.3s'} - justify={'center'} - align={'center'} + variant={'white-bg-icon'} + p="4px" + ml="auto" + icon={} + aria-label={'open team center'} {...props} - > - { - // 清理消息过滤 - setMessageFilter([]); - onOpen(); - }} - src="/images/uil_setting.svg" - h="20px" - w="20px" - /> - + /> )} - - + + {t('Team')} ID: {nsid} - copyData(nsid)} cursor={'pointer'} ml="5px"> - - + copyData(nsid)} + p="4px" + ml="5px" + icon={ + + } + aria-label={'copy nsid'} + /> {t('Created Time')}: {createTime ? formatTime(createTime) : ''} @@ -200,7 +195,7 @@ export default function TeamCenter(props: FlexProps) { - + {t('Member List')} )} diff --git a/frontend/desktop/src/components/team/userTable.tsx b/frontend/desktop/src/components/team/userTable.tsx index d4e872e1904..9557ca07841 100644 --- a/frontend/desktop/src/components/team/userTable.tsx +++ b/frontend/desktop/src/components/team/userTable.tsx @@ -31,8 +31,6 @@ export default function UserTable({ nsid: string; }) { const { t } = useTranslation(); - // const headList = ['用户名', '权限', '加入时间', '状态', '操作']; - // const status = ['等待加入', '已加入']; const headList = [t('User Name'), t('Access'), t('In Time'), t('Status'), t('Operating')]; const status = [t('Waiting'), t('Added')]; const session = useSessionStore((s) => s.session); @@ -42,6 +40,7 @@ export default function UserTable({ const abdicationUser = users.filter( (user) => user.uid !== userSelf?.uid && user.status === InvitedStatus.Accepted ); + const vaildateRoles: UserRole[] = []; if (userSelf?.role === UserRole.Owner) vaildateRoles.push(UserRole.Manager, UserRole.Developer); else if (userSelf?.role === UserRole.Manager) vaildateRoles.push(UserRole.Developer); diff --git a/frontend/desktop/src/pages/api/auth/password/exist.ts b/frontend/desktop/src/pages/api/auth/password/exist.ts index d832891379f..d422862384a 100644 --- a/frontend/desktop/src/pages/api/auth/password/exist.ts +++ b/frontend/desktop/src/pages/api/auth/password/exist.ts @@ -4,14 +4,23 @@ import { jsonRes } from '@/services/backend/response'; import { queryUser } from '@/services/backend/db/user'; import { hashPassword } from '@/utils/crypto'; import { TUserExist } from '@/types/user'; -import { enablePassword } from '@/services/enable'; +import { enablePassword, enableSignUp } from '@/services/enable'; export default async function handler(req: NextApiRequest, res: NextApiResponse) { try { if (!enablePassword()) { throw new Error('PASSWORD_SALT is not defined'); } const { user } = req.body; - + if (!enableSignUp()) { + return jsonRes(res, { + code: 200, + message: 'Successfully', + data: { + user, + exist: true + } + }); + } const result = await queryUser({ id: user, provider: 'password_user' }); if (!result || !result.password || result.password === hashPassword('')) { return jsonRes(res, { diff --git a/frontend/desktop/src/pages/index.tsx b/frontend/desktop/src/pages/index.tsx index ca5c8cfa519..a9e45ff3c42 100644 --- a/frontend/desktop/src/pages/index.tsx +++ b/frontend/desktop/src/pages/index.tsx @@ -1,7 +1,6 @@ import DesktopContent from '@/components/desktop_content'; import FloatButton from '@/components/floating_button'; import MoreApps from '@/components/more_apps'; -import { enableRecharge } from '@/services/enable'; import request from '@/services/request'; import useAppStore from '@/stores/app'; import { useGlobalStore } from '@/stores/global'; @@ -27,12 +26,11 @@ export const MoreAppsContext = createContext(null); export default function Home({ sealos_cloud_domain }: { sealos_cloud_domain: string }) { const router = useRouter(); - const { isUserLogin, setSession } = useSessionStore(); + const { isUserLogin } = useSessionStore(); const { colorMode, toggleColorMode } = useColorMode(); const init = useAppStore((state) => state.init); const setAutoLaunch = useAppStore((state) => state.setAutoLaunch); - const cancelAutoLaunch = useAppStore((state) => state.cancelAutoLaunch); - const { data: systemConfig, refetch } = useQuery(['getSystemConfig'], () => + const { data: systemConfig } = useQuery(['getSystemConfig'], () => request>('/api/system/getSystemConfig') ); const { data: platformEnv, isSuccess } = useQuery(['getPlatformEnv'], () => @@ -89,7 +87,6 @@ export default function Home({ sealos_cloud_domain }: { sealos_cloud_domain: str sessionStorage.setItem('bd_vid', bd_vid as string); } }, []); - return ( diff --git a/frontend/desktop/src/services/backend/oauth.ts b/frontend/desktop/src/services/backend/oauth.ts index 1038e1c82c3..41f777c8a79 100644 --- a/frontend/desktop/src/services/backend/oauth.ts +++ b/frontend/desktop/src/services/backend/oauth.ts @@ -10,6 +10,7 @@ import { WithId } from 'mongodb'; import { v4 as uuid } from 'uuid'; import { createUTN, queryUTN } from './db/userToNamespace'; import { InvitedStatus, NSType, UserRole } from '@/types/team'; +import { enableSignUp } from '../enable'; export const getOauthRes = async ({ provider, @@ -27,10 +28,10 @@ export const getOauthRes = async ({ if (provider === 'password_user' && !password) { throw new Error('password is required'); } - // 翻查一下 ns 和user const _user = await queryUser({ id, provider }); let signResult = null; if (!_user) { + if (!enableSignUp()) throw new Error('Failed to find user'); signResult = await signUp({ provider, id, @@ -49,8 +50,8 @@ export const getOauthRes = async ({ if (!signResult) throw new Error('Failed to edit db'); const { k8s_user, namespace, user } = signResult; const k8s_username = k8s_user.name; - // 登录和注册都需要对k8suser.namespace列做校检 - if (namespace.nstype !== NSType.Private) return Promise.reject('Faild to get private namespace'); + // check k8suser.namespace + if (namespace.nstype !== NSType.Private) return Promise.reject('Failed to get private namespace'); const kubeconfig = await getUserKubeconfig(user.uid, k8s_username); if (!kubeconfig) { throw new Error('Failed to get user config'); @@ -91,7 +92,7 @@ async function signIn({ const k8s_users = _user.k8s_users || []; const uid = _user.uid; let k8s_user = null; - // 迁移用户 + // migrating user if (k8s_users.length === 0) { const k8s_username = await getUserKubeconfigByuid(uid); if (!!k8s_username) { @@ -108,7 +109,7 @@ async function signIn({ } k8s_user = k8s_users[0]; const k8s_username = k8s_user.name; - // 迁移namespace + // migrating namespace let namespace = await queryNS({ id: GetUserDefaultNameSpace(k8s_username) }); if (!namespace) { namespace = await createNS({ @@ -118,7 +119,7 @@ async function signIn({ }); if (!namespace) return Promise.reject('Faild to create namespace'); } - // 迁移utn + // migrating utn let utn = await queryUTN({ userId: uid, k8s_username, namespaceId: namespace.uid }); if (!utn) utn = await createUTN({ @@ -139,7 +140,7 @@ async function signIn({ namespace }; } -// 注册 + async function signUp({ provider, id, diff --git a/frontend/desktop/src/services/enable.ts b/frontend/desktop/src/services/enable.ts index 3da626bc09e..66c4c9f2c62 100644 --- a/frontend/desktop/src/services/enable.ts +++ b/frontend/desktop/src/services/enable.ts @@ -22,6 +22,7 @@ export const enableGoogle = () => export const enableRecharge = () => { return process.env.RECHARGE_ENABLED === 'true'; }; +export const enableSignUp = () => process.env.SIGN_UP_ENABLED === 'true'; // costcenter export const enableStripe = () => process.env['STRIPE_ENABLED'] === 'true' && !!process.env['STRIPE_PUB']; diff --git a/frontend/packages/ui/package.json b/frontend/packages/ui/package.json index 0c0554e5f74..450ff8e1604 100644 --- a/frontend/packages/ui/package.json +++ b/frontend/packages/ui/package.json @@ -28,6 +28,7 @@ "rollup-plugin-dts": "^4.2.3", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", - "tslib": "^2.6.2" + "tslib": "^2.6.2", + "typescript": "^5.2.2" } } \ No newline at end of file diff --git a/frontend/packages/ui/src/components/icons/AddIcon.tsx b/frontend/packages/ui/src/components/icons/AddIcon.tsx new file mode 100644 index 00000000000..dc8caf26110 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/AddIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const AddIcon = createIcon({ + displayName: 'AddIcon', + viewBox: '0 0 20 21', + d: 'M9.16663 16.6159V11.6159H4.16663V9.94922H9.16663V4.94922H10.8333V9.94922H15.8333V11.6159H10.8333V16.6159H9.16663Z' +}); +export default AddIcon; diff --git a/frontend/packages/ui/src/components/icons/ArrowDownSLineIcon.tsx b/frontend/packages/ui/src/components/icons/ArrowDownSLineIcon.tsx new file mode 100644 index 00000000000..be5119cdd73 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/ArrowDownSLineIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const ArrowDownSLineIcon = createIcon({ + displayName: 'ArrowDownSLineIcon', + viewBox: '0 0 20 20', + d: 'M10.0001 10.9766L14.1251 6.85156L15.3034 8.0299L10.0001 13.3332L4.69678 8.0299L5.87511 6.85156L10.0001 10.9766Z' +}); +export default ArrowDownSLineIcon; diff --git a/frontend/packages/ui/src/components/icons/ArrowExchangeIcon.tsx b/frontend/packages/ui/src/components/icons/ArrowExchangeIcon.tsx new file mode 100644 index 00000000000..1eca1750673 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/ArrowExchangeIcon.tsx @@ -0,0 +1,18 @@ +import { createIcon } from '@chakra-ui/react'; + +const ArrowExchangeIcon = createIcon({ + displayName: 'ArrowExchangeIcon', + viewBox: '0 0 16 17', + path: ( + + + + ) +}); +export default ArrowExchangeIcon; diff --git a/frontend/packages/ui/src/components/icons/BucketIcon.tsx b/frontend/packages/ui/src/components/icons/BucketIcon.tsx new file mode 100644 index 00000000000..8b6026fa863 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/BucketIcon.tsx @@ -0,0 +1,9 @@ +import { createIcon } from '@chakra-ui/react'; + +const BucketIcon = createIcon({ + displayName: 'BucketIcon', + viewBox: '0 0 16 16', + d: 'M8 2.5C6.8535 2.5 5.703 2.6485 4.797 2.8905C4.344 3.0115 3.957 3.1385 3.6405 3.328C3.324 3.518 3 3.801 3 4.25C3 4.3615 3.0275 4.4705 3.0625 4.5625C3.1365 4.9435 4.3885 11.4625 4.5155 12.094C4.576 12.3945 4.7675 12.617 4.9845 12.7815C5.201 12.9455 5.4495 13.0685 5.75 13.1715C6.3515 13.379 7.125 13.5 8 13.5C8.875 13.5 9.645 13.379 10.25 13.172C10.5525 13.0685 10.8125 12.949 11.0315 12.781C11.25 12.6135 11.455 12.3925 11.5 12.078C11.51 12.008 11.605 11.4065 11.75 10.6565C11.895 9.9065 12.082 8.9665 12.2655 8.0315C12.6095 6.2715 12.8985 4.76 12.9375 4.5625C12.977 4.46294 12.9981 4.35708 13 4.25C13 3.801 12.676 3.5175 12.3595 3.328C12.043 3.1385 11.656 3.0115 11.203 2.8905C10.297 2.6485 9.1465 2.5 8 2.5ZM8 3.5C9.0625 3.5 10.16 3.633 10.953 3.844C11.3495 3.949 11.66 4.078 11.844 4.1875C11.8945 4.219 11.8985 4.2305 11.922 4.25C11.8985 4.27 11.8945 4.2815 11.8435 4.3125C11.66 4.422 11.3495 4.551 10.9535 4.6565C10.16 4.8665 9.062 5 8 5C6.938 5 5.84 4.867 5.047 4.656C4.6505 4.551 4.34 4.422 4.1565 4.3125C4.1055 4.281 4.1015 4.2695 4.078 4.25C4.1015 4.23 4.1055 4.2185 4.156 4.1875C4.34 4.078 4.6505 3.949 5.047 3.8435C5.84 3.633 6.9375 3.5 8 3.5ZM4.2345 5.4375C4.412 5.5 4.594 5.5545 4.797 5.6095C5.703 5.8515 6.8535 6 8 6C9.1465 6 10.297 5.8515 11.203 5.6095C11.4065 5.5545 11.588 5.5 11.7655 5.4375C11.627 6.1175 11.5195 6.6095 11.2815 7.828C11.164 8.426 11.0725 8.961 10.969 9.5155C10.963 9.5235 10.957 9.5175 10.9065 9.578C10.836 9.662 10.707 9.8045 10.5 9.9375C10.086 10.205 9.338 10.5 8 10.5C6.662 10.5 5.9 10.203 5.4845 9.9375C5.33674 9.8445 5.20489 9.72835 5.094 9.5935L5.015 9.5C4.675 7.746 4.435 6.48 4.234 5.4375H4.2345ZM8 6.5C7.1775 6.5 6.5 7.1775 6.5 8C6.5 8.8225 7.1775 9.5 8 9.5C8.8225 9.5 9.5 8.8225 9.5 8C9.5 7.1775 8.8225 6.5 8 6.5ZM8 7.5C8.2815 7.5 8.5 7.719 8.5 8C8.5 8.2815 8.281 8.5 8 8.5C7.7185 8.5 7.5 8.281 7.5 8C7.5 7.7185 7.719 7.5 8 7.5ZM5.297 10.953C5.8985 11.252 6.756 11.5 8 11.5C9.2285 11.5 10.088 11.2675 10.6875 10.9685C10.6115 11.3475 10.5175 11.797 10.5 11.922C10.49 11.9355 10.463 11.953 10.422 11.9845C10.33 12.0545 10.168 12.156 9.9375 12.2345C9.4765 12.3905 8.783 12.5 8 12.5C7.217 12.5 6.535 12.3925 6.078 12.2345C5.8495 12.156 5.674 12.0585 5.578 11.9845C5.4825 11.91 5.4785 11.875 5.4845 11.906C5.469 11.832 5.3455 11.199 5.297 10.953Z' +}); + +export default BucketIcon; diff --git a/frontend/desktop/src/components/icons/CancelIcon.tsx b/frontend/packages/ui/src/components/icons/CancelIcon.tsx similarity index 100% rename from frontend/desktop/src/components/icons/CancelIcon.tsx rename to frontend/packages/ui/src/components/icons/CancelIcon.tsx diff --git a/frontend/packages/ui/src/components/icons/ClearOutlineIcon.tsx b/frontend/packages/ui/src/components/icons/ClearOutlineIcon.tsx new file mode 100644 index 00000000000..31ad86134b9 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/ClearOutlineIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const ClearOutlineIcon = createIcon({ + displayName: 'ClearOutlineIcon', + viewBox: '0 0 16 16', + d: 'M14.1031 13.3375L13.275 8.5625H13.5547C13.7797 8.5625 13.9609 8.38125 13.9609 8.15625V5.15625C13.9609 4.93125 13.7797 4.75 13.5547 4.75H9.71094V1.90625C9.71094 1.68125 9.52969 1.5 9.30469 1.5H6.80469C6.57969 1.5 6.39844 1.68125 6.39844 1.90625V4.75H2.55469C2.32969 4.75 2.14844 4.93125 2.14844 5.15625V8.15625C2.14844 8.38125 2.32969 8.5625 2.55469 8.5625H2.83437L2.00625 13.3375C2.00156 13.3609 2 13.3844 2 13.4062C2 13.6313 2.18125 13.8125 2.40625 13.8125H13.7031C13.7266 13.8125 13.75 13.8109 13.7719 13.8062C13.9938 13.7687 14.1422 13.5578 14.1031 13.3375ZM3.24219 5.84375H7.49219V2.59375H8.61719V5.84375H12.8672V7.46875H3.24219V5.84375ZM10.5547 12.7188V10.2812C10.5547 10.2125 10.4984 10.1562 10.4297 10.1562H9.67969C9.61094 10.1562 9.55469 10.2125 9.55469 10.2812V12.7188H6.55469V10.2812C6.55469 10.2125 6.49844 10.1562 6.42969 10.1562H5.67969C5.61094 10.1562 5.55469 10.2125 5.55469 10.2812V12.7188H3.22344L3.92812 8.65625H12.1797L12.8844 12.7188H10.5547Z' +}); +export default ClearOutlineIcon; diff --git a/frontend/packages/ui/src/components/icons/CopyIcon.tsx b/frontend/packages/ui/src/components/icons/CopyIcon.tsx new file mode 100644 index 00000000000..086cd3dae2e --- /dev/null +++ b/frontend/packages/ui/src/components/icons/CopyIcon.tsx @@ -0,0 +1,14 @@ +import { createIcon } from '@chakra-ui/react'; + +const CopyIcon = createIcon({ + displayName: 'CopyIcon', + viewBox: '0 0 20 21', + path: ( + + ) +}); +export default CopyIcon; diff --git a/frontend/packages/ui/src/components/icons/CreateFolderIcon.tsx b/frontend/packages/ui/src/components/icons/CreateFolderIcon.tsx new file mode 100644 index 00000000000..922e6977f86 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/CreateFolderIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const CreateFolderIcon = createIcon({ + displayName: 'CreateFolderIcon', + viewBox: '0 0 24 25', + d: 'M15 16.3384C15.2833 16.3384 15.521 16.2424 15.713 16.0504C15.9043 15.859 16 15.6217 16 15.3384V14.3384H17C17.2833 14.3384 17.5207 14.2424 17.712 14.0504C17.904 13.859 18 13.6217 18 13.3384C18 13.055 17.904 12.8174 17.712 12.6254C17.5207 12.434 17.2833 12.3384 17 12.3384H16V11.3384C16 11.055 15.9043 10.8174 15.713 10.6254C15.521 10.434 15.2833 10.3384 15 10.3384C14.7167 10.3384 14.4793 10.434 14.288 10.6254C14.096 10.8174 14 11.055 14 11.3384V12.3384H13C12.7167 12.3384 12.4793 12.434 12.288 12.6254C12.096 12.8174 12 13.055 12 13.3384C12 13.6217 12.096 13.859 12.288 14.0504C12.4793 14.2424 12.7167 14.3384 13 14.3384H14V15.3384C14 15.6217 14.096 15.859 14.288 16.0504C14.4793 16.2424 14.7167 16.3384 15 16.3384ZM4 20.3384C3.45 20.3384 2.97933 20.1427 2.588 19.7514C2.196 19.3594 2 18.8884 2 18.3384V6.33838C2 5.78838 2.196 5.31771 2.588 4.92638C2.97933 4.53438 3.45 4.33838 4 4.33838H9.175C9.44167 4.33838 9.696 4.38838 9.938 4.48838C10.1793 4.58838 10.3917 4.73005 10.575 4.91338L12 6.33838H20C20.55 6.33838 21.021 6.53438 21.413 6.92638C21.8043 7.31771 22 7.78838 22 8.33838V18.3384C22 18.8884 21.8043 19.3594 21.413 19.7514C21.021 20.1427 20.55 20.3384 20 20.3384H4ZM4 6.33838V18.3384H20V8.33838H11.175L9.175 6.33838H4ZM4 6.33838V18.3384V6.33838Z' +}); +export default CreateFolderIcon; diff --git a/frontend/packages/ui/src/components/icons/DeleteIcon.tsx b/frontend/packages/ui/src/components/icons/DeleteIcon.tsx new file mode 100644 index 00000000000..a1c3e8ee41c --- /dev/null +++ b/frontend/packages/ui/src/components/icons/DeleteIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const DeleteIcon = createIcon({ + displayName: 'DeleteIcon', + viewBox: '0 0 16 16', + d: 'M4.66663 14C4.29996 14 3.98596 13.8693 3.72463 13.608C3.46329 13.3467 3.33285 13.0329 3.33329 12.6667V4C3.14441 4 2.98596 3.936 2.85796 3.808C2.72996 3.68 2.66618 3.52178 2.66663 3.33334C2.66663 3.14445 2.73063 2.986 2.85863 2.858C2.98663 2.73 3.14485 2.66622 3.33329 2.66667H5.99996C5.99996 2.47778 6.06396 2.31934 6.19196 2.19134C6.31996 2.06334 6.47818 1.99956 6.66663 2H9.3333C9.52218 2 9.68063 2.064 9.80863 2.192C9.93663 2.32 10.0004 2.47822 9.99996 2.66667H12.6666C12.8555 2.66667 13.014 2.73067 13.142 2.85867C13.27 2.98667 13.3337 3.14489 13.3333 3.33334C13.3333 3.52222 13.2693 3.68067 13.1413 3.80867C13.0133 3.93667 12.8551 4.00045 12.6666 4V12.6667C12.6666 13.0333 12.536 13.3473 12.2746 13.6087C12.0133 13.87 11.6995 14.0004 11.3333 14H4.66663ZM4.66663 4V12.6667H11.3333V4H4.66663ZM5.99996 10.6667C5.99996 10.8556 6.06396 11.014 6.19196 11.142C6.31996 11.27 6.47818 11.3338 6.66663 11.3333C6.85552 11.3333 7.01396 11.2693 7.14196 11.1413C7.26996 11.0133 7.33374 10.8551 7.33329 10.6667V6C7.33329 5.81111 7.26929 5.65267 7.14129 5.52467C7.01329 5.39667 6.85507 5.33289 6.66663 5.33334C6.47774 5.33334 6.31929 5.39734 6.19129 5.52534C6.06329 5.65334 5.99952 5.81156 5.99996 6V10.6667ZM8.66663 10.6667C8.66663 10.8556 8.73063 11.014 8.85863 11.142C8.98663 11.27 9.14485 11.3338 9.3333 11.3333C9.52218 11.3333 9.68063 11.2693 9.80863 11.1413C9.93663 11.0133 10.0004 10.8551 9.99996 10.6667V6C9.99996 5.81111 9.93596 5.65267 9.80796 5.52467C9.67996 5.39667 9.52174 5.33289 9.3333 5.33334C9.14441 5.33334 8.98596 5.39734 8.85796 5.52534C8.72996 5.65334 8.66618 5.81156 8.66663 6V10.6667Z' +}); +export default DeleteIcon; diff --git a/frontend/packages/ui/src/components/icons/DetailsMoreIcon.tsx b/frontend/packages/ui/src/components/icons/DetailsMoreIcon.tsx new file mode 100644 index 00000000000..a8b9447e250 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/DetailsMoreIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const ListIcon = createIcon({ + displayName: 'ListIcon', + viewBox: '0 0 17 16', + d: 'M1.83333 5.83317C1.83333 5.65636 1.90357 5.48679 2.02859 5.36177C2.15361 5.23674 2.32318 5.1665 2.49999 5.1665H14.5C14.6768 5.1665 14.8464 5.23674 14.9714 5.36177C15.0964 5.48679 15.1667 5.65636 15.1667 5.83317C15.1667 6.00998 15.0964 6.17955 14.9714 6.30457C14.8464 6.4296 14.6768 6.49984 14.5 6.49984H2.49999C2.32318 6.49984 2.15361 6.4296 2.02859 6.30457C1.90357 6.17955 1.83333 6.00998 1.83333 5.83317ZM1.83333 8.49984C1.83333 8.32303 1.90357 8.15346 2.02859 8.02843C2.15361 7.90341 2.32318 7.83317 2.49999 7.83317H14.5C14.6768 7.83317 14.8464 7.90341 14.9714 8.02843C15.0964 8.15346 15.1667 8.32303 15.1667 8.49984C15.1667 8.67665 15.0964 8.84622 14.9714 8.97124C14.8464 9.09627 14.6768 9.1665 14.5 9.1665H2.49999C2.32318 9.1665 2.15361 9.09627 2.02859 8.97124C1.90357 8.84622 1.83333 8.67665 1.83333 8.49984ZM2.49999 10.4998C2.32318 10.4998 2.15361 10.5701 2.02859 10.6951C1.90357 10.8201 1.83333 10.9897 1.83333 11.1665C1.83333 11.3433 1.90357 11.5129 2.02859 11.6379C2.15361 11.7629 2.32318 11.8332 2.49999 11.8332H10.5C10.6768 11.8332 10.8464 11.7629 10.9714 11.6379C11.0964 11.5129 11.1667 11.3433 11.1667 11.1665C11.1667 10.9897 11.0964 10.8201 10.9714 10.6951C10.8464 10.5701 10.6768 10.4998 10.5 10.4998H2.49999Z' +}); +export default ListIcon; diff --git a/frontend/packages/ui/src/components/icons/DnsIcon.tsx b/frontend/packages/ui/src/components/icons/DnsIcon.tsx new file mode 100644 index 00000000000..26c616cc82c --- /dev/null +++ b/frontend/packages/ui/src/components/icons/DnsIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const DnsIcon = createIcon({ + displayName: 'DnsIcon', + viewBox: '0 0 16 17', + d: 'M12.6667 10.3384V13.005H3.33333V10.3384H12.6667ZM13.3333 9.00505H2.66667C2.3 9.00505 2 9.30505 2 9.67171V13.6717C2 14.0384 2.3 14.3384 2.66667 14.3384H13.3333C13.7 14.3384 14 14.0384 14 13.6717V9.67171C14 9.30505 13.7 9.00505 13.3333 9.00505ZM4.66667 12.6717C4.12 12.6717 3.66667 12.225 3.66667 11.6717C3.66667 11.1184 4.12 10.6717 4.66667 10.6717C5.21333 10.6717 5.66667 11.1184 5.66667 11.6717C5.66667 12.225 5.22 12.6717 4.66667 12.6717ZM12.6667 3.67171V6.33838H3.33333V3.67171H12.6667ZM13.3333 2.33838H2.66667C2.3 2.33838 2 2.63838 2 3.00505V7.00505C2 7.37171 2.3 7.67171 2.66667 7.67171H13.3333C13.7 7.67171 14 7.37171 14 7.00505V3.00505C14 2.63838 13.7 2.33838 13.3333 2.33838ZM4.66667 6.00505C4.12 6.00505 3.66667 5.55838 3.66667 5.00505C3.66667 4.45171 4.12 4.00505 4.66667 4.00505C5.21333 4.00505 5.66667 4.45838 5.66667 5.00505C5.66667 5.55171 5.22 6.00505 4.66667 6.00505Z' +}); +export default DnsIcon; diff --git a/frontend/packages/ui/src/components/icons/DownloadIcon.tsx b/frontend/packages/ui/src/components/icons/DownloadIcon.tsx new file mode 100644 index 00000000000..d135bd7abf0 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/DownloadIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const DownloadIcon = createIcon({ + displayName: 'DownloadIcon', + viewBox: '0 0 17 17', + d: 'M8.50033 11.833L11.167 9.16634L10.2337 8.23301L9.16699 9.26634V6.49967H7.83366V9.26634L6.76699 8.23301L5.83366 9.16634L8.50033 11.833ZM4.50033 15.1663C4.13366 15.1663 3.81966 15.0357 3.55833 14.7743C3.29699 14.513 3.16655 14.1992 3.16699 13.833V5.83301L7.16699 1.83301H12.5003C12.867 1.83301 13.181 1.96367 13.4423 2.22501C13.7037 2.48634 13.8341 2.80012 13.8337 3.16634V13.833C13.8337 14.1997 13.703 14.5137 13.4417 14.775C13.1803 15.0363 12.8665 15.1668 12.5003 15.1663H4.50033ZM4.50033 13.833H12.5003V3.16634H7.73366L4.50033 6.39967V13.833Z' +}); +export default DownloadIcon; diff --git a/frontend/packages/ui/src/components/icons/EditIcon.tsx b/frontend/packages/ui/src/components/icons/EditIcon.tsx new file mode 100644 index 00000000000..6b8c5f36419 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/EditIcon.tsx @@ -0,0 +1,23 @@ +import { createIcon } from '@chakra-ui/react'; + +const EditIcon = createIcon({ + displayName: 'EditIcon', + viewBox: '0 0 16 16', + path: ( + + + + + + ) +}); +export default EditIcon; diff --git a/frontend/desktop/src/components/icons/ExchangeIcon.tsx b/frontend/packages/ui/src/components/icons/ExchangeIcon.tsx similarity index 100% rename from frontend/desktop/src/components/icons/ExchangeIcon.tsx rename to frontend/packages/ui/src/components/icons/ExchangeIcon.tsx diff --git a/frontend/packages/ui/src/components/icons/ExpandMoreIcon.tsx b/frontend/packages/ui/src/components/icons/ExpandMoreIcon.tsx new file mode 100644 index 00000000000..a5e468994f7 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/ExpandMoreIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const ExpanMoreIcon = createIcon({ + displayName: 'ExpanMoreIcon', + viewBox: '0 0 16 17', + d: 'M8.00045 10.2673C7.91156 10.2673 7.82823 10.2533 7.75045 10.2253C7.67267 10.1977 7.60045 10.1506 7.53378 10.0839L4.45045 7.0006C4.32823 6.87838 4.27 6.72549 4.27578 6.54194C4.28112 6.35883 4.34489 6.20616 4.46711 6.08394C4.58934 5.96171 4.74489 5.9006 4.93378 5.9006C5.12267 5.9006 5.27823 5.96171 5.40045 6.08394L8.00045 8.68394L10.6171 6.06727C10.7393 5.94505 10.8922 5.8866 11.0758 5.89194C11.2589 5.89771 11.4116 5.96171 11.5338 6.08394C11.656 6.20616 11.7171 6.36171 11.7171 6.5506C11.7171 6.73949 11.656 6.89505 11.5338 7.01727L8.46712 10.0839C8.40045 10.1506 8.32823 10.1977 8.25045 10.2253C8.17267 10.2533 8.08934 10.2673 8.00045 10.2673Z' +}); +export default ExpanMoreIcon; diff --git a/frontend/packages/ui/src/components/icons/FileIcon.tsx b/frontend/packages/ui/src/components/icons/FileIcon.tsx new file mode 100644 index 00000000000..5dce25ce66c --- /dev/null +++ b/frontend/packages/ui/src/components/icons/FileIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const FileIcon = createIcon({ + displayName: 'FileIcon', + viewBox: '0 0 21 21', + d: 'M12.5149 2.00513H5.84819C4.93153 2.00513 4.18986 2.75513 4.18986 3.67179L4.18153 17.0051C4.18153 17.9218 4.92319 18.6718 5.83986 18.6718H15.8482C16.7649 18.6718 17.5149 17.9218 17.5149 17.0051V7.00513L12.5149 2.00513ZM5.84819 17.0051V3.67179H11.6815V7.83846H15.8482V17.0051H5.84819Z' +}); +export default FileIcon; diff --git a/frontend/packages/ui/src/components/icons/FolderIcon.tsx b/frontend/packages/ui/src/components/icons/FolderIcon.tsx new file mode 100644 index 00000000000..7100a4c1397 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/FolderIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const FolderIcon = createIcon({ + displayName: 'FolderIcon', + viewBox: '0 0 21 21', + d: 'M4.18153 17.005C3.7232 17.005 3.33097 16.8419 3.00486 16.5158C2.6782 16.1891 2.51486 15.7966 2.51486 15.3383V5.3383C2.51486 4.87996 2.6782 4.48774 3.00486 4.16163C3.33097 3.83496 3.7232 3.67163 4.18153 3.67163H9.18153L10.8482 5.3383H17.5149C17.9732 5.3383 18.3657 5.50163 18.6924 5.8283C19.0185 6.15441 19.1815 6.54663 19.1815 7.00496V15.3383C19.1815 15.7966 19.0185 16.1891 18.6924 16.5158C18.3657 16.8419 17.9732 17.005 17.5149 17.005H4.18153Z' +}); +export default FolderIcon; diff --git a/frontend/desktop/src/components/icons/GithubIcon.tsx b/frontend/packages/ui/src/components/icons/GithubIcon.tsx similarity index 100% rename from frontend/desktop/src/components/icons/GithubIcon.tsx rename to frontend/packages/ui/src/components/icons/GithubIcon.tsx diff --git a/frontend/desktop/src/components/icons/GoogleIcon.tsx b/frontend/packages/ui/src/components/icons/GoogleIcon.tsx similarity index 100% rename from frontend/desktop/src/components/icons/GoogleIcon.tsx rename to frontend/packages/ui/src/components/icons/GoogleIcon.tsx diff --git a/frontend/packages/ui/src/components/icons/GroupAdd.tsx b/frontend/packages/ui/src/components/icons/GroupAdd.tsx new file mode 100644 index 00000000000..29c278bef8f --- /dev/null +++ b/frontend/packages/ui/src/components/icons/GroupAdd.tsx @@ -0,0 +1,9 @@ +import { createIcon } from '@chakra-ui/react'; + +const GroupAddIcon = createIcon({ + displayName: 'GroupAddIcon', + viewBox: '0 0 13 12', + d: 'M6.79004 5.975C7.03171 5.70833 7.21712 5.40417 7.34629 5.0625C7.47546 4.72083 7.54004 4.36667 7.54004 4C7.54004 3.63333 7.47546 3.27917 7.34629 2.9375C7.21712 2.59583 7.03171 2.29167 6.79004 2.025C7.29004 2.09167 7.70671 2.3125 8.04004 2.6875C8.37337 3.0625 8.54004 3.5 8.54004 4C8.54004 4.5 8.37337 4.9375 8.04004 5.3125C7.70671 5.6875 7.29004 5.90833 6.79004 5.975ZM9.54004 10V8.5C9.54004 8.2 9.47337 7.91458 9.34004 7.64375C9.20671 7.37292 9.03171 7.13333 8.81504 6.925C9.24004 7.075 9.63379 7.26875 9.99629 7.50625C10.3588 7.74375 10.54 8.075 10.54 8.5V10H9.54004ZM10.54 6.5V5.5H9.54004V4.5H10.54V3.5H11.54V4.5H12.54V5.5H11.54V6.5H10.54ZM4.54004 6C3.99004 6 3.51921 5.80417 3.12754 5.4125C2.73587 5.02083 2.54004 4.55 2.54004 4C2.54004 3.45 2.73587 2.97917 3.12754 2.5875C3.51921 2.19583 3.99004 2 4.54004 2C5.09004 2 5.56087 2.19583 5.95254 2.5875C6.34421 2.97917 6.54004 3.45 6.54004 4C6.54004 4.55 6.34421 5.02083 5.95254 5.4125C5.56087 5.80417 5.09004 6 4.54004 6ZM0.540039 10V8.6C0.540039 8.31667 0.612956 8.05625 0.758789 7.81875C0.904622 7.58125 1.09837 7.4 1.34004 7.275C1.85671 7.01667 2.38171 6.82292 2.91504 6.69375C3.44837 6.56458 3.99004 6.5 4.54004 6.5C5.09004 6.5 5.63171 6.56458 6.16504 6.69375C6.69837 6.82292 7.22337 7.01667 7.74004 7.275C7.98171 7.4 8.17546 7.58125 8.32129 7.81875C8.46712 8.05625 8.54004 8.31667 8.54004 8.6V10H0.540039ZM4.54004 5C4.81504 5 5.05046 4.90208 5.24629 4.70625C5.44212 4.51042 5.54004 4.275 5.54004 4C5.54004 3.725 5.44212 3.48958 5.24629 3.29375C5.05046 3.09792 4.81504 3 4.54004 3C4.26504 3 4.02962 3.09792 3.83379 3.29375C3.63796 3.48958 3.54004 3.725 3.54004 4C3.54004 4.275 3.63796 4.51042 3.83379 4.70625C4.02962 4.90208 4.26504 5 4.54004 5ZM1.54004 9H7.54004V8.6C7.54004 8.50833 7.51712 8.425 7.47129 8.35C7.42546 8.275 7.36504 8.21667 7.29004 8.175C6.84004 7.95 6.38587 7.78125 5.92754 7.66875C5.46921 7.55625 5.00671 7.5 4.54004 7.5C4.07337 7.5 3.61087 7.55625 3.15254 7.66875C2.69421 7.78125 2.24004 7.95 1.79004 8.175C1.71504 8.21667 1.65462 8.275 1.60879 8.35C1.56296 8.425 1.54004 8.50833 1.54004 8.6V9Z' +}); + +export default GroupAddIcon; diff --git a/frontend/packages/ui/src/components/icons/InfoCircleIcon.tsx b/frontend/packages/ui/src/components/icons/InfoCircleIcon.tsx new file mode 100644 index 00000000000..c651d20655c --- /dev/null +++ b/frontend/packages/ui/src/components/icons/InfoCircleIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const InfoCircleIcon = createIcon({ + displayName: 'InfoCircleIcon', + viewBox: '0 0 16 16', + d: 'M8.00004 1.33325C6.6815 1.33325 5.39257 1.72425 4.29624 2.45679C3.19991 3.18933 2.34543 4.23052 1.84085 5.4487C1.33626 6.66687 1.20424 8.00731 1.46148 9.30052C1.71871 10.5937 2.35365 11.7816 3.286 12.714C4.21835 13.6463 5.40624 14.2813 6.69944 14.5385C7.99265 14.7957 9.33309 14.6637 10.5513 14.1591C11.7694 13.6545 12.8106 12.8 13.5432 11.7037C14.2757 10.6074 14.6667 9.31846 14.6667 7.99992C14.6648 6.2324 13.9618 4.53784 12.7119 3.28802C11.4621 2.0382 9.76756 1.33519 8.00004 1.33325ZM8.00004 13.3333C6.94521 13.3333 5.91406 13.0205 5.037 12.4344C4.15994 11.8484 3.47635 11.0154 3.07269 10.0409C2.66902 9.06636 2.5634 7.994 2.76919 6.95944C2.97498 5.92487 3.48293 4.97456 4.22881 4.22868C4.97469 3.4828 5.925 2.97485 6.95956 2.76906C7.99413 2.56328 9.06648 2.66889 10.041 3.07256C11.0156 3.47623 11.8485 4.15982 12.4345 5.03688C13.0206 5.91394 13.3334 6.94509 13.3334 7.99992C13.3316 9.41387 12.7691 10.7694 11.7693 11.7692C10.7695 12.769 9.41399 13.3315 8.00004 13.3333ZM8.00004 7.66659C7.82323 7.66659 7.65366 7.73682 7.52864 7.86185C7.40362 7.98687 7.33338 8.15644 7.33338 8.33325V10.3333C7.33338 10.5101 7.40362 10.6796 7.52864 10.8047C7.65366 10.9297 7.82323 10.9999 8.00004 10.9999C8.17686 10.9999 8.34642 10.9297 8.47145 10.8047C8.59647 10.6796 8.66671 10.5101 8.66671 10.3333V8.33325C8.66671 8.15644 8.59647 7.98687 8.47145 7.86185C8.34642 7.73682 8.17686 7.66659 8.00004 7.66659ZM8.00004 4.99992C7.83523 4.99992 7.67411 5.04879 7.53707 5.14036C7.40003 5.23193 7.29322 5.36208 7.23014 5.51435C7.16707 5.66662 7.15057 5.83418 7.18272 5.99583C7.21488 6.15748 7.29424 6.30596 7.41079 6.42251C7.52733 6.53905 7.67582 6.61842 7.83747 6.65057C7.99912 6.68273 8.16668 6.66622 8.31895 6.60315C8.47122 6.54008 8.60137 6.43327 8.69294 6.29623C8.7845 6.15919 8.83338 5.99807 8.83338 5.83325C8.83338 5.61224 8.74558 5.40028 8.5893 5.244C8.43302 5.08772 8.22106 4.99992 8.00004 4.99992Z' +}); +export default InfoCircleIcon; diff --git a/frontend/packages/ui/src/components/icons/InfoIcon.tsx b/frontend/packages/ui/src/components/icons/InfoIcon.tsx new file mode 100644 index 00000000000..87d80f16840 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/InfoIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const InfoIcon = createIcon({ + displayName: 'InfoIcon', + viewBox: '0 0 20 21', + d: 'M5.83333 14.4245H11.6667V12.7578H5.83333V14.4245ZM5.83333 11.0911H14.1667V9.42448H5.83333V11.0911ZM5.83333 7.75781H14.1667V6.09115H5.83333V7.75781ZM4.16667 17.7578C3.70833 17.7578 3.31597 17.5946 2.98958 17.2682C2.66319 16.9418 2.5 16.5495 2.5 16.0911V4.42448C2.5 3.96615 2.66319 3.57378 2.98958 3.2474C3.31597 2.92101 3.70833 2.75781 4.16667 2.75781H15.8333C16.2917 2.75781 16.684 2.92101 17.0104 3.2474C17.3368 3.57378 17.5 3.96615 17.5 4.42448V16.0911C17.5 16.5495 17.3368 16.9418 17.0104 17.2682C16.684 17.5946 16.2917 17.7578 15.8333 17.7578H4.16667ZM4.16667 16.0911H15.8333V4.42448H4.16667V16.0911Z' +}); +export default InfoIcon; diff --git a/frontend/packages/ui/src/components/icons/LeftArrowIcon.tsx b/frontend/packages/ui/src/components/icons/LeftArrowIcon.tsx new file mode 100644 index 00000000000..f060116043e --- /dev/null +++ b/frontend/packages/ui/src/components/icons/LeftArrowIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const LeftArrowIcon = createIcon({ + displayName: 'LeftArrowIcon', + viewBox: '0 0 36 37', + d: 'M21 27.2578L12 18.2578L21 9.25781L23.1 11.3578L16.2 18.2578L23.1 25.1578L21 27.2578Z' +}); +export default LeftArrowIcon; diff --git a/frontend/packages/ui/src/components/icons/LinkIcon.tsx b/frontend/packages/ui/src/components/icons/LinkIcon.tsx new file mode 100644 index 00000000000..6d54f65f534 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/LinkIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const LinkIcon = createIcon({ + displayName: 'LinkIcon', + viewBox: '0 0 14 15', + d: 'M10.7124 9.40052L9.88756 8.57568L10.7124 7.75085C11.248 7.2016 11.5456 6.46346 11.5408 5.69633C11.536 4.9292 11.2291 4.19485 10.6867 3.65236C10.1443 3.10987 9.40998 2.80292 8.64285 2.798C7.87572 2.79309 7.13754 3.0906 6.58822 3.6261L5.76222 4.45093L4.93797 3.6261L5.7628 2.80127C6.52862 2.03545 7.56728 1.60522 8.65031 1.60522C9.73333 1.60522 10.772 2.03545 11.5378 2.80127C12.3036 3.56708 12.7338 4.60574 12.7338 5.68877C12.7338 6.77179 12.3036 7.81045 11.5378 8.57627L10.7124 9.40052ZM9.06272 11.0508L8.23789 11.8756C7.8587 12.2548 7.40853 12.5556 6.91309 12.7608C6.41765 12.966 5.88665 13.0716 5.35039 13.0716C4.81413 13.0716 4.28312 12.966 3.78768 12.7608C3.29225 12.5556 2.84208 12.2548 2.46289 11.8756C2.0837 11.4964 1.7829 11.0462 1.57769 10.5508C1.37247 10.0554 1.26685 9.52436 1.26685 8.9881C1.26685 8.45184 1.37247 7.92083 1.57769 7.4254C1.7829 6.92996 2.0837 6.47979 2.46289 6.1006L3.28772 5.27577L4.11314 6.1006L3.28772 6.92602C2.75222 7.47534 2.45471 8.21352 2.45962 8.98065C2.46454 9.74778 2.77149 10.4821 3.31398 11.0245C3.85647 11.5669 4.59082 11.8738 5.35795 11.8786C6.12509 11.8834 6.86322 11.5858 7.41247 11.0502L8.23789 10.2259L9.06272 11.0508ZM8.65031 4.86335L9.47514 5.68818L5.35039 9.81352L4.52555 8.9881L8.64972 4.86393L8.65031 4.86335Z' +}); +export default LinkIcon; diff --git a/frontend/packages/ui/src/components/icons/ListCheckIcon.tsx b/frontend/packages/ui/src/components/icons/ListCheckIcon.tsx new file mode 100644 index 00000000000..e37ca27ba29 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/ListCheckIcon.tsx @@ -0,0 +1,17 @@ +import { createIcon } from '@chakra-ui/react'; +const ListCheckIcon = createIcon({ + displayName: 'ListCheckIcon', + viewBox: '0 0 24 25', + path: ( + + + + ) +}); +export default ListCheckIcon; diff --git a/frontend/packages/ui/src/components/icons/ListIcon.tsx b/frontend/packages/ui/src/components/icons/ListIcon.tsx new file mode 100644 index 00000000000..d3af67ef60b --- /dev/null +++ b/frontend/packages/ui/src/components/icons/ListIcon.tsx @@ -0,0 +1,20 @@ +import { createIcon } from '@chakra-ui/react'; + +const ListIcon = createIcon({ + displayName: 'ListIcon', + viewBox: '0 0 20 20', + path: ( + + + + + + + + + ) +}); +export default ListIcon; diff --git a/frontend/packages/ui/src/components/icons/LogoutIcon.tsx b/frontend/packages/ui/src/components/icons/LogoutIcon.tsx new file mode 100644 index 00000000000..18c1d0ce412 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/LogoutIcon.tsx @@ -0,0 +1,19 @@ +import { createIcon } from '@chakra-ui/react'; + +const LogoutIcon = createIcon({ + displayName: 'LogoutIcon', + viewBox: '0 0 15 15', + path: ( + + + + + ) +}); +export default LogoutIcon; diff --git a/frontend/packages/ui/src/components/icons/MonitorIcon.tsx b/frontend/packages/ui/src/components/icons/MonitorIcon.tsx new file mode 100644 index 00000000000..9e758526205 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/MonitorIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const MonitorIcon = createIcon({ + displayName: 'MonitorIcon', + viewBox: '0 0 16 17', + d: 'M2.00004 6.33846C1.81115 6.33846 1.65271 6.27446 1.52471 6.14646C1.39671 6.01846 1.33293 5.86024 1.33338 5.67179V4.33846C1.33338 3.97179 1.46404 3.65779 1.72538 3.39646C1.98671 3.13513 2.30049 3.00468 2.66671 3.00513H13.3334C13.7 3.00513 14.014 3.13579 14.2754 3.39713C14.5367 3.65846 14.6672 3.97224 14.6667 4.33846V5.67179C14.6667 5.86068 14.6027 6.01913 14.4747 6.14713C14.3467 6.27513 14.1885 6.33891 14 6.33846C13.8112 6.33846 13.6527 6.27446 13.5247 6.14646C13.3967 6.01846 13.3329 5.86024 13.3334 5.67179V4.33846H2.66671V5.67179C2.66671 5.86068 2.60271 6.01913 2.47471 6.14713C2.34671 6.27513 2.18849 6.33891 2.00004 6.33846ZM2.66671 13.6718C2.30004 13.6718 1.98604 13.5411 1.72471 13.2798C1.46338 13.0185 1.33293 12.7047 1.33338 12.3385V11.0051C1.33338 10.8162 1.39738 10.6578 1.52538 10.5298C1.65338 10.4018 1.8116 10.338 2.00004 10.3385C2.18893 10.3385 2.34738 10.4025 2.47538 10.5305C2.60338 10.6585 2.66715 10.8167 2.66671 11.0051V12.3385H13.3334V11.0051C13.3334 10.8162 13.3974 10.6578 13.5254 10.5298C13.6534 10.4018 13.8116 10.338 14 10.3385C14.1889 10.3385 14.3474 10.4025 14.4754 10.5305C14.6034 10.6585 14.6672 10.8167 14.6667 11.0051V12.3385C14.6667 12.7051 14.536 13.0191 14.2747 13.2805C14.0134 13.5418 13.6996 13.6722 13.3334 13.6718H2.66671ZM6.66671 11.6718C6.78893 11.6718 6.9056 11.6411 7.01671 11.5798C7.12782 11.5185 7.21115 11.4269 7.26671 11.3051L9.33338 7.17179L10.0667 8.63846C10.1223 8.76068 10.2056 8.85246 10.3167 8.91379C10.4278 8.97513 10.5445 9.00557 10.6667 9.00513H14C14.1889 9.00513 14.3474 8.94113 14.4754 8.81313C14.6034 8.68513 14.6672 8.52691 14.6667 8.33846C14.6667 8.14957 14.6027 7.99113 14.4747 7.86313C14.3467 7.73513 14.1885 7.67135 14 7.67179H11.0834L9.93338 5.37179C9.81115 5.14957 9.61115 5.03846 9.33338 5.03846C9.0556 5.03846 8.8556 5.14957 8.73338 5.37179L6.66671 9.50513L5.93338 8.03846C5.87782 7.91624 5.79449 7.82446 5.68338 7.76313C5.57227 7.70179 5.4556 7.67135 5.33338 7.67179H2.00004C1.81115 7.67179 1.65271 7.73579 1.52471 7.86379C1.39671 7.99179 1.33293 8.15002 1.33338 8.33846C1.33338 8.52735 1.39738 8.68579 1.52538 8.81379C1.65338 8.94179 1.8116 9.00557 2.00004 9.00513H4.91671L6.06671 11.3051C6.12227 11.4274 6.2056 11.5191 6.31671 11.5805C6.42782 11.6418 6.54449 11.6722 6.66671 11.6718Z' +}); +export default MonitorIcon; diff --git a/frontend/packages/ui/src/components/icons/MoreIcon.tsx b/frontend/packages/ui/src/components/icons/MoreIcon.tsx new file mode 100644 index 00000000000..6bcc0b5b797 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/MoreIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const MoreIcon = createIcon({ + displayName: 'MoreIcon', + viewBox: '0 0 16 16', + d: 'M8 13.3333C7.63333 13.3333 7.31956 13.2028 7.05867 12.942C6.79733 12.6806 6.66667 12.3666 6.66667 12C6.66667 11.6333 6.79733 11.3193 7.05867 11.058C7.31956 10.7971 7.63333 10.6666 8 10.6666C8.36667 10.6666 8.68067 10.7971 8.942 11.058C9.20289 11.3193 9.33333 11.6333 9.33333 12C9.33333 12.3666 9.20289 12.6806 8.942 12.942C8.68067 13.2028 8.36667 13.3333 8 13.3333ZM8 9.33329C7.63333 9.33329 7.31956 9.20263 7.05867 8.94129C6.79733 8.6804 6.66667 8.36663 6.66667 7.99996C6.66667 7.63329 6.79733 7.31929 7.05867 7.05796C7.31956 6.79707 7.63333 6.66663 8 6.66663C8.36667 6.66663 8.68067 6.79707 8.942 7.05796C9.20289 7.31929 9.33333 7.63329 9.33333 7.99996C9.33333 8.36663 9.20289 8.6804 8.942 8.94129C8.68067 9.20263 8.36667 9.33329 8 9.33329ZM8 5.33329C7.63333 5.33329 7.31956 5.20263 7.05867 4.94129C6.79733 4.6804 6.66667 4.36663 6.66667 3.99996C6.66667 3.63329 6.79733 3.31951 7.05867 3.05863C7.31956 2.79729 7.63333 2.66663 8 2.66663C8.36667 2.66663 8.68067 2.79729 8.942 3.05863C9.20289 3.31951 9.33333 3.63329 9.33333 3.99996C9.33333 4.36663 9.20289 4.6804 8.942 4.94129C8.68067 5.20263 8.36667 5.33329 8 5.33329Z' +}); +export default MoreIcon; diff --git a/frontend/packages/ui/src/components/icons/RefreshIcon.tsx b/frontend/packages/ui/src/components/icons/RefreshIcon.tsx new file mode 100644 index 00000000000..0409b03267a --- /dev/null +++ b/frontend/packages/ui/src/components/icons/RefreshIcon.tsx @@ -0,0 +1,9 @@ +import { createIcon } from '@chakra-ui/react'; + +const RefreshIcon = createIcon({ + displayName: 'RefreshIcon', + viewBox: '0 0 24 24', + d: 'M19.1132 13.2401C18.8967 13.1726 18.6624 13.1935 18.4612 13.2981C18.26 13.4027 18.1084 13.5826 18.0393 13.7985C17.6334 15.0395 16.8421 16.1187 15.7806 16.8789C14.719 17.6392 13.4426 18.0408 12.1369 18.0255C10.5221 18.0439 8.96579 17.4211 7.80941 16.2937C6.65304 15.1663 5.99093 13.6264 5.96829 12.0115C5.99093 10.3967 6.65304 8.85672 7.80941 7.72933C8.96579 6.60194 10.5221 5.97914 12.1369 5.9975C13.5954 5.99398 15.009 6.50165 16.132 7.43227L14.2676 7.12298C14.1559 7.10459 14.0416 7.10848 13.9314 7.13441C13.8212 7.16034 13.7172 7.2078 13.6253 7.27407C13.5335 7.34034 13.4557 7.42411 13.3964 7.52056C13.337 7.61701 13.2974 7.72423 13.2796 7.83607C13.2612 7.9478 13.2651 8.06207 13.291 8.1723C13.317 8.28253 13.3644 8.38654 13.4307 8.47836C13.497 8.57018 13.5807 8.64799 13.6772 8.70733C13.7736 8.76666 13.8809 8.80634 13.9927 8.82409L17.6355 9.42549H17.7815C17.8812 9.42537 17.98 9.40793 18.0736 9.37394C18.1051 9.36199 18.1342 9.34454 18.1596 9.32239C18.2212 9.29948 18.279 9.26764 18.3314 9.22789L18.4087 9.13338C18.4087 9.09042 18.486 9.05606 18.5204 9.00451C18.5548 8.95296 18.5204 8.91859 18.5634 8.88423C18.5871 8.83419 18.6072 8.78251 18.6235 8.72958L19.2678 5.293C19.2893 5.18018 19.2883 5.06423 19.2649 4.9518C19.2415 4.83936 19.1963 4.73262 19.1316 4.63768C19.067 4.54275 18.9843 4.46147 18.8883 4.39849C18.7923 4.33551 18.6848 4.29206 18.5719 4.27062C18.4591 4.24918 18.3432 4.25018 18.2307 4.27355C18.1183 4.29692 18.0116 4.34221 17.9166 4.40683C17.7249 4.53734 17.5929 4.73867 17.5496 4.96653L17.3176 6.21229C15.8794 4.96587 14.0401 4.27958 12.1369 4.27921C10.0664 4.26088 8.07305 5.06472 6.59444 6.51434C5.11582 7.96397 4.27267 9.94096 4.25 12.0115C4.27267 14.0821 5.11582 16.0591 6.59444 17.5087C8.07305 18.9583 10.0664 19.7621 12.1369 19.7438C13.815 19.7696 15.457 19.2559 16.8211 18.2784C18.1853 17.3009 19.1996 15.9113 19.7146 14.314C19.7472 14.204 19.7574 14.0886 19.7447 13.9746C19.732 13.8606 19.6965 13.7503 19.6405 13.6502C19.5844 13.5501 19.5089 13.4622 19.4183 13.3918C19.3278 13.3214 19.224 13.2698 19.1132 13.2401Z' +}); + +export default RefreshIcon; diff --git a/frontend/desktop/src/components/icons/RightArrow.tsx b/frontend/packages/ui/src/components/icons/RightArrow.tsx similarity index 100% rename from frontend/desktop/src/components/icons/RightArrow.tsx rename to frontend/packages/ui/src/components/icons/RightArrow.tsx diff --git a/frontend/packages/ui/src/components/icons/SearchIcon.tsx b/frontend/packages/ui/src/components/icons/SearchIcon.tsx new file mode 100644 index 00000000000..b81b6dd9289 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/SearchIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const SearchIcon = createIcon({ + displayName: 'SearchIcon', + viewBox: '0 0 17 17', + d: 'M14.7803 13.865L12.3069 11.4116C13.267 10.2146 13.7319 8.69518 13.6061 7.16585C13.4804 5.63652 12.7734 4.2135 11.6306 3.18941C10.4879 2.16532 8.99615 1.61799 7.46222 1.65996C5.9283 1.70194 4.46876 2.33002 3.3837 3.41508C2.29865 4.50013 1.67056 5.95967 1.62859 7.4936C1.58662 9.02752 2.13395 10.5192 3.15804 11.662C4.18213 12.8048 5.60514 13.5117 7.13448 13.6375C8.66381 13.7633 10.1832 13.2984 11.3803 12.3383L13.8336 14.7916C13.8956 14.8541 13.9693 14.9037 14.0506 14.9376C14.1318 14.9714 14.2189 14.9888 14.3069 14.9888C14.395 14.9888 14.4821 14.9714 14.5633 14.9376C14.6446 14.9037 14.7183 14.8541 14.7803 14.7916C14.9004 14.6673 14.9676 14.5012 14.9676 14.3283C14.9676 14.1554 14.9004 13.9893 14.7803 13.865ZM7.64028 12.3383C6.7173 12.3383 5.81504 12.0646 5.04762 11.5518C4.28019 11.0391 3.68205 10.3102 3.32884 9.45751C2.97563 8.60478 2.88321 7.66647 3.06328 6.76123C3.24334 5.85598 3.6878 5.02446 4.34044 4.37182C4.99309 3.71917 5.82461 3.27471 6.72986 3.09465C7.6351 2.91459 8.57341 3.007 9.42613 3.36021C10.2789 3.71342 11.0077 4.31156 11.5205 5.07899C12.0332 5.84642 12.3069 6.74867 12.3069 7.67165C12.3069 8.90933 11.8153 10.0963 10.9401 10.9715C10.0649 11.8467 8.87795 12.3383 7.64028 12.3383Z' +}); +export default SearchIcon; diff --git a/frontend/packages/ui/src/components/icons/SettingIcon.tsx b/frontend/packages/ui/src/components/icons/SettingIcon.tsx new file mode 100644 index 00000000000..54118663594 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/SettingIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; +const SettingIcon = createIcon({ + displayName: 'SettingIcon', + viewBox: '0 0 17 17', + d: 'M13.7663 8.94009C13.6594 8.81843 13.6004 8.66203 13.6004 8.50009C13.6004 8.33815 13.6594 8.18175 13.7663 8.06009L14.6196 7.10009C14.7136 6.99521 14.772 6.86323 14.7864 6.7231C14.8008 6.58297 14.7704 6.44188 14.6996 6.32009L13.3663 4.01343C13.2962 3.89177 13.1895 3.79534 13.0614 3.73788C12.9333 3.68042 12.7904 3.66487 12.6529 3.69343L11.3996 3.94676C11.2401 3.97971 11.0741 3.95315 10.9329 3.87209C10.7916 3.79103 10.6849 3.66108 10.6329 3.50676L10.2263 2.28676C10.1815 2.15435 10.0963 2.03934 9.98269 1.95799C9.86904 1.87664 9.7327 1.83307 9.59294 1.83343H6.92627C6.78089 1.82584 6.63703 1.86604 6.51665 1.9479C6.39627 2.02976 6.30599 2.14877 6.2596 2.28676L5.88627 3.50676C5.83427 3.66108 5.72759 3.79103 5.58635 3.87209C5.44511 3.95315 5.27908 3.97971 5.1196 3.94676L3.83294 3.69343C3.70264 3.67501 3.56981 3.69557 3.45117 3.75252C3.33254 3.80946 3.23341 3.90025 3.16627 4.01343L1.83294 6.32009C1.76038 6.44053 1.72775 6.58082 1.73973 6.72091C1.7517 6.861 1.80766 6.99372 1.89961 7.10009L2.74627 8.06009C2.85315 8.18175 2.91209 8.33815 2.91209 8.50009C2.91209 8.66203 2.85315 8.81843 2.74627 8.94009L1.89961 9.90009C1.80766 10.0065 1.7517 10.1392 1.73973 10.2793C1.72775 10.4194 1.76038 10.5597 1.83294 10.6801L3.16627 12.9868C3.23634 13.1084 3.34302 13.2048 3.47111 13.2623C3.5992 13.3198 3.74215 13.3353 3.87961 13.3068L5.13294 13.0534C5.29242 13.0205 5.45844 13.047 5.59968 13.1281C5.74092 13.2092 5.84761 13.3391 5.89961 13.4934L6.30627 14.7134C6.35266 14.8514 6.44294 14.9704 6.56332 15.0523C6.6837 15.1341 6.82756 15.1743 6.97294 15.1668H9.6396C9.77937 15.1671 9.91571 15.1235 10.0294 15.0422C10.143 14.9609 10.2282 14.8458 10.2729 14.7134L10.6796 13.4934C10.7316 13.3391 10.8383 13.2092 10.9795 13.1281C11.1208 13.047 11.2868 13.0205 11.4463 13.0534L12.6996 13.3068C12.8371 13.3353 12.98 13.3198 13.1081 13.2623C13.2362 13.2048 13.3429 13.1084 13.4129 12.9868L14.7463 10.6801C14.8171 10.5583 14.8474 10.4172 14.8331 10.2771C14.8187 10.137 14.7603 10.005 14.6663 9.90009L13.7663 8.94009ZM12.7729 9.83343L13.3063 10.4334L12.4529 11.9134L11.6663 11.7534C11.1861 11.6553 10.6867 11.7368 10.2627 11.9826C9.83868 12.2284 9.5197 12.6213 9.36627 13.0868L9.11294 13.8334H7.40627L7.16627 13.0734C7.01284 12.608 6.69386 12.2151 6.26988 11.9693C5.84589 11.7235 5.34642 11.6419 4.86627 11.7401L4.07961 11.9001L3.21294 10.4268L3.74627 9.82676C4.07424 9.46008 4.25556 8.98538 4.25556 8.49343C4.25556 8.00147 4.07424 7.52677 3.74627 7.16009L3.21294 6.56009L4.06627 5.09343L4.85294 5.25343C5.33309 5.35157 5.83256 5.27001 6.25654 5.02423C6.68053 4.77844 6.99951 4.38553 7.15294 3.92009L7.40627 3.16676H9.11294L9.36627 3.92676C9.5197 4.3922 9.83868 4.7851 10.2627 5.03089C10.6867 5.27668 11.1861 5.35824 11.6663 5.26009L12.4529 5.10009L13.3063 6.58009L12.7729 7.18009C12.4486 7.54593 12.2696 8.01788 12.2696 8.50676C12.2696 8.99564 12.4486 9.46759 12.7729 9.83343ZM8.2596 5.83343C7.73219 5.83343 7.21662 5.98982 6.77808 6.28284C6.33955 6.57586 5.99776 6.99233 5.79593 7.4796C5.59409 7.96687 5.54128 8.50305 5.64418 9.02033C5.74707 9.53762 6.00105 10.0128 6.37399 10.3857C6.74693 10.7587 7.22208 11.0126 7.73936 11.1155C8.25665 11.2184 8.79282 11.1656 9.28009 10.9638C9.76736 10.7619 10.1838 10.4201 10.4769 9.98161C10.7699 9.54308 10.9263 9.02751 10.9263 8.50009C10.9263 7.79285 10.6453 7.11457 10.1452 6.61448C9.64513 6.11438 8.96685 5.83343 8.2596 5.83343ZM8.2596 9.83343C7.9959 9.83343 7.73811 9.75523 7.51884 9.60872C7.29958 9.46221 7.12868 9.25397 7.02777 9.01034C6.92685 8.7667 6.90044 8.49861 6.95189 8.23997C7.00334 7.98133 7.13033 7.74375 7.3168 7.55728C7.50327 7.37081 7.74084 7.24383 7.99948 7.19238C8.25813 7.14093 8.52621 7.16734 8.76985 7.26825C9.01348 7.36917 9.22172 7.54007 9.36823 7.75933C9.51474 7.9786 9.59294 8.23639 9.59294 8.50009C9.59294 8.85372 9.45246 9.19285 9.20241 9.4429C8.95237 9.69295 8.61323 9.83343 8.2596 9.83343Z' +}); + +export default SettingIcon; diff --git a/frontend/packages/ui/src/components/icons/StorageIcon.tsx b/frontend/packages/ui/src/components/icons/StorageIcon.tsx new file mode 100644 index 00000000000..6cdfee5163f --- /dev/null +++ b/frontend/packages/ui/src/components/icons/StorageIcon.tsx @@ -0,0 +1,19 @@ +import { createIcon } from '@chakra-ui/react'; + +const StorageIcon = createIcon({ + displayName: 'StorageIcon', + viewBox: '0 0 40 40', + path: ( + + + + + ) +}); +export default StorageIcon; diff --git a/frontend/packages/ui/src/components/icons/UploadIcon.tsx b/frontend/packages/ui/src/components/icons/UploadIcon.tsx new file mode 100644 index 00000000000..32f0ffc3b24 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/UploadIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const UploadIcon = createIcon({ + displayName: 'UploadIcon', + viewBox: '0 0 24 25', + d: 'M6.5 20.3384C4.98 20.3384 3.68333 19.815 2.61 18.7684C1.53667 17.715 1 16.4317 1 14.9184C1 13.6184 1.39 12.4584 2.17 11.4384C2.95667 10.4184 3.98333 9.76838 5.25 9.48838C5.67 7.95505 6.50333 6.71505 7.75 5.76838C9.00333 4.81505 10.42 4.33838 12 4.33838C13.9533 4.33838 15.6067 5.01838 16.96 6.37838C18.32 7.73171 19 9.38505 19 11.3384C20.1533 11.4717 21.1067 11.9717 21.86 12.8384C22.62 13.6917 23 14.6917 23 15.8384C23 17.0917 22.5633 18.155 21.69 19.0284C20.8167 19.9017 19.7533 20.3384 18.5 20.3384H13C12.4533 20.3384 11.9833 20.1417 11.59 19.7484C11.1967 19.3617 11 18.8917 11 18.3384V13.1884L9.4 14.7384L8 13.3384L12 9.33838L16 13.3384L14.6 14.7384L13 13.1884V18.3384H18.5C19.2 18.3384 19.79 18.095 20.27 17.6084C20.7567 17.1284 21 16.5384 21 15.8384C21 15.1384 20.7567 14.5484 20.27 14.0684C19.79 13.5817 19.2 13.3384 18.5 13.3384H17V11.3384C17 9.95838 16.5133 8.77838 15.54 7.79838C14.5667 6.82505 13.3867 6.33838 12 6.33838C10.62 6.33838 9.44 6.82505 8.46 7.79838C7.48667 8.77838 7 9.95838 7 11.3384H6.5C5.53333 11.3384 4.71 11.6817 4.03 12.3684C3.34333 13.0484 3 13.8717 3 14.8384C3 15.805 3.34333 16.6384 4.03 17.3384C4.71 18.005 5.53333 18.3384 6.5 18.3384H9V20.3384' +}); +export default UploadIcon; diff --git a/frontend/packages/ui/src/components/icons/VisibilityIcon.tsx b/frontend/packages/ui/src/components/icons/VisibilityIcon.tsx new file mode 100644 index 00000000000..264dce6c134 --- /dev/null +++ b/frontend/packages/ui/src/components/icons/VisibilityIcon.tsx @@ -0,0 +1,8 @@ +import { createIcon } from '@chakra-ui/react'; + +const VisibityIcon = createIcon({ + displayName: 'VisibityIcon', + viewBox: '0 0 14 15', + d: 'M6.99992 3.8383C9.21075 3.8383 11.1824 5.0808 12.1449 7.04663C11.1824 9.01246 9.21075 10.255 6.99992 10.255C4.78909 10.255 2.81742 9.01246 1.85492 7.04663C2.81742 5.0808 4.78909 3.8383 6.99992 3.8383ZM6.99992 2.67163C4.08325 2.67163 1.59242 4.4858 0.583252 7.04663C1.59242 9.60746 4.08325 11.4216 6.99992 11.4216C9.91659 11.4216 12.4074 9.60746 13.4166 7.04663C12.4074 4.4858 9.91659 2.67163 6.99992 2.67163ZM6.99992 5.5883C7.80492 5.5883 8.45825 6.24163 8.45825 7.04663C8.45825 7.85163 7.80492 8.50496 6.99992 8.50496C6.19492 8.50496 5.54159 7.85163 5.54159 7.04663C5.54159 6.24163 6.19492 5.5883 6.99992 5.5883ZM6.99992 4.42163C5.55325 4.42163 4.37492 5.59996 4.37492 7.04663C4.37492 8.4933 5.55325 9.67163 6.99992 9.67163C8.44659 9.67163 9.62492 8.4933 9.62492 7.04663C9.62492 5.59996 8.44659 4.42163 6.99992 4.42163Z' +}); +export default VisibityIcon; diff --git a/frontend/desktop/src/components/icons/WechatIcon.tsx b/frontend/packages/ui/src/components/icons/WechatIcon.tsx similarity index 100% rename from frontend/desktop/src/components/icons/WechatIcon.tsx rename to frontend/packages/ui/src/components/icons/WechatIcon.tsx diff --git a/frontend/packages/ui/src/components/index.ts b/frontend/packages/ui/src/components/index.ts index 014c1205517..6826be81084 100644 --- a/frontend/packages/ui/src/components/index.ts +++ b/frontend/packages/ui/src/components/index.ts @@ -1,3 +1,80 @@ import EditTabs from './EditTabs'; import YamlCode from './YamlCode'; -export { YamlCode, EditTabs }; +import CopyIcon from './icons/CopyIcon'; +import DownloadIcon from './icons/DownloadIcon'; +import DeleteIcon from './icons/DeleteIcon'; +import AddIcon from './icons/AddIcon'; +import ArrowDownSLineIcon from './icons/ArrowDownSLineIcon'; +import ArrowExchangeIcon from './icons/ArrowExchangeIcon'; +import BucketIcon from './icons/BucketIcon'; +import CreateFolderIcon from './icons/CreateFolderIcon'; +import DnsIcon from './icons/DnsIcon'; +import EditIcon from './icons/EditIcon'; +import ExpanMoreIcon from './icons/ExpandMoreIcon'; +import ExchangeIcon from './icons/ExchangeIcon'; +import FileIcon from './icons/FileIcon'; +import FolderIcon from './icons/FolderIcon'; +import GroupAddIcon from './icons/GroupAdd'; +import InfoCircleIcon from './icons/InfoCircleIcon'; +import InfoIcon from './icons/InfoIcon'; +import LeftArrowIcon from './icons/LeftArrowIcon'; +import RightArrowIcon from './icons/RightArrow'; +import LinkIcon from './icons/LinkIcon'; +import ListCheckIcon from './icons/ListCheckIcon'; +import DetailsMoreIcon from './icons/DetailsMoreIcon'; +import MonitorIcon from './icons/MonitorIcon'; +import MoreIcon from './icons/MoreIcon'; +import RefreshIcon from './icons/RefreshIcon'; +import SearchIcon from './icons/SearchIcon'; +import StorageIcon from './icons/StorageIcon'; +import ClearOutlineIcon from './icons/ClearOutlineIcon'; +import UploadIcon from './icons/UploadIcon'; +import VisibityIcon from './icons/VisibilityIcon'; +import CancelIcon from './icons/CancelIcon'; +import SettingIcon from './icons/SettingIcon'; +import LogoutIcon from './icons/LogoutIcon'; +import GithubIcon from './icons/GithubIcon'; +import GoogleIcon from './icons/GoogleIcon'; +import WechatIcon from './icons/WechatIcon'; +import ListIcon from './icons/ListIcon'; +export { + YamlCode, + EditTabs, + AddIcon, + ArrowDownSLineIcon, + ArrowExchangeIcon, + BucketIcon, + CreateFolderIcon, + ClearOutlineIcon, + CopyIcon, + DeleteIcon, + DnsIcon, + DetailsMoreIcon, + DownloadIcon, + EditIcon, + ExchangeIcon, + ExpanMoreIcon, + CancelIcon, + FileIcon, + FolderIcon, + GroupAddIcon, + GithubIcon, + GoogleIcon, + InfoCircleIcon, + InfoIcon, + LeftArrowIcon, + LinkIcon, + ListCheckIcon, + LogoutIcon, + ListIcon, + MonitorIcon, + MoreIcon, + RefreshIcon, + RightArrowIcon, + SearchIcon, + SettingIcon, + StorageIcon, + UploadIcon, + VisibityIcon, + WechatIcon +}; diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 846b9986d4b..65724c64ace 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -293,7 +293,7 @@ importers: version: 15.2.3(rollup@2.79.1) '@rollup/plugin-typescript': specifier: ^11.1.4 - version: 11.1.4(rollup@2.79.1)(tslib@2.6.2)(typescript@4.9.5) + version: 11.1.4(rollup@2.79.1)(tslib@2.6.2)(typescript@5.2.2) '@types/react': specifier: ^18.2.37 version: 18.2.37 @@ -305,16 +305,19 @@ importers: version: 2.79.1 rollup-plugin-dts: specifier: ^4.2.3 - version: 4.2.3(rollup@2.79.1)(typescript@4.9.5) + version: 4.2.3(rollup@2.79.1)(typescript@5.2.2) rollup-plugin-terser: specifier: ^7.0.2 version: 7.0.2(rollup@2.79.1) rollup-plugin-typescript2: specifier: ^0.36.0 - version: 0.36.0(rollup@2.79.1)(typescript@4.9.5) + version: 0.36.0(rollup@2.79.1)(typescript@5.2.2) tslib: specifier: ^2.6.2 version: 2.6.2 + typescript: + specifier: ^5.2.2 + version: 5.2.2 providers/adminer: dependencies: @@ -6576,6 +6579,26 @@ packages: typescript: 4.9.5 dev: true + /@rollup/plugin-typescript@11.1.4(rollup@2.79.1)(tslib@2.6.2)(typescript@5.2.2): + resolution: {integrity: sha512-WZRh5LBVLQXdKFICUId5J3eIpmjGURaBqntfg3GSZACgeOAFS+lOSMGTwfzDkELTaZVp/lWdMVNU3UkwCUBg/Q==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.4(rollup@2.79.1) + resolve: 1.22.6 + rollup: 2.79.1 + tslib: 2.6.2 + typescript: 5.2.2 + dev: true + /@rollup/pluginutils@3.1.0(rollup@2.79.1): resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} engines: {node: '>= 8.0.0'} @@ -15088,6 +15111,20 @@ packages: '@babel/code-frame': 7.22.13 dev: true + /rollup-plugin-dts@4.2.3(rollup@2.79.1)(typescript@5.2.2): + resolution: {integrity: sha512-jlcpItqM2efqfIiKzDB/IKOS9E9fDvbkJSGw5GtK/PqPGS9eC3R3JKyw2VvpTktZA+TNgJRMu1NTv244aTUzzQ==} + engines: {node: '>=v12.22.12'} + peerDependencies: + rollup: ^2.55 + typescript: ^4.1 + dependencies: + magic-string: 0.26.7 + rollup: 2.79.1 + typescript: 5.2.2 + optionalDependencies: + '@babel/code-frame': 7.22.13 + dev: true + /rollup-plugin-peer-deps-external@2.2.4(rollup@2.79.1): resolution: {integrity: sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==} peerDependencies: @@ -15108,7 +15145,7 @@ packages: serialize-javascript: 4.0.0 terser: 5.20.0 - /rollup-plugin-typescript2@0.36.0(rollup@2.79.1)(typescript@4.9.5): + /rollup-plugin-typescript2@0.36.0(rollup@2.79.1)(typescript@5.2.2): resolution: {integrity: sha512-NB2CSQDxSe9+Oe2ahZbf+B4bh7pHwjV5L+RSYpCu7Q5ROuN94F9b6ioWwKfz3ueL3KTtmX4o2MUH2cgHDIEUsw==} peerDependencies: rollup: '>=1.26.3' @@ -15120,7 +15157,7 @@ packages: rollup: 2.79.1 semver: 7.5.4 tslib: 2.6.2 - typescript: 4.9.5 + typescript: 5.2.2 dev: true /rollup@2.79.1: