|
|
@@ -28,7 +28,14 @@ import * as Styled from './wrapper.styles';
|
|
|
|
|
|
const viewTitles = Object.values(View);
|
|
|
|
|
|
-export const CmusUIProvider: UIProviderComponent = ({ currentSong, nextSong, prevSong }) => {
|
|
|
+export const CmusUIProvider: UIProviderComponent = ({
|
|
|
+ connecting,
|
|
|
+ ready,
|
|
|
+ error,
|
|
|
+ currentSong,
|
|
|
+ nextSong,
|
|
|
+ prevSong,
|
|
|
+}) => {
|
|
|
useMaster();
|
|
|
|
|
|
const dispatch = useContext(DispatchContext);
|
|
|
@@ -53,7 +60,7 @@ export const CmusUIProvider: UIProviderComponent = ({ currentSong, nextSong, pre
|
|
|
}
|
|
|
}, [stateUI.skipSong, nextSong, prevSong]);
|
|
|
|
|
|
- useVimBindings(dispatchUI, stateUI.commandMode || stateUI.searchMode);
|
|
|
+ useVimBindings(dispatchUI, !ready || stateUI.commandMode || stateUI.searchMode);
|
|
|
|
|
|
useLibrary(stateUI, dispatchUI);
|
|
|
|
|
|
@@ -84,7 +91,7 @@ export const CmusUIProvider: UIProviderComponent = ({ currentSong, nextSong, pre
|
|
|
</Styled.Overlay>
|
|
|
)}
|
|
|
{stateUI.searchMode && <Search />}
|
|
|
- <PlayerStatus song={currentSong} />
|
|
|
+ <PlayerStatus song={currentSong} connecting={connecting} error={error} ready={ready} />
|
|
|
<CommandView />
|
|
|
</Styled.Wrapper>
|
|
|
</CmusUIDispatchContext.Provider>
|