From 0bf8b7a6e08e01da3e2a43f8e0d624f1d87d19a2 Mon Sep 17 00:00:00 2001 From: Lei Nelissen Date: Thu, 25 Jul 2024 23:16:20 +0200 Subject: [PATCH] fix: rename credentials and save credentials type --- src/screens/Onboarding/index.tsx | 2 +- src/screens/Settings/stacks/Library.tsx | 8 ++++---- .../components/CredentialGenerator.tsx | 3 ++- src/screens/modals/SetJellyfinServer/index.tsx | 2 +- src/store/index.ts | 16 ++++++++++++++++ src/store/settings/actions.ts | 2 +- src/store/settings/index.ts | 5 +++-- src/utility/JellyfinApi/lib.ts | 6 +++--- src/utility/JellyfinApi/playback.ts | 1 + src/utility/JellyfinApi/playlist.ts | 2 +- src/utility/JellyfinApi/track.ts | 2 +- 11 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/screens/Onboarding/index.tsx b/src/screens/Onboarding/index.tsx index feb0f44..1321a6c 100644 --- a/src/screens/Onboarding/index.tsx +++ b/src/screens/Onboarding/index.tsx @@ -38,7 +38,7 @@ const Logo = styled.Image` function Onboarding() { // Get account from Redux and dispatcher - const account = useTypedSelector(state => state.settings.jellyfin); + const account = useTypedSelector(state => state.settings.credentials); const dispatch = useAppDispatch(); // Also retrieve the navigation handler so that we can open the modal in diff --git a/src/screens/Settings/stacks/Library.tsx b/src/screens/Settings/stacks/Library.tsx index 674fbf0..e24dc8c 100644 --- a/src/screens/Settings/stacks/Library.tsx +++ b/src/screens/Settings/stacks/Library.tsx @@ -11,7 +11,7 @@ import { InputContainer, Input } from '../components/Input'; export default function LibrarySettings() { const defaultStyles = useDefaultStyles(); - const { jellyfin } = useTypedSelector(state => state.settings); + const { credentials } = useTypedSelector(state => state.settings); const navigation = useNavigation(); const handleSetLibrary = useCallback(() => navigation.navigate('SetJellyfinServer'), [navigation]); @@ -19,15 +19,15 @@ export default function LibrarySettings() { {t('jellyfin-server-url')} - + {t('jellyfin-access-token')} - + {t('jellyfin-user-id')} - +