-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor:license optimized deployment command form (#4532)
* refactor:license optimized deployment command form Signed-off-by: jingyang <3161362058@qq.com> * fix --------- Signed-off-by: jingyang <3161362058@qq.com>
- Loading branch information
Showing
27 changed files
with
4,806 additions
and
5,452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Icon, IconProps } from '@chakra-ui/react'; | ||
|
||
export const AddIcon = (props: IconProps) => { | ||
return ( | ||
<Icon | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="18px" | ||
height="18px" | ||
viewBox="0 0 18 18" | ||
fill="#485264" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M9 3C9.41421 3 9.75 3.33579 9.75 3.75V8.25H14.25C14.6642 8.25 15 8.58579 15 9C15 9.41421 14.6642 9.75 14.25 9.75H9.75V14.25C9.75 14.6642 9.41421 15 9 15C8.58579 15 8.25 14.6642 8.25 14.25V9.75H3.75C3.33579 9.75 3 9.41421 3 9C3 8.58579 3.33579 8.25 3.75 8.25H8.25V3.75C8.25 3.33579 8.58579 3 9 3Z" | ||
/> | ||
</Icon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Icon, IconProps } from '@chakra-ui/react'; | ||
export const BookIcon = (props: IconProps) => { | ||
return ( | ||
<Icon | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="12px" | ||
height="13px" | ||
viewBox="0 0 12 13" | ||
fill="#111824" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M2.76076 2.1832L2.99243 2.1832C3.50372 2.18319 3.91951 2.18319 4.25694 2.21076C4.60546 2.23923 4.91673 2.29974 5.20634 2.4473C5.51564 2.6049 5.78572 2.82618 5.99997 3.09456C6.21422 2.82618 6.48429 2.6049 6.7936 2.4473C7.08321 2.29974 7.39448 2.23923 7.74299 2.21076C8.08042 2.18319 8.49621 2.18319 9.0075 2.1832L9.23917 2.1832C9.48728 2.18319 9.70459 2.18318 9.88424 2.19786C10.0749 2.21343 10.2692 2.24814 10.4576 2.3441C10.7353 2.48563 10.9612 2.71147 11.1027 2.98924C11.1987 3.17759 11.2334 3.37193 11.2489 3.56256C11.2636 3.74221 11.2636 3.95952 11.2636 4.20762V8.79236C11.2636 9.04046 11.2636 9.25777 11.2489 9.43742C11.2334 9.62805 11.1987 9.82239 11.1027 10.0107C10.9612 10.2885 10.7353 10.5143 10.4576 10.6559C10.2692 10.7518 10.0749 10.7865 9.88424 10.8021C9.70459 10.8168 9.48727 10.8168 9.23916 10.8168H2.76077C2.51266 10.8168 2.29535 10.8168 2.11569 10.8021C1.92506 10.7865 1.73072 10.7518 1.54238 10.6559C1.2646 10.5143 1.03876 10.2885 0.897231 10.0107C0.801266 9.82239 0.766562 9.62805 0.750987 9.43742C0.736309 9.25777 0.736318 9.04045 0.736329 8.79235V4.20763C0.736318 3.95953 0.736309 3.74221 0.750987 3.56256C0.766562 3.37193 0.801266 3.17759 0.897231 2.98924C1.03876 2.71147 1.2646 2.48563 1.54238 2.3441C1.73072 2.24814 1.92506 2.21343 2.11569 2.19786C2.29534 2.18318 2.51266 2.18319 2.76076 2.1832ZM5.47056 5.74251C5.47056 5.20349 5.47015 4.83107 5.44652 4.54185C5.4234 4.25881 5.3807 4.10239 5.32186 3.98692C5.19107 3.73021 4.98236 3.5215 4.72565 3.3907C4.61018 3.33187 4.45376 3.28917 4.17072 3.26605C3.8815 3.24242 3.50908 3.242 2.97006 3.242H2.78069C2.50681 3.242 2.33324 3.24242 2.20191 3.25315C2.07676 3.26337 2.03726 3.28027 2.02306 3.2875C1.94452 3.32753 1.88066 3.39139 1.84063 3.46993C1.8334 3.48413 1.8165 3.52363 1.80628 3.64878C1.79555 3.78011 1.79514 3.95368 1.79514 4.22756V8.77242C1.79514 9.0463 1.79555 9.21987 1.80628 9.3512C1.8165 9.47635 1.8334 9.51584 1.84063 9.53004C1.88066 9.60859 1.94452 9.67245 2.02306 9.71247C2.03726 9.71971 2.07676 9.73661 2.20191 9.74683C2.33324 9.75756 2.50681 9.75797 2.78069 9.75797H5.47056V5.74251ZM6.52937 9.75797V5.74251C6.52937 5.20349 6.52978 4.83107 6.55341 4.54185C6.57654 4.25881 6.61923 4.10239 6.67807 3.98692C6.80887 3.73021 7.01758 3.5215 7.27429 3.3907C7.38976 3.33187 7.54617 3.28917 7.82921 3.26605C8.11843 3.24242 8.49086 3.242 9.02988 3.242H9.21925C9.49312 3.242 9.66669 3.24242 9.79802 3.25315C9.92317 3.26337 9.96267 3.28027 9.97687 3.2875C10.0554 3.32753 10.1193 3.39139 10.1593 3.46993C10.1665 3.48413 10.1834 3.52363 10.1937 3.64878C10.2044 3.78011 10.2048 3.95368 10.2048 4.22756V8.77242C10.2048 9.0463 10.2044 9.21987 10.1937 9.3512C10.1834 9.47635 10.1665 9.51584 10.1593 9.53004C10.1193 9.60859 10.0554 9.67245 9.97687 9.71247C9.96267 9.71971 9.92317 9.73661 9.79802 9.74683C9.66669 9.75756 9.49312 9.75797 9.21925 9.75797H6.52937Z" | ||
/> | ||
</Icon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Icon, IconProps } from '@chakra-ui/react'; | ||
export const CodeIcon = (props: IconProps) => { | ||
return ( | ||
<Icon | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="18px" | ||
height="18px" | ||
viewBox="0 0 18 18" | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M10.6627 1.51785C11.067 1.60771 11.322 2.00834 11.2321 2.41269L8.23214 15.9127C8.14228 16.317 7.74165 16.572 7.3373 16.4821C6.93295 16.3923 6.678 15.9916 6.76786 15.5873L9.76786 2.08729C9.85772 1.68295 10.2583 1.428 10.6627 1.51785ZM5.78033 4.71966C6.07322 5.01256 6.07322 5.48743 5.78033 5.78032L2.56066 8.99999L5.78033 12.2197C6.07322 12.5126 6.07322 12.9874 5.78033 13.2803C5.48744 13.5732 5.01256 13.5732 4.71967 13.2803L0.96967 9.53032C0.676777 9.23743 0.676777 8.76256 0.96967 8.46966L4.71967 4.71966C5.01256 4.42677 5.48744 4.42677 5.78033 4.71966ZM12.2197 4.71966C12.5126 4.42677 12.9874 4.42677 13.2803 4.71966L17.0303 8.46966C17.3232 8.76256 17.3232 9.23743 17.0303 9.53032L13.2803 13.2803C12.9874 13.5732 12.5126 13.5732 12.2197 13.2803C11.9268 12.9874 11.9268 12.5126 12.2197 12.2197L15.4393 8.99999L12.2197 5.78032C11.9268 5.48743 11.9268 5.01256 12.2197 4.71966Z" | ||
fill="#111824" | ||
/> | ||
</Icon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Icon, IconProps } from '@chakra-ui/react'; | ||
export const InfoIcon = (props: IconProps) => { | ||
return ( | ||
<Icon | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="16px" | ||
height="16px" | ||
viewBox="0 0 16 16" | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M8 2.34627C4.87753 2.34627 2.34627 4.87753 2.34627 8C2.34627 11.1225 4.87753 13.6537 8 13.6537C11.1225 13.6537 13.6537 11.1225 13.6537 8C13.6537 4.87753 11.1225 2.34627 8 2.34627ZM1.01294 8C1.01294 4.14115 4.14115 1.01294 8 1.01294C11.8588 1.01294 14.9871 4.14115 14.9871 8C14.9871 11.8588 11.8588 14.9871 8 14.9871C4.14115 14.9871 1.01294 11.8588 1.01294 8ZM7.33333 5.47184C7.33333 5.10365 7.63181 4.80518 8 4.80518H8.00632C8.37451 4.80518 8.67299 5.10365 8.67299 5.47184C8.67299 5.84003 8.37451 6.13851 8.00632 6.13851H8C7.63181 6.13851 7.33333 5.84003 7.33333 5.47184ZM8 7.33333C8.36819 7.33333 8.66667 7.63181 8.66667 8V10.5282C8.66667 10.8963 8.36819 11.1948 8 11.1948C7.63181 11.1948 7.33333 10.8963 7.33333 10.5282V8C7.33333 7.63181 7.63181 7.33333 8 7.33333Z" | ||
fill="#0884DD" | ||
/> | ||
</Icon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Icon, IconProps } from '@chakra-ui/react'; | ||
|
||
export const ReduceIcon = (props: IconProps) => { | ||
return ( | ||
<Icon | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="18px" | ||
height="18px" | ||
viewBox="0 0 18 18" | ||
fill="#485264" | ||
{...props} | ||
> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M3.14999 9C3.14999 8.58579 3.48577 8.25 3.89999 8.25H14.1C14.5142 8.25 14.85 8.58579 14.85 9C14.85 9.41421 14.5142 9.75 14.1 9.75H3.89999C3.48577 9.75 3.14999 9.41421 3.14999 9Z" | ||
/> | ||
</Icon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import React, { useMemo } from 'react'; | ||
import { Box, Grid } from '@chakra-ui/react'; | ||
import type { GridProps } from '@chakra-ui/react'; | ||
import { useTranslation } from 'next-i18next'; | ||
|
||
// @ts-ignore | ||
interface Props extends GridProps { | ||
list: { id: string; label: string }[]; | ||
activeId: string; | ||
size?: 'sm' | 'md' | 'lg'; | ||
onChange: (id: string) => void; | ||
} | ||
|
||
const Tabs = ({ list, size = 'md', activeId, onChange, ...props }: Props) => { | ||
const { t } = useTranslation(); | ||
const sizeMap = useMemo(() => { | ||
switch (size) { | ||
case 'sm': | ||
return { | ||
fontSize: 'xs', | ||
outP: '3px', | ||
inlineP: 1 | ||
}; | ||
case 'md': | ||
return { | ||
fontSize: 'md', | ||
outP: '4px', | ||
inlineP: 2 | ||
}; | ||
case 'lg': | ||
return { | ||
fontSize: 'lg', | ||
outP: '5px', | ||
inlineP: 3 | ||
}; | ||
} | ||
}, [size]); | ||
return ( | ||
<Grid | ||
border={'1px solid #E8EBF0'} | ||
gridTemplateColumns={`repeat(${list.length},1fr)`} | ||
p={sizeMap.outP} | ||
borderRadius={'8px'} | ||
backgroundColor={'gray.50'} | ||
fontSize={sizeMap.fontSize} | ||
fontWeight={500} | ||
{...props} | ||
> | ||
{list.map((item) => ( | ||
<Box | ||
key={item.id} | ||
px={'2'} | ||
py={sizeMap.inlineP} | ||
borderRadius={'6px'} | ||
textAlign={'center'} | ||
_hover={{ | ||
color: 'brightBlue.600' | ||
}} | ||
{...(activeId === item.id | ||
? { | ||
boxShadow: '0px 2px 2px rgba(137, 156, 171, 0.25)', | ||
backgroundColor: 'white', | ||
cursor: 'default', | ||
color: 'gray.900' | ||
} | ||
: { | ||
cursor: 'pointer', | ||
color: 'gray.500' | ||
})} | ||
onClick={() => { | ||
if (activeId === item.id) return; | ||
onChange(item.id); | ||
}} | ||
> | ||
{t(item.label)} | ||
</Box> | ||
))} | ||
</Grid> | ||
); | ||
}; | ||
|
||
export default Tabs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.