Skip to content

Commit

Permalink
fix: desktop applaunchpad costcenter styles (#4667)
Browse files Browse the repository at this point in the history
* fix desktop applaunchpad styles

Signed-off-by: jingyang <3161362058@qq.com>

* fix desktop style

Signed-off-by: jingyang <3161362058@qq.com>

* fix costcenter style

Signed-off-by: jingyang <3161362058@qq.com>

---------

Signed-off-by: jingyang <3161362058@qq.com>
zjy365 authored Apr 9, 2024
1 parent 2b1ab31 commit ad83b84
Showing 30 changed files with 137 additions and 83 deletions.
6 changes: 4 additions & 2 deletions frontend/desktop/src/components/team/CreateTeam.tsx
Original file line number Diff line number Diff line change
@@ -82,8 +82,10 @@ export default function CreateTeam({ textButton = false }: { textButton?: boolea
backdropFilter="blur(150px)"
p="24px"
>
<ModalCloseButton right={'24px'} top="24px" p="0" />
<ModalHeader p="0">{t('Create Team')}</ModalHeader>
<ModalCloseButton right={'24px'} top="16px" p="0" />
<ModalHeader bg={'white'} border={'none'} p="0">
{t('Create Team')}
</ModalHeader>
{mutation.isLoading ? (
<Spinner mx={'auto'} />
) : (
26 changes: 13 additions & 13 deletions frontend/desktop/src/components/team/DissolveTeam.tsx
Original file line number Diff line number Diff line change
@@ -64,6 +64,15 @@ export default function DissolveTeam({
return (
<>
<Button
size={'sm'}
height={'32px'}
variant={'outline'}
_hover={{
color: 'red.600',
bg: 'rgba(17, 24, 36, 0.05)'
}}
{...props}
leftIcon={<DeleteIcon boxSize={'14px'} />}
onClick={() => {
if (session?.user?.ns_uid === ns_uid) {
return toast({
@@ -72,17 +81,6 @@ export default function DissolveTeam({
}
onOpen();
}}
borderRadius="4px"
border="1px solid #DEE0E2"
background="#F4F6F8"
fontSize={'12px'}
fontWeight={'500'}
h="auto"
py="7px"
px="16px"
{...props}
iconSpacing={'4px'}
leftIcon={<DeleteIcon boxSize={'16px'} color={'grayModern.600'} />}
>
{t('Dissolve Team')}
</Button>
@@ -95,8 +93,10 @@ export default function DissolveTeam({
backdropFilter="blur(150px)"
p="24px"
>
<ModalCloseButton right={'24px'} top="24px" p="0" />
<ModalHeader p="0">Warning</ModalHeader>
<ModalCloseButton right={'24px'} top="16px" p="0" />
<ModalHeader bg={'white'} border={'none'} p="0">
Warning
</ModalHeader>
{mutation.isLoading ? (
<Spinner mx="auto" />
) : (
21 changes: 9 additions & 12 deletions frontend/desktop/src/components/team/InviteMember.tsx
Original file line number Diff line number Diff line change
@@ -92,17 +92,12 @@ export default function InviteMember({
<>
{[UserRole.Manager, UserRole.Owner].includes(ownRole) ? (
<Button
onClick={onOpen}
borderRadius="4px"
border="1px solid #DEE0E2"
background="#F4F6F8"
fontSize={'12px'}
fontWeight={'500'}
h="auto"
py="7px"
px="16px"
leftIcon={<GroupAddIcon boxSize={'16px'} color={'grayModern.600'} />}
size={'sm'}
variant={'outline'}
height={'32px'}
{...props}
leftIcon={<GroupAddIcon boxSize={'16px'} />}
onClick={onOpen}
>
{t('Invite Member')}
</Button>
@@ -118,8 +113,10 @@ export default function InviteMember({
backdropFilter="blur(150px)"
p="24px"
>
<ModalCloseButton right={'24px'} top="24px" p="0" />
<ModalHeader p="0">{t('Invite Member')}</ModalHeader>
<ModalCloseButton right={'24px'} top="16px" p="0" />
<ModalHeader bg={'white'} border={'none'} p="0">
{t('Invite Member')}
</ModalHeader>
{mutation.isLoading ? (
<Spinner mx="auto" />
) : (
6 changes: 4 additions & 2 deletions frontend/desktop/src/components/team/RemoveMember.tsx
Original file line number Diff line number Diff line change
@@ -90,8 +90,10 @@ export default function RemoveMember({
backdropFilter="blur(150px)"
p="24px"
>
<ModalCloseButton right={'24px'} top="24px" p="0" />
<ModalHeader p="0">{t('Warning')}</ModalHeader>
<ModalCloseButton right={'24px'} top="16px" p="0" />
<ModalHeader bg={'white'} border={'none'} p="0">
{t('Warning')}
</ModalHeader>
{mutation.isLoading ? (
<Spinner mx="auto" />
) : (
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@
"@chakra-ui/cli": "^2.4.1",
"prettier": "^2.8.8"
},
"packageManager": "pnpm@*",
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/system": "^2.6.1",
2 changes: 1 addition & 1 deletion frontend/packages/client-sdk/src/app.ts
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ class ClientSDK {
private commonConfig = {
appKey: '',
clientLocation: '',
success: true
success: false
};
private userSession: SessionV1 | undefined;
private readonly callback = new Map<string, (data: MasterReplyMessageType) => void>();
7 changes: 4 additions & 3 deletions frontend/packages/ui/src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Menu, MenuList, MenuItem } from '@chakra-ui/react';
import { Menu, MenuList, MenuItem, MenuItemProps } from '@chakra-ui/react';

interface Props {
width: number;
@@ -8,13 +8,13 @@ interface Props {
isActive?: boolean;
child: React.ReactNode;
onClick: () => void;
menuItemStyle?: MenuItemProps;
}[];
}

export const SealosMenu = ({ width, Button, menuList }: Props) => {
const menuItemStyles = {
borderRadius: '4px',
py: 3,
display: 'flex',
alignItems: 'center',
_hover: {
@@ -36,11 +36,12 @@ export const SealosMenu = ({ width, Button, menuList }: Props) => {
{menuList.map((item, i) => (
<MenuItem
key={i}
{...menuItemStyles}
onClick={item.onClick}
color={item.isActive ? 'hover.blue' : 'grayModern.600'}
py={'6px'}
px={'4px'}
{...menuItemStyles}
{...item.menuItemStyle}
>
{item.child}
</MenuItem>
2 changes: 1 addition & 1 deletion frontend/packages/ui/src/components/MySlider/index.tsx
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ export const MySlider = ({
key={item.value}
value={i}
mt={3}
fontSize={'sm'}
fontSize={'11px'}
transform={'translateX(-50%)'}
whiteSpace={'nowrap'}
{...(activeVal === item.value
1 change: 1 addition & 0 deletions frontend/packages/ui/src/components/MyTable/index.tsx
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ export const MyTable = ({ columns, data, itemClass = '' }: Props) => {
mb={2}
fontSize={'base'}
color={'grayModern.600'}
fontWeight={'bold'}
>
{columns.map((item, i) => (
<Box
2 changes: 1 addition & 1 deletion frontend/packages/ui/src/components/Select/index.tsx
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ const MySelect = (
}}
{...(isOpen
? {
boxShadow: '0px 0px 0px 2.4px rgba(33, 155, 244, 0.15)',
// boxShadow: '0px 0px 0px 2.4px rgba(33, 155, 244, 0.15)',
borderColor: 'brightBlue.600',
bg: '#FFF'
}
2 changes: 1 addition & 1 deletion frontend/packages/ui/src/components/Tabs/index.tsx
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ export const Tabs = ({ list, size = 'md', activeId, onChange, ...props }: Props)
switch (size) {
case 'sm':
return {
fontSize: 'xs',
fontSize: 'base',
outP: '3px',
inlineP: '4px'
};
23 changes: 8 additions & 15 deletions frontend/packages/ui/src/theme/components/Button.ts
Original file line number Diff line number Diff line change
@@ -3,21 +3,14 @@ import { colors as ThemeColors } from '../colors';

export const Button = defineStyleConfig({
sizes: {
primary: {
width: '215px'
},
xs: {},
sm: {
width: '75px',
height: '32px'
fontSize: '12px'
},
md: {
width: '100px',
height: '36px'
fontSize: '14px'
},
lg: {
width: '180px',
height: '36px'
}
lg: {}
},
variants: {
primary: {
@@ -57,7 +50,6 @@ export const Button = defineStyleConfig({
bg: ThemeColors.grayModern[900],
color: '#FFF',
borderRadius: 'md',
fontSize: '14px',
fontWeight: 500,
boxShadow: ThemeColors.buttonBoxShadow,
_hover: {
@@ -85,12 +77,13 @@ export const Button = defineStyleConfig({
outline: {
bg: '#FFF',
borderRadius: 'md',
fontSize: '14px',
fontWeight: 500,
border: '1px solid',
borderColor: 'grayModern.250',
boxShadow: ThemeColors.buttonBoxShadow,
color: 'grayModern.600',
minW: '16px',
minH: '16px',
_hover: {
opacity: '0.9',
bg: 'rgba(33, 155, 244, 0.05)',
@@ -103,7 +96,7 @@ export const Button = defineStyleConfig({
}
},
defaultProps: {
size: 'md',
variant: 'solid'
variant: 'solid',
size: 'md'
}
});
4 changes: 3 additions & 1 deletion frontend/packages/ui/src/theme/components/Textarea.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,9 @@ export const Textarea: ComponentStyleConfig = {
borderColor: '#E8EBF0',
_focusVisible: {
borderColor: colors.brightBlue[500],
boxShadow: colors.boxShadowBlue
boxShadow: colors.boxShadowBlue,
bg: '#FFF',
color: '#111824'
}
}
},
4 changes: 2 additions & 2 deletions frontend/providers/applaunchpad/public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
"storage": "Storage",
"gpu": "GPU",
"Applications": "Applications",
"Create Application": "Create Application",
"Create Application": "Create App",
"Cancel": "Cancel",
"To Confirm": "to confirm",
"Confirm": "Yes",
@@ -227,4 +227,4 @@
"The target cpu value must be less than 100": "The target cpu value must be less than 100",
"The user name cannot be empty": "The user name cannot be empty",
"Under Stock": "Under Stock"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Oops, something went wrong.

0 comments on commit ad83b84

Please sign in to comment.