From 34ad977c261e9254438a9ea4b0fa2e4029912613 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Fri, 12 Jul 2024 09:06:53 +0700 Subject: [PATCH] feat: add shortcut app logs on system monitor (#3150) --- .../BottomPanel/SystemMonitor/index.tsx | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx b/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx index 7e730c77c..0d8938aa1 100644 --- a/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx +++ b/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx @@ -1,14 +1,22 @@ import { Fragment, useEffect, useState } from 'react' -import { Progress } from '@janhq/joi' +import { Button, Progress } from '@janhq/joi' import { useClickOutside } from '@janhq/joi' import { useAtom, useAtomValue } from 'jotai' -import { MonitorIcon, XIcon, ChevronDown, ChevronUp } from 'lucide-react' +import { + MonitorIcon, + XIcon, + ChevronDown, + ChevronUp, + FolderOpenIcon, +} from 'lucide-react' import { twMerge } from 'tailwind-merge' import useGetSystemResources from '@/hooks/useGetSystemResources' +import { usePath } from '@/hooks/usePath' + import { toGibibytes } from '@/utils/converter' import TableActiveModel from './TableActiveModel' @@ -28,6 +36,7 @@ const SystemMonitor = () => { const usedRam = useAtomValue(usedRamAtom) const cpuUsage = useAtomValue(cpuUsageAtom) const gpus = useAtomValue(gpusAtom) + const { onRevealInFinder } = usePath() const [showFullScreen, setShowFullScreen] = useState(false) const ramUtilitized = useAtomValue(ramUtilitizedAtom) const [showSystemMonitorPanel, setShowSystemMonitorPanel] = useAtom( @@ -64,7 +73,7 @@ const SystemMonitor = () => {
{ @@ -89,6 +98,12 @@ const SystemMonitor = () => { Running Models
+
onRevealInFinder('Logs')} + > + App Log +
{showFullScreen ? (