Fix: Improve settings layout and models refresh
Refine settings layout for better visual flow, enlarge settings sidebar for easier viewing, and adjust model refresh logic for more responsive updates. Refactor: Add more visual weight to the settings panel and optimize model refresh logic. Refactor: Enhance the visual appeal of settings panel by increasing its width and improving model refresh behavior for better user experience.
This commit is contained in:
parent
768ff2e555
commit
30eb320c19
@ -54,7 +54,9 @@ export const Header: React.FC<Props> = ({
|
|||||||
} = useQuery({
|
} = useQuery({
|
||||||
queryKey: ["fetchModel"],
|
queryKey: ["fetchModel"],
|
||||||
queryFn: () => fetchChatModels({ returnEmpty: true }),
|
queryFn: () => fetchChatModels({ returnEmpty: true }),
|
||||||
refetchInterval: 15000
|
refetchInterval: 15_000,
|
||||||
|
refetchIntervalInBackground: true,
|
||||||
|
placeholderData: (prev) => prev
|
||||||
})
|
})
|
||||||
|
|
||||||
const { data: prompts, isLoading: isPromptLoading } = useQuery({
|
const { data: prompts, isLoading: isPromptLoading } = useQuery({
|
||||||
@ -121,7 +123,7 @@ export const Header: React.FC<Props> = ({
|
|||||||
localStorage.setItem("selectedModel", e)
|
localStorage.setItem("selectedModel", e)
|
||||||
}}
|
}}
|
||||||
size="large"
|
size="large"
|
||||||
loading={isModelsLoading || isModelsFetching}
|
loading={isModelsLoading}
|
||||||
filterOption={(input, option) =>
|
filterOption={(input, option) =>
|
||||||
option.label.key.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
option.label.key.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
}
|
}
|
||||||
@ -205,9 +207,9 @@ export const Header: React.FC<Props> = ({
|
|||||||
{pathname === "/" &&
|
{pathname === "/" &&
|
||||||
messages.length > 0 &&
|
messages.length > 0 &&
|
||||||
!streaming &&
|
!streaming &&
|
||||||
shareModeEnabled && <ShareBtn
|
shareModeEnabled && (
|
||||||
historyId={historyId}
|
<ShareBtn historyId={historyId} messages={messages} />
|
||||||
messages={messages} />}
|
)}
|
||||||
<Tooltip title={t("githubRepository")}>
|
<Tooltip title={t("githubRepository")}>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/n4ze3m/page-assist"
|
href="https://github.com/n4ze3m/page-assist"
|
||||||
|
@ -58,7 +58,7 @@ export const SettingsLayout = ({ children }: { children: React.ReactNode }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="mx-auto max-w-7xl lg:flex lg:gap-x-16 lg:px-8">
|
<div className="mx-auto max-w-7xl lg:flex lg:gap-x-16 lg:px-8">
|
||||||
<aside className="flex lg:rounded-md bg-white lg:p-4 lg:mt-20 overflow-x-auto lg:border-0 border-b py-4 lg:block lg:w-72 lg:flex-none dark:bg-[#171717] dark:border-gray-600">
|
<aside className="flex lg:rounded-md bg-white lg:p-4 lg:mt-20 overflow-x-auto lg:border-0 border-b py-4 lg:block lg:w-80 lg:flex-none dark:bg-[#171717] dark:border-gray-600">
|
||||||
<nav className="flex-none px-4 sm:px-6 lg:px-0">
|
<nav className="flex-none px-4 sm:px-6 lg:px-0">
|
||||||
<ul
|
<ul
|
||||||
role="list"
|
role="list"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user