Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
GNU Affero General Public License v3.0
23.74k
stars
1.38k
forks
source link
enhancement: ux local server page #4045
Closed
urmauur closed 6 days ago
Describe Your Changes
web/containers/ServerLogs/index.tsx
Imports:
useRef
and updated the import statement forScrollArea
.State:
listRef
: Ref to access the div element of logs.prevScrollTop
: To keep track of previous scroll position.isUserManuallyScrollingUp
: To determine if the user is manually scrolling up.Callbacks:
handleScroll
to manage scroll events and prevent automatic scrolling when the user manually scrolls up.Effect:
JSX Changes:
div
with aScrollArea
component and added the reflistRef
.onScroll={handleScroll}
to theScrollArea
.web/screens/LocalServer/LocalServerCenterPanel/index.tsx
Imports:
ScrollArea
.JSX Changes:
ScrollArea
with a direct render ofServerLogs
.web/screens/LocalServer/LocalServerLeftPanel/index.tsx
State:
isLoading
to manage loading states.Callbacks and Effects:
onStartServerClick
,onToggleServer
, and other relevant functions to include logic for setting theisLoading
state.JSX Changes:
"Starting..."
) whenisLoading
is true.disabled={isLoading || ...}
to disable the button during loading or under certain error conditions.Summary
Fixes Issues
https://github.com/user-attachments/assets/7f42da49-813a-4dfe-8afc-b54681c73948
Self Checklist