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])
|
||||
|
||||
return (
|
||||
<ScrollArea
|
||||
ref={listRef}
|
||||
className={twMerge(
|
||||
'h-[calc(100%-49px)] w-full p-4 py-0',
|
||||
logs.length === 0 && 'mx-auto'
|
||||
)}
|
||||
onScroll={handleScroll}
|
||||
>
|
||||
<>
|
||||
<div>
|
||||
{withCopy && (
|
||||
<div className="absolute right-2 top-7">
|
||||
<div className="flex w-full flex-row gap-2">
|
||||
@ -140,6 +134,15 @@ const ServerLogs = (props: ServerLogsProps) => {
|
||||
</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">
|
||||
{logs.length > 0 ? (
|
||||
<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
|
||||
className={twMerge(
|
||||
'mt-24 flex w-full flex-col items-center justify-center',
|
||||
withCopy && 'mt-0 py-2'
|
||||
withCopy && 'mt-4 py-2'
|
||||
)}
|
||||
>
|
||||
<svg
|
||||
@ -287,11 +290,14 @@ const ServerLogs = (props: ServerLogsProps) => {
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</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>
|
||||
</ScrollArea>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -2,9 +2,6 @@ import { EngineManager, InferenceEngine } from '@janhq/core'
|
||||
import { useAtomValue, useSetAtom } from 'jotai'
|
||||
|
||||
import ErrorMessage from '@/containers/ErrorMessage'
|
||||
import ModalTroubleShooting, {
|
||||
modalTroubleShootingAtom,
|
||||
} from '@/containers/ModalTroubleShoot'
|
||||
|
||||
import { MainViewState } from '@/constants/screens'
|
||||
|
||||
@ -15,7 +12,6 @@ import { activeAssistantAtom } from '@/helpers/atoms/Assistant.atom'
|
||||
import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom'
|
||||
|
||||
const LoadModelError = () => {
|
||||
const setModalTroubleShooting = useSetAtom(modalTroubleShootingAtom)
|
||||
const loadModelError = useAtomValue(loadModelErrorAtom)
|
||||
const setMainState = useSetAtom(mainViewStateAtom)
|
||||
const setSelectedSettingScreen = useSetAtom(selectedSettingAtom)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user