mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
[enhancement]: add server menu on Navidrome error page
This commit is contained in:
parent
e0e967385f
commit
44fcc33825
3 changed files with 32 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ import { AuthState, ServerListItem, ServerType } from '/@/renderer/types';
|
|||
import { api } from '/@/renderer/api';
|
||||
import { SongListSort, SortOrder } from '/@/renderer/api/types';
|
||||
import { debounce } from 'lodash';
|
||||
import { toast } from '/@/renderer/components';
|
||||
|
||||
export const useServerAuthenticated = () => {
|
||||
const priorServerId = useRef<string>();
|
||||
|
|
@ -29,6 +30,7 @@ export const useServerAuthenticated = () => {
|
|||
|
||||
setReady(AuthState.VALID);
|
||||
} catch (error) {
|
||||
toast.error({ message: (error as Error).message });
|
||||
setReady(AuthState.INVALID);
|
||||
}
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue