fix(frontend): resolve login redirect loop and clean up info tab

- Prevent infinite session probe requests on the login page by guarding the check with the authenticated user state and using the Latest Ref pattern.
- Decouple useEffect from resolveRedirectTarget by using resolveRedirectTargetRef to avoid searchParams dependency loops.
- Remove the unused '服务连接' Card from the settings info tab and clean up unused imports, queries, and properties.
This commit is contained in:
ryan
2026-06-13 11:07:27 +08:00
parent 30aa89f686
commit 0df4712831
3 changed files with 35 additions and 45 deletions
@@ -35,12 +35,6 @@ export function SystemSettingsMain() {
enabled: !!user?.is_admin,
})
const authSourcesQuery = useQuery({
queryKey: ["auth", "sources"],
queryFn: () => AdminService.listAuthSources(),
enabled: !!user?.is_admin,
})
const configs = useMemo(
() => systemConfigMap(systemConfigsQuery.data ?? []),
[systemConfigsQuery.data],
@@ -112,10 +106,7 @@ export function SystemSettingsMain() {
<OtherTab configs={configs} />
</TabsContent>
<TabsContent value="info" className="pt-4">
<InfoTab
systemConfigsLength={systemConfigsQuery.data?.length ?? 0}
authSourcesLength={authSourcesQuery.data?.length ?? 0}
/>
<InfoTab />
</TabsContent>
</Tabs>
</motion.div>