diff --git a/dashboard/src/features/nodes/dialogs/settings/index.tsx b/dashboard/src/features/nodes/dialogs/settings/index.tsx index 74da188..db94495 100644 --- a/dashboard/src/features/nodes/dialogs/settings/index.tsx +++ b/dashboard/src/features/nodes/dialogs/settings/index.tsx @@ -10,42 +10,50 @@ import { TabsContent, TabsList, TabsTrigger, -} from "@marzneshin/components" -import { FC } from "react" -import { useTranslation } from "react-i18next" -import { NodeType } from "../.." +} from "@marzneshin/components"; +import type { FC } from "react"; +import { useTranslation } from "react-i18next"; +import type { NodeType } from "../.."; import { LogContainer } from "../../log"; import { NodesDetailTable } from "../../tables/detail-table"; import { NodeConfigEditor } from "./node-config-editor"; interface NodesSettingsDialogProps { - onOpenChange: (state: boolean) => void - open: boolean - entity: NodeType + onOpenChange: (state: boolean) => void; + open: boolean; + entity: NodeType; } -export const NodesSettingsDialog: FC = ({ onOpenChange, open, entity }) => { +export const NodesSettingsDialog: FC = ({ + onOpenChange, + open, + entity, +}) => { const { t } = useTranslation(); return ( - - + + - - {t('page.nodes.settings.title')} - + {t("page.nodes.settings.title")}
-

{t('page.nodes.settings.detail')}

+

+ {t("page.nodes.settings.detail")} +

- + - {t('logs')} - {t('config')} + + {t("logs")} + + + {t("config")} + - + @@ -59,5 +67,5 @@ export const NodesSettingsDialog: FC = ({ onOpenChange
- ) -} + ); +}; diff --git a/dashboard/src/features/nodes/log/container.tsx b/dashboard/src/features/nodes/log/container.tsx index 3ec08b9..34194c2 100644 --- a/dashboard/src/features/nodes/log/container.tsx +++ b/dashboard/src/features/nodes/log/container.tsx @@ -1,32 +1,56 @@ -import { Badge, Card, CardContent, CardHeader, ScrollArea } from "@marzneshin/components" -import { NodeType, useNodesLog } from ".." -import { FC } from "react" -import { useTranslation } from "react-i18next" +import { + Badge, + Card, + CardContent, + CardHeader, + ScrollArea, + Separator, +} from "@marzneshin/components"; +import type { NodeType } from ".."; +import { useNodesLog } from ".."; +import type { FC } from "react"; +import { useTranslation } from "react-i18next"; interface LogContainerProps { - node: NodeType + node: NodeType; } export const LogContainer: FC = ({ node }) => { - const { logs, status, logsDiv } = useNodesLog(node) - const { t } = useTranslation() - return ( - - - -

{t('page.nodes.settings.log-container.title')}

-
- - {status} - -
-
- - {logs.map((log: string, i) => { - return

{log}

- })} -
-
-
- ) -} + const { logs, status, logsDiv } = useNodesLog(node); + const { t } = useTranslation(); + + return ( + + + +

+ {t("page.nodes.settings.log-container.title")} +

+
+ + {status} + +
+
+ + {logs.map((log: string, index: number) => ( +
+

+ {log} +

+ {index !== logs.length - 1 && ( + + )} +
+ ))} +
+
+
+ ); +};