mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
Potentially fix application stuck when Navidrome credential expires (#538)
This commit is contained in:
parent
854b76702b
commit
d806ade84c
@ -286,9 +286,10 @@ axiosClient.interceptors.response.use(
|
||||
});
|
||||
|
||||
const serverId = currentServer.id;
|
||||
useAuthStore
|
||||
.getState()
|
||||
.actions.updateServer(serverId, { ndCredential: undefined });
|
||||
useAuthStore.getState().actions.updateServer(serverId, {
|
||||
credential: undefined,
|
||||
ndCredential: undefined,
|
||||
});
|
||||
useAuthStore.getState().actions.setCurrentServer(null);
|
||||
|
||||
// special error to prevent sending a second message, and stop other messages that could be enqueued
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Center, Group, Stack } from '@mantine/core';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { RiCheckFill } from 'react-icons/ri';
|
||||
import { Link, Navigate } from 'react-router-dom';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Button, PageHeader, Text } from '/@/renderer/components';
|
||||
import { ActionRequiredContainer } from '/@/renderer/features/action-required/components/action-required-container';
|
||||
import { ServerCredentialRequired } from '/@/renderer/features/action-required/components/server-credential-required';
|
||||
@ -14,7 +14,7 @@ const ActionRequiredRoute = () => {
|
||||
const { t } = useTranslation();
|
||||
const currentServer = useCurrentServer();
|
||||
const isServerRequired = !currentServer;
|
||||
const isCredentialRequired = false;
|
||||
const isCredentialRequired = currentServer && !currentServer.credential;
|
||||
|
||||
const checks = [
|
||||
{
|
||||
@ -50,7 +50,6 @@ const ActionRequiredRoute = () => {
|
||||
<Stack mt="2rem">
|
||||
{canReturnHome && (
|
||||
<>
|
||||
<Navigate to={AppRoute.HOME} />
|
||||
<Group
|
||||
noWrap
|
||||
position="center"
|
||||
|
Loading…
Reference in New Issue
Block a user