fix: server log actions position (#4608)
* fix: sever log actions position * chore: unused import
This commit is contained in:
parent
c5f17b4e83
commit
a9a63ab5d9
@ -93,14 +93,8 @@ const ServerLogs = (props: ServerLogsProps) => {
|
|||||||
}, [listRef.current?.scrollHeight, isUserManuallyScrollingUp, logs])
|
}, [listRef.current?.scrollHeight, isUserManuallyScrollingUp, logs])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea
|
<>
|
||||||
ref={listRef}
|
<div>
|
||||||
className={twMerge(
|
|
||||||
'h-[calc(100%-49px)] w-full p-4 py-0',
|
|
||||||
logs.length === 0 && 'mx-auto'
|
|
||||||
)}
|
|
||||||
onScroll={handleScroll}
|
|
||||||
>
|
|
||||||
{withCopy && (
|
{withCopy && (
|
||||||
<div className="absolute right-2 top-7">
|
<div className="absolute right-2 top-7">
|
||||||
<div className="flex w-full flex-row gap-2">
|
<div className="flex w-full flex-row gap-2">
|
||||||
@ -140,6 +134,15 @@ const ServerLogs = (props: ServerLogsProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
<ScrollArea
|
||||||
|
ref={listRef}
|
||||||
|
className={twMerge(
|
||||||
|
'h-[calc(100%-49px)] w-full p-4 py-0',
|
||||||
|
logs.length === 0 && 'mx-auto'
|
||||||
|
)}
|
||||||
|
onScroll={handleScroll}
|
||||||
|
>
|
||||||
<div className="flex h-full w-full flex-col">
|
<div className="flex h-full w-full flex-col">
|
||||||
{logs.length > 0 ? (
|
{logs.length > 0 ? (
|
||||||
<code className="inline-block max-w-[38vw] whitespace-break-spaces text-[13px] lg:max-w-[40vw] xl:max-w-[50vw]">
|
<code className="inline-block max-w-[38vw] whitespace-break-spaces text-[13px] lg:max-w-[40vw] xl:max-w-[50vw]">
|
||||||
@ -155,7 +158,7 @@ const ServerLogs = (props: ServerLogsProps) => {
|
|||||||
<div
|
<div
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
'mt-24 flex w-full flex-col items-center justify-center',
|
'mt-24 flex w-full flex-col items-center justify-center',
|
||||||
withCopy && 'mt-0 py-2'
|
withCopy && 'mt-4 py-2'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@ -287,11 +290,14 @@ const ServerLogs = (props: ServerLogsProps) => {
|
|||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
<p className="text-[hsla(var(--text-secondary)] mt-4">Empty logs</p>
|
<p className="text-[hsla(var(--text-secondary)] mt-4">
|
||||||
|
Empty logs
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,6 @@ import { EngineManager, InferenceEngine } from '@janhq/core'
|
|||||||
import { useAtomValue, useSetAtom } from 'jotai'
|
import { useAtomValue, useSetAtom } from 'jotai'
|
||||||
|
|
||||||
import ErrorMessage from '@/containers/ErrorMessage'
|
import ErrorMessage from '@/containers/ErrorMessage'
|
||||||
import ModalTroubleShooting, {
|
|
||||||
modalTroubleShootingAtom,
|
|
||||||
} from '@/containers/ModalTroubleShoot'
|
|
||||||
|
|
||||||
import { MainViewState } from '@/constants/screens'
|
import { MainViewState } from '@/constants/screens'
|
||||||
|
|
||||||
@ -15,7 +12,6 @@ import { activeAssistantAtom } from '@/helpers/atoms/Assistant.atom'
|
|||||||
import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom'
|
import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom'
|
||||||
|
|
||||||
const LoadModelError = () => {
|
const LoadModelError = () => {
|
||||||
const setModalTroubleShooting = useSetAtom(modalTroubleShootingAtom)
|
|
||||||
const loadModelError = useAtomValue(loadModelErrorAtom)
|
const loadModelError = useAtomValue(loadModelErrorAtom)
|
||||||
const setMainState = useSetAtom(mainViewStateAtom)
|
const setMainState = useSetAtom(mainViewStateAtom)
|
||||||
const setSelectedSettingScreen = useSetAtom(selectedSettingAtom)
|
const setSelectedSettingScreen = useSetAtom(selectedSettingAtom)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user