mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 14:37:06 +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;
|
const serverId = currentServer.id;
|
||||||
useAuthStore
|
useAuthStore.getState().actions.updateServer(serverId, {
|
||||||
.getState()
|
credential: undefined,
|
||||||
.actions.updateServer(serverId, { ndCredential: undefined });
|
ndCredential: undefined,
|
||||||
|
});
|
||||||
useAuthStore.getState().actions.setCurrentServer(null);
|
useAuthStore.getState().actions.setCurrentServer(null);
|
||||||
|
|
||||||
// special error to prevent sending a second message, and stop other messages that could be enqueued
|
// 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 { Center, Group, Stack } from '@mantine/core';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { RiCheckFill } from 'react-icons/ri';
|
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 { Button, PageHeader, Text } from '/@/renderer/components';
|
||||||
import { ActionRequiredContainer } from '/@/renderer/features/action-required/components/action-required-container';
|
import { ActionRequiredContainer } from '/@/renderer/features/action-required/components/action-required-container';
|
||||||
import { ServerCredentialRequired } from '/@/renderer/features/action-required/components/server-credential-required';
|
import { ServerCredentialRequired } from '/@/renderer/features/action-required/components/server-credential-required';
|
||||||
@ -14,7 +14,7 @@ const ActionRequiredRoute = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const currentServer = useCurrentServer();
|
const currentServer = useCurrentServer();
|
||||||
const isServerRequired = !currentServer;
|
const isServerRequired = !currentServer;
|
||||||
const isCredentialRequired = false;
|
const isCredentialRequired = currentServer && !currentServer.credential;
|
||||||
|
|
||||||
const checks = [
|
const checks = [
|
||||||
{
|
{
|
||||||
@ -50,7 +50,6 @@ const ActionRequiredRoute = () => {
|
|||||||
<Stack mt="2rem">
|
<Stack mt="2rem">
|
||||||
{canReturnHome && (
|
{canReturnHome && (
|
||||||
<>
|
<>
|
||||||
<Navigate to={AppRoute.HOME} />
|
|
||||||
<Group
|
<Group
|
||||||
noWrap
|
noWrap
|
||||||
position="center"
|
position="center"
|
||||||
|
Loading…
Reference in New Issue
Block a user