forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #3383 from H0llyW00dzZ/auth
This commit is contained in:
commit
2c12be62c4
@ -635,6 +635,11 @@ export function Settings() {
|
|||||||
navigate(Path.Home);
|
navigate(Path.Home);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (clientConfig?.isApp) { // Force to set custom endpoint to true if it's app
|
||||||
|
accessStore.update((state) => {
|
||||||
|
state.useCustomConfig = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
document.addEventListener("keydown", keydownEvent);
|
document.addEventListener("keydown", keydownEvent);
|
||||||
return () => {
|
return () => {
|
||||||
document.removeEventListener("keydown", keydownEvent);
|
document.removeEventListener("keydown", keydownEvent);
|
||||||
@ -909,6 +914,9 @@ export function Settings() {
|
|||||||
|
|
||||||
{!accessStore.hideUserApiKey && (
|
{!accessStore.hideUserApiKey && (
|
||||||
<>
|
<>
|
||||||
|
{
|
||||||
|
// Conditionally render the following ListItem based on clientConfig.isApp
|
||||||
|
!clientConfig?.isApp && ( // only show if isApp is false
|
||||||
<ListItem
|
<ListItem
|
||||||
title={Locale.Settings.Access.CustomEndpoint.Title}
|
title={Locale.Settings.Access.CustomEndpoint.Title}
|
||||||
subTitle={Locale.Settings.Access.CustomEndpoint.SubTitle}
|
subTitle={Locale.Settings.Access.CustomEndpoint.SubTitle}
|
||||||
@ -924,6 +932,8 @@ export function Settings() {
|
|||||||
}
|
}
|
||||||
></input>
|
></input>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
{accessStore.useCustomConfig && (
|
{accessStore.useCustomConfig && (
|
||||||
<>
|
<>
|
||||||
<ListItem
|
<ListItem
|
||||||
|
Loading…
Reference in New Issue
Block a user