diff --git a/docs/website/src/pages/components/Header/index.scss b/docs/website/src/pages/components/Header/index.scss index e7485d3068c..e2fb98dc33c 100644 --- a/docs/website/src/pages/components/Header/index.scss +++ b/docs/website/src/pages/components/Header/index.scss @@ -6,7 +6,7 @@ justify-content: center; align-items: center; flex-direction: column; - padding-top: 48px; // sale + // padding-top: 48px; // sale .header-img { width: 100%; diff --git a/docs/website/src/pages/index.tsx b/docs/website/src/pages/index.tsx index 3ca262d0ba2..88c4eac6dc6 100644 --- a/docs/website/src/pages/index.tsx +++ b/docs/website/src/pages/index.tsx @@ -97,7 +97,7 @@ const Home = () => {
- + {/* */} diff --git a/frontend/desktop/src/components/account/index.tsx b/frontend/desktop/src/components/account/index.tsx index 39c3052913d..fa907229490 100644 --- a/frontend/desktop/src/components/account/index.tsx +++ b/frontend/desktop/src/components/account/index.tsx @@ -144,7 +144,7 @@ export default function Account() {
showDisclosure.onOpen()}> - +
diff --git a/frontend/desktop/src/components/notification/index.tsx b/frontend/desktop/src/components/notification/index.tsx index b06b1b2be7d..0d0f704bcc8 100644 --- a/frontend/desktop/src/components/notification/index.tsx +++ b/frontend/desktop/src/components/notification/index.tsx @@ -3,7 +3,7 @@ import request from '@/services/request'; import useAppStore from '@/stores/app'; import { formatTime } from '@/utils/tools'; import { Box, Button, Flex, Text, UseDisclosureReturn } from '@chakra-ui/react'; -import { ClearOutlineIcon, CloseIcon, WarnIcon, useMessage } from '@sealos/ui'; +import { ClearOutlineIcon, CloseIcon, NotificationIcon, WarnIcon, useMessage } from '@sealos/ui'; import { useMutation, useQuery } from '@tanstack/react-query'; import clsx from 'clsx'; import { produce } from 'immer'; @@ -143,6 +143,17 @@ export default function Notification(props: NotificationProps) { } }, [i18n.language, refetch]); + const getNotificationIcon = (from: string | undefined) => { + switch (from) { + case 'Debt-System': + return ; + case 'Active-System': + return '🎉'; + default: + return ; + } + }; + return disclosure.isOpen ? ( <> @@ -316,7 +327,7 @@ export default function Notification(props: NotificationProps) { color={'white'} > - + {getNotificationIcon(MessageConfig.popupMessage?.i18n['en']?.from)} {MessageConfig.popupMessage?.i18n[i18n.language]?.title} diff --git a/frontend/desktop/src/pages/api/desktop/getResource.ts b/frontend/desktop/src/pages/api/desktop/getResource.ts index f8dc202a7f2..8e569580b53 100644 --- a/frontend/desktop/src/pages/api/desktop/getResource.ts +++ b/frontend/desktop/src/pages/api/desktop/getResource.ts @@ -27,14 +27,15 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) for (const pod of result.body.items) { if (pod.status?.phase === 'Succeeded') continue; + if (!pod?.spec) continue; + totalPodCount++; - if (pod.status?.phase === 'Running') { - runningPodCount++; - } - if (!pod?.spec) continue; + if (pod.status?.phase !== 'Running') continue; + + runningPodCount++; - for (const container of pod.spec.containers) { + for (const container of pod?.spec.containers) { if (!container?.resources) continue; const limits = container?.resources.limits as { cpu: string; diff --git a/frontend/desktop/src/types/crd.ts b/frontend/desktop/src/types/crd.ts index 3a4f56f2a78..29dfc31595e 100644 --- a/frontend/desktop/src/types/crd.ts +++ b/frontend/desktop/src/types/crd.ts @@ -133,7 +133,7 @@ export type TNotification = { desktopPopup: boolean; i18n: { [key in string]: { - from: string; + from: string; // Debt-System Active-System message: string; title: string; }; diff --git a/frontend/packages/ui/src/components/icons/NotificationIcon.tsx b/frontend/packages/ui/src/components/icons/NotificationIcon.tsx index f9ef5a22227..7e388bea317 100644 --- a/frontend/packages/ui/src/components/icons/NotificationIcon.tsx +++ b/frontend/packages/ui/src/components/icons/NotificationIcon.tsx @@ -7,13 +7,13 @@ export default function NotificationIcon(props: IconProps) { width="21px" height="20px" viewBox="0 0 21 20" - fill="none" + {...props} > );