chore: fix linter
This commit is contained in:
4
index.js
4
index.js
@@ -4,9 +4,9 @@ import TrackPlayer from 'react-native-track-player';
|
|||||||
import App from './src/components/App';
|
import App from './src/components/App';
|
||||||
import { name as appName } from './app.json';
|
import { name as appName } from './app.json';
|
||||||
import PlaybackService from './src/utility/PlaybackService';
|
import PlaybackService from './src/utility/PlaybackService';
|
||||||
import { setupSentry } from 'utility/Sentry';
|
import { setupSentry } from '@/utility/Sentry';
|
||||||
import { enableScreens } from 'react-native-screens';
|
import { enableScreens } from 'react-native-screens';
|
||||||
import { patchTrackPlayer } from 'utility/AddedTrackEvents';
|
import { patchTrackPlayer } from '@/utility/AddedTrackEvents';
|
||||||
|
|
||||||
setupSentry();
|
setupSentry();
|
||||||
enableScreens();
|
enableScreens();
|
||||||
|
|||||||
32
package-lock.json
generated
32
package-lock.json
generated
@@ -63,10 +63,10 @@
|
|||||||
"@sentry/cli": "^2.8.1",
|
"@sentry/cli": "^2.8.1",
|
||||||
"@types/i18n-js": "^3.8.3",
|
"@types/i18n-js": "^3.8.3",
|
||||||
"@types/jest": "^29.2.2",
|
"@types/jest": "^29.2.2",
|
||||||
|
"@types/node": "^20.3.1",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
"@types/react-test-renderer": "^18.0.0",
|
||||||
"@types/redux-logger": "^3.0.9",
|
"@types/redux-logger": "^3.0.9",
|
||||||
"@types/styled-components": "^5.1.26",
|
"@types/styled-components-react-native": "^5.2.1",
|
||||||
"@types/styled-components-react-native": "^5.2.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||||||
"@typescript-eslint/parser": "^5.42.1",
|
"@typescript-eslint/parser": "^5.42.1",
|
||||||
"babel-jest": "^29.3.1",
|
"babel-jest": "^29.3.1",
|
||||||
@@ -4314,9 +4314,9 @@
|
|||||||
"integrity": "sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w=="
|
"integrity": "sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "14.14.22",
|
"version": "20.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
|
||||||
"integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw=="
|
"integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/parse-json": {
|
"node_modules/@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -4409,13 +4409,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/styled-components-react-native": {
|
"node_modules/@types/styled-components-react-native": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/styled-components-react-native/-/styled-components-react-native-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/styled-components-react-native/-/styled-components-react-native-5.2.1.tgz",
|
||||||
"integrity": "sha512-J5w74FBkXjHO9+9gYX2CgwEWFDE1LxrBUhmkoc0y1tLZ8RoQ0AZEgljXvqY2dl5rRkTgh941VpmPKnntIyVNtg==",
|
"integrity": "sha512-XI/SWDSLSe7IjZXA9jS0vv4WPpV2B+nQhefUqk00usNHxhErlzPtTGdhjMZgrH0uYz5R0hLLIandhmhDTLkKBg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/react": "*",
|
"@types/react": "*",
|
||||||
"@types/react-native": "*",
|
"@types/react-native": "^0.70",
|
||||||
"@types/styled-components": "*"
|
"@types/styled-components": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -19074,9 +19074,9 @@
|
|||||||
"integrity": "sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w=="
|
"integrity": "sha512-zmEmF5OIM3rb7SbLCFYoQhO4dGt2FRM9AMkxvA3LaADOF1n8in/zGJlWji9fmafLoNyz+FoL6FE0SLtGIArD7w=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.14.22",
|
"version": "20.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz",
|
||||||
"integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw=="
|
"integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg=="
|
||||||
},
|
},
|
||||||
"@types/parse-json": {
|
"@types/parse-json": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -19169,13 +19169,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/styled-components-react-native": {
|
"@types/styled-components-react-native": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/styled-components-react-native/-/styled-components-react-native-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/styled-components-react-native/-/styled-components-react-native-5.2.1.tgz",
|
||||||
"integrity": "sha512-J5w74FBkXjHO9+9gYX2CgwEWFDE1LxrBUhmkoc0y1tLZ8RoQ0AZEgljXvqY2dl5rRkTgh941VpmPKnntIyVNtg==",
|
"integrity": "sha512-XI/SWDSLSe7IjZXA9jS0vv4WPpV2B+nQhefUqk00usNHxhErlzPtTGdhjMZgrH0uYz5R0hLLIandhmhDTLkKBg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/react": "*",
|
"@types/react": "*",
|
||||||
"@types/react-native": "*",
|
"@types/react-native": "^0.70",
|
||||||
"@types/styled-components": "*"
|
"@types/styled-components": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -67,10 +67,10 @@
|
|||||||
"@sentry/cli": "^2.8.1",
|
"@sentry/cli": "^2.8.1",
|
||||||
"@types/i18n-js": "^3.8.3",
|
"@types/i18n-js": "^3.8.3",
|
||||||
"@types/jest": "^29.2.2",
|
"@types/jest": "^29.2.2",
|
||||||
|
"@types/node": "^20.3.1",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
"@types/react-test-renderer": "^18.0.0",
|
||||||
"@types/redux-logger": "^3.0.9",
|
"@types/redux-logger": "^3.0.9",
|
||||||
"@types/styled-components": "^5.1.26",
|
"@types/styled-components-react-native": "^5.2.1",
|
||||||
"@types/styled-components-react-native": "^5.2.0",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||||||
"@typescript-eslint/parser": "^5.42.1",
|
"@typescript-eslint/parser": "^5.42.1",
|
||||||
"babel-jest": "^29.3.1",
|
"babel-jest": "^29.3.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useCallback, useState } from 'react';
|
import React, { useCallback, useState } from 'react';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { ALPHABET_LETTERS, THEME_COLOR } from 'CONSTANTS';
|
import { ALPHABET_LETTERS, THEME_COLOR } from '@/CONSTANTS';
|
||||||
import { View, LayoutChangeEvent } from 'react-native';
|
import { View, LayoutChangeEvent } from 'react-native';
|
||||||
import {
|
import {
|
||||||
PanGestureHandler,
|
PanGestureHandler,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Provider } from 'react-redux';
|
|||||||
import TrackPlayer, { Capability } from 'react-native-track-player';
|
import TrackPlayer, { Capability } from 'react-native-track-player';
|
||||||
import { PersistGate } from 'redux-persist/integration/react';
|
import { PersistGate } from 'redux-persist/integration/react';
|
||||||
import Routes from '../screens';
|
import Routes from '../screens';
|
||||||
import store, { persistedStore, useTypedSelector } from 'store';
|
import store, { persistedStore, useTypedSelector } from '@/store';
|
||||||
import {
|
import {
|
||||||
NavigationContainer,
|
NavigationContainer,
|
||||||
DefaultTheme,
|
DefaultTheme,
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
import { ColorSchemeProvider, themes } from './Colors';
|
import { ColorSchemeProvider, themes } from './Colors';
|
||||||
import DownloadManager from './DownloadManager';
|
import DownloadManager from './DownloadManager';
|
||||||
import { useColorScheme } from 'react-native';
|
import { useColorScheme } from 'react-native';
|
||||||
import { ColorScheme } from 'store/settings/types';
|
import { ColorScheme } from '@/store/settings/types';
|
||||||
|
|
||||||
const LightTheme = {
|
const LightTheme = {
|
||||||
...DefaultTheme,
|
...DefaultTheme,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { SvgProps } from 'react-native-svg';
|
|||||||
import {
|
import {
|
||||||
PressableProps, ViewProps, View,
|
PressableProps, ViewProps, View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
import useDefaultStyles from './Colors';
|
import useDefaultStyles from './Colors';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { BlurView, BlurViewProps } from '@react-native-community/blur';
|
import { BlurView, BlurViewProps } from '@react-native-community/blur';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import React, { PropsWithChildren } from 'react';
|
import React, { PropsWithChildren } from 'react';
|
||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { ColorSchemeName, Platform, StyleSheet, View, useColorScheme } from 'react-native';
|
import { ColorSchemeName, Platform, StyleSheet, View, useColorScheme } from 'react-native';
|
||||||
import { useTypedSelector } from 'store';
|
import { useTypedSelector } from '@/store';
|
||||||
import { ColorScheme } from 'store/settings/types';
|
import { ColorScheme } from '@/store/settings/types';
|
||||||
|
|
||||||
const majorPlatformVersion = typeof Platform.Version === 'string' ? parseInt(Platform.Version, 10) : Platform.Version;
|
const majorPlatformVersion = typeof Platform.Version === 'string' ? parseInt(Platform.Version, 10) : Platform.Version;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useMemo, useRef } from 'react';
|
import React, { useEffect, useMemo, useRef } from 'react';
|
||||||
import { useTypedSelector } from 'store';
|
import { useTypedSelector } from '@/store';
|
||||||
import CloudIcon from 'assets/icons/cloud.svg';
|
import CloudIcon from 'assets/icons/cloud.svg';
|
||||||
import CloudDownArrow from 'assets/icons/cloud-down-arrow.svg';
|
import CloudDownArrow from 'assets/icons/cloud-down-arrow.svg';
|
||||||
import CloudExclamationMarkIcon from 'assets/icons/cloud-exclamation-mark.svg';
|
import CloudExclamationMarkIcon from 'assets/icons/cloud-exclamation-mark.svg';
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { EntityId } from '@reduxjs/toolkit';
|
|||||||
import { xor } from 'lodash';
|
import { xor } from 'lodash';
|
||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import { DocumentDirectoryPath, readDir } from 'react-native-fs';
|
import { DocumentDirectoryPath, readDir } from 'react-native-fs';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { completeDownload, downloadTrack } from 'store/downloads/actions';
|
import { completeDownload, downloadTrack } from '@/store/downloads/actions';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum number of concurrent downloads we allow to take place at once.
|
* The maximum number of concurrent downloads we allow to take place at once.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react';
|
|||||||
import { TouchableOpacityProps } from 'react-native';
|
import { TouchableOpacityProps } from 'react-native';
|
||||||
import ChevronRight from 'assets/icons/chevron-right.svg';
|
import ChevronRight from 'assets/icons/chevron-right.svg';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import useDefaultStyles from './Colors';
|
import useDefaultStyles from './Colors';
|
||||||
|
|
||||||
const BUTTON_SIZE = 14;
|
const BUTTON_SIZE = 14;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import Animated from 'react-native-reanimated';
|
import Animated from 'react-native-reanimated';
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import React, { useCallback, useMemo } from 'react';
|
import React, { useCallback, useMemo } from 'react';
|
||||||
import { FlatListProps, View } from 'react-native';
|
import { FlatListProps, View } from 'react-native';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import formatBytes from 'utility/formatBytes';
|
import formatBytes from '@/utility/formatBytes';
|
||||||
import TrashIcon from 'assets/icons/trash.svg';
|
import TrashIcon from 'assets/icons/trash.svg';
|
||||||
import ArrowClockwise from 'assets/icons/arrow-clockwise.svg';
|
import ArrowClockwise from 'assets/icons/arrow-clockwise.svg';
|
||||||
import { EntityId } from '@reduxjs/toolkit';
|
import { EntityId } from '@reduxjs/toolkit';
|
||||||
import { queueTrackForDownload, removeDownloadedTrack } from 'store/downloads/actions';
|
import { queueTrackForDownload, removeDownloadedTrack } from '@/store/downloads/actions';
|
||||||
import Button from 'components/Button';
|
import Button from '@/components/Button';
|
||||||
import { t } from 'i18n-js';
|
import { t } from 'i18n-js';
|
||||||
import DownloadIcon from 'components/DownloadIcon';
|
import DownloadIcon from '@/components/DownloadIcon';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import FastImage from 'react-native-fast-image';
|
import FastImage from 'react-native-fast-image';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
import { SafeFlatList } from 'components/SafeNavigatorView';
|
import { SafeFlatList } from '@/components/SafeNavigatorView';
|
||||||
|
|
||||||
const DownloadedTrack = styled.View`
|
const DownloadedTrack = styled.View`
|
||||||
flex: 1 0 auto;
|
flex: 1 0 auto;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import React from 'react';
|
|||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
import { createStackNavigator } from '@react-navigation/stack';
|
import { createStackNavigator } from '@react-navigation/stack';
|
||||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
import { StackParams } from 'screens/types';
|
import { StackParams } from 'screens/types';
|
||||||
import NowPlaying from './overlays/NowPlaying';
|
import NowPlaying from './overlays/NowPlaying';
|
||||||
|
|
||||||
|
|||||||
@@ -5,18 +5,18 @@ import styled, { css } from 'styled-components/native';
|
|||||||
|
|
||||||
import PlayIcon from 'assets/icons/play.svg';
|
import PlayIcon from 'assets/icons/play.svg';
|
||||||
import PauseIcon from 'assets/icons/pause.svg';
|
import PauseIcon from 'assets/icons/pause.svg';
|
||||||
import useCurrentTrack from 'utility/useCurrentTrack';
|
import useCurrentTrack from '@/utility/useCurrentTrack';
|
||||||
import TrackPlayer, { State, usePlaybackState, useProgress } from 'react-native-track-player';
|
import TrackPlayer, { State, usePlaybackState, useProgress } from 'react-native-track-player';
|
||||||
import { Shadow } from 'react-native-shadow-2';
|
import { Shadow } from 'react-native-shadow-2';
|
||||||
import usePrevious from 'utility/usePrevious';
|
import usePrevious from '@/utility/usePrevious';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
|
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { calculateProgressTranslation } from 'components/Progresstrack';
|
import { calculateProgressTranslation } from '@/components/Progresstrack';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
|
import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs';
|
||||||
|
|
||||||
const NOW_PLAYING_POPOVER_MARGIN = 6;
|
const NOW_PLAYING_POPOVER_MARGIN = 6;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import React, { useCallback, useEffect } from 'react';
|
import React, { useCallback, useEffect } from 'react';
|
||||||
import { useRoute, RouteProp, useNavigation } from '@react-navigation/native';
|
import { useRoute, RouteProp, useNavigation } from '@react-navigation/native';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import TrackListView from './components/TrackListView';
|
import TrackListView from './components/TrackListView';
|
||||||
import { fetchAlbum, fetchTracksByAlbum } from 'store/music/actions';
|
import { fetchAlbum, fetchTracksByAlbum } from '@/store/music/actions';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from 'CONSTANTS';
|
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { NavigationProp, StackParams } from 'screens/types';
|
import { NavigationProp, StackParams } from 'screens/types';
|
||||||
import { SubHeader, Text } from 'components/Typography';
|
import { SubHeader, Text } from '@/components/Typography';
|
||||||
import { ScrollView } from 'react-native-gesture-handler';
|
import { ScrollView } from 'react-native-gesture-handler';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Dimensions, Pressable } from 'react-native';
|
import { Dimensions, Pressable } from 'react-native';
|
||||||
import AlbumImage from './components/AlbumImage';
|
import AlbumImage from './components/AlbumImage';
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
import React, { useCallback, useEffect, useRef, ReactText, useMemo } from 'react';
|
import React, { useCallback, useEffect, useRef, ReactText, useMemo } from 'react';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import { SectionList, View } from 'react-native';
|
import { SectionList, View } from 'react-native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { fetchAllAlbums } from 'store/music/actions';
|
import { fetchAllAlbums } from '@/store/music/actions';
|
||||||
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from 'CONSTANTS';
|
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import AlbumImage, { AlbumHeight, AlbumItem } from './components/AlbumImage';
|
import AlbumImage, { AlbumHeight, AlbumItem } from './components/AlbumImage';
|
||||||
import { selectAlbumsByAlphabet, SectionedId } from 'store/music/selectors';
|
import { selectAlbumsByAlphabet, SectionedId } from '@/store/music/selectors';
|
||||||
import AlphabetScroller from 'components/AlphabetScroller';
|
import AlphabetScroller from '@/components/AlphabetScroller';
|
||||||
import { EntityId } from '@reduxjs/toolkit';
|
import { EntityId } from '@reduxjs/toolkit';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
import { Album } from 'store/music/types';
|
import { Album } from '@/store/music/types';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import { SafeSectionList } from 'components/SafeNavigatorView';
|
import { SafeSectionList } from '@/components/SafeNavigatorView';
|
||||||
|
|
||||||
const HeadingHeight = 50;
|
const HeadingHeight = 50;
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
import React, { useCallback, useEffect, ReactText } from 'react';
|
import React, { useCallback, useEffect, ReactText } from 'react';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
|
import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { fetchAllAlbums } from 'store/music/actions';
|
import { fetchAllAlbums } from '@/store/music/actions';
|
||||||
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from 'CONSTANTS';
|
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
||||||
import { EntityId } from '@reduxjs/toolkit';
|
import { EntityId } from '@reduxjs/toolkit';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { Album } from 'store/music/types';
|
import { Album } from '@/store/music/types';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
import { NavigationProp, StackParams } from 'screens/types';
|
import { NavigationProp, StackParams } from 'screens/types';
|
||||||
import { SafeFlatList } from 'components/SafeNavigatorView';
|
import { SafeFlatList } from '@/components/SafeNavigatorView';
|
||||||
import { chunk } from 'lodash';
|
import { chunk } from 'lodash';
|
||||||
|
|
||||||
interface GeneratedAlbumItemProps {
|
interface GeneratedAlbumItemProps {
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import React, { useCallback, useEffect, useRef, useMemo } from 'react';
|
import React, { useCallback, useEffect, useRef, useMemo } from 'react';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import { SectionList, View } from 'react-native';
|
import { SectionList, View } from 'react-native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { fetchAllAlbums } from 'store/music/actions';
|
import { fetchAllAlbums } from '@/store/music/actions';
|
||||||
import { ALBUM_CACHE_AMOUNT_OF_DAYS, THEME_COLOR } from 'CONSTANTS';
|
import { ALBUM_CACHE_AMOUNT_OF_DAYS, THEME_COLOR } from '@/CONSTANTS';
|
||||||
import AlbumImage from './components/AlbumImage';
|
import AlbumImage from './components/AlbumImage';
|
||||||
import { SectionArtistItem, SectionedArtist, selectArtists } from 'store/music/selectors';
|
import { SectionArtistItem, SectionedArtist, selectArtists } from '@/store/music/selectors';
|
||||||
import AlphabetScroller from 'components/AlphabetScroller';
|
import AlphabetScroller from '@/components/AlphabetScroller';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import { SafeSectionList } from 'components/SafeNavigatorView';
|
import { SafeSectionList } from '@/components/SafeNavigatorView';
|
||||||
import { Gap } from 'components/Utility';
|
import { Gap } from '@/components/Utility';
|
||||||
|
|
||||||
const HeadingHeight = 50;
|
const HeadingHeight = 50;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useCallback, useEffect } from 'react';
|
import React, { useCallback, useEffect } from 'react';
|
||||||
import { useRoute, RouteProp } from '@react-navigation/native';
|
import { useRoute, RouteProp } from '@react-navigation/native';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import TrackListView from './components/TrackListView';
|
import TrackListView from './components/TrackListView';
|
||||||
import { fetchTracksByPlaylist } from 'store/music/actions';
|
import { fetchTracksByPlaylist } from '@/store/music/actions';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from 'CONSTANTS';
|
import { ALBUM_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { StackParams } from 'screens/types';
|
import { StackParams } from 'screens/types';
|
||||||
|
|
||||||
type Route = RouteProp<StackParams, 'Album'>;
|
type Route = RouteProp<StackParams, 'Album'>;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import React, { useCallback, useEffect, useRef, ReactText } from 'react';
|
import React, { useCallback, useEffect, useRef, ReactText } from 'react';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import { Text, View, FlatList, ListRenderItem, RefreshControl } from 'react-native';
|
import { Text, View, FlatList, ListRenderItem, RefreshControl } from 'react-native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { differenceInDays } from 'date-fns';
|
import { differenceInDays } from 'date-fns';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { fetchAllPlaylists } from 'store/music/actions';
|
import { fetchAllPlaylists } from '@/store/music/actions';
|
||||||
import { PLAYLIST_CACHE_AMOUNT_OF_DAYS } from 'CONSTANTS';
|
import { PLAYLIST_CACHE_AMOUNT_OF_DAYS } from '@/CONSTANTS';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
||||||
import { EntityId } from '@reduxjs/toolkit';
|
import { EntityId } from '@reduxjs/toolkit';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import { SafeFlatList, useNavigationOffsets } from 'components/SafeNavigatorView';
|
import { SafeFlatList, useNavigationOffsets } from '@/components/SafeNavigatorView';
|
||||||
|
|
||||||
interface GeneratedAlbumItemProps {
|
interface GeneratedAlbumItemProps {
|
||||||
id: ReactText;
|
id: ReactText;
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
import React, { useCallback, useEffect } from 'react';
|
import React, { useCallback, useEffect } from 'react';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import { Text, SafeAreaView, StyleSheet } from 'react-native';
|
import { Text, SafeAreaView, StyleSheet } from 'react-native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { fetchRecentAlbums } from 'store/music/actions';
|
import { fetchRecentAlbums } from '@/store/music/actions';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import ListContainer from './components/ListContainer';
|
import ListContainer from './components/ListContainer';
|
||||||
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
import AlbumImage, { AlbumItem } from './components/AlbumImage';
|
||||||
import { useRecentAlbums } from 'store/music/selectors';
|
import { useRecentAlbums } from '@/store/music/selectors';
|
||||||
import { Header } from 'components/Typography';
|
import { Header } from '@/components/Typography';
|
||||||
import ListButton from 'components/ListButton';
|
import ListButton from '@/components/ListButton';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { Album } from 'store/music/types';
|
import { Album } from '@/store/music/types';
|
||||||
import Divider from 'components/Divider';
|
import Divider from '@/components/Divider';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import { SafeFlatList } from 'components/SafeNavigatorView';
|
import { SafeFlatList } from '@/components/SafeNavigatorView';
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
columnWrapper: {
|
columnWrapper: {
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
import React, { PropsWithChildren, useCallback, useMemo } from 'react';
|
import React, { PropsWithChildren, useCallback, useMemo } from 'react';
|
||||||
import { Platform, RefreshControl, StyleSheet, View } from 'react-native';
|
import { Platform, RefreshControl, StyleSheet, View } from 'react-native';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import useCurrentTrack from 'utility/useCurrentTrack';
|
import useCurrentTrack from '@/utility/useCurrentTrack';
|
||||||
import TrackPlayer from 'react-native-track-player';
|
import TrackPlayer from 'react-native-track-player';
|
||||||
import Play from 'assets/icons/play.svg';
|
import Play from 'assets/icons/play.svg';
|
||||||
import Shuffle from 'assets/icons/shuffle.svg';
|
import Shuffle from 'assets/icons/shuffle.svg';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import usePlayTracks from 'utility/usePlayTracks';
|
import usePlayTracks from '@/utility/usePlayTracks';
|
||||||
import { EntityId } from '@reduxjs/toolkit';
|
import { EntityId } from '@reduxjs/toolkit';
|
||||||
import { WrappableButtonRow, WrappableButton } from 'components/WrappableButtonRow';
|
import { WrappableButtonRow, WrappableButton } from '@/components/WrappableButtonRow';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import DownloadIcon from 'components/DownloadIcon';
|
import DownloadIcon from '@/components/DownloadIcon';
|
||||||
import CloudDownArrow from 'assets/icons/cloud-down-arrow.svg';
|
import CloudDownArrow from 'assets/icons/cloud-down-arrow.svg';
|
||||||
import Trash from 'assets/icons/trash.svg';
|
import Trash from 'assets/icons/trash.svg';
|
||||||
import { queueTrackForDownload, removeDownloadedTrack } from 'store/downloads/actions';
|
import { queueTrackForDownload, removeDownloadedTrack } from '@/store/downloads/actions';
|
||||||
import { selectDownloadedTracks } from 'store/downloads/selectors';
|
import { selectDownloadedTracks } from '@/store/downloads/selectors';
|
||||||
import { Header, SubHeader } from 'components/Typography';
|
import { Header, SubHeader } from '@/components/Typography';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
|
|
||||||
import CoverImage from 'components/CoverImage';
|
import CoverImage from '@/components/CoverImage';
|
||||||
import ticksToDuration from 'utility/ticksToDuration';
|
import ticksToDuration from '@/utility/ticksToDuration';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { SafeScrollView, useNavigationOffsets } from 'components/SafeNavigatorView';
|
import { SafeScrollView, useNavigationOffsets } from '@/components/SafeNavigatorView';
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
index: {
|
index: {
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ import React, { useCallback, useEffect } from 'react';
|
|||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { NavigationProp } from 'screens';
|
import { NavigationProp } from 'screens';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { setOnboardingStatus } from 'store/settings/actions';
|
import { setOnboardingStatus } from '@/store/settings/actions';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import Button from 'components/Button';
|
import Button from '@/components/Button';
|
||||||
import { Header, Text as BaseText } from 'components/Typography';
|
import { Header, Text as BaseText } from '@/components/Typography';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
|
|
||||||
const Container = styled.SafeAreaView`
|
const Container = styled.SafeAreaView`
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { createStackNavigator } from '@react-navigation/stack';
|
import { createStackNavigator } from '@react-navigation/stack';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
import { StackParams } from 'screens/types';
|
import { StackParams } from 'screens/types';
|
||||||
import Search from './stacks/Search';
|
import Search from './stacks/Search';
|
||||||
import Album from 'screens/Music/stacks/Album';
|
import Album from 'screens/Music/stacks/Album';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { SvgProps } from 'react-native-svg';
|
import { SvgProps } from 'react-native-svg';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
import React, { useState, useEffect, useRef, useCallback } from 'react';
|
||||||
import Input from 'components/Input';
|
import Input from '@/components/Input';
|
||||||
import { ActivityIndicator, Animated, SafeAreaView, View } from 'react-native';
|
import { ActivityIndicator, Animated, SafeAreaView, View } from 'react-native';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import Fuse from 'fuse.js';
|
import Fuse from 'fuse.js';
|
||||||
import { Album, AlbumTrack } from 'store/music/types';
|
import { Album, AlbumTrack } from '@/store/music/types';
|
||||||
import { FlatList } from 'react-native-gesture-handler';
|
import { FlatList } from 'react-native-gesture-handler';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
import FastImage from 'react-native-fast-image';
|
import FastImage from 'react-native-fast-image';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
import { searchAndFetchAlbums } from 'store/music/actions';
|
import { searchAndFetchAlbums } from '@/store/music/actions';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import DownloadIcon from 'components/DownloadIcon';
|
import DownloadIcon from '@/components/DownloadIcon';
|
||||||
import ChevronRight from 'assets/icons/chevron-right.svg';
|
import ChevronRight from 'assets/icons/chevron-right.svg';
|
||||||
import SearchIcon from 'assets/icons/magnifying-glass.svg';
|
import SearchIcon from 'assets/icons/magnifying-glass.svg';
|
||||||
import { ShadowWrapper } from 'components/Shadow';
|
import { ShadowWrapper } from '@/components/Shadow';
|
||||||
import { useKeyboardHeight } from 'utility/useKeyboardHeight';
|
import { useKeyboardHeight } from '@/utility/useKeyboardHeight';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
import { useNavigationOffsets } from 'components/SafeNavigatorView';
|
import { useNavigationOffsets } from '@/components/SafeNavigatorView';
|
||||||
// import MicrophoneIcon from 'assets/icons/microphone.svg';
|
// import MicrophoneIcon from 'assets/icons/microphone.svg';
|
||||||
// import AlbumIcon from 'assets/icons/collection.svg';
|
// import AlbumIcon from 'assets/icons/collection.svg';
|
||||||
// import TrackIcon from 'assets/icons/note.svg';
|
// import TrackIcon from 'assets/icons/note.svg';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { StackNavigationProp } from '@react-navigation/stack';
|
import { StackNavigationProp } from '@react-navigation/stack';
|
||||||
import { Album } from 'store/music/types';
|
import { Album } from '@/store/music/types';
|
||||||
|
|
||||||
export type MusicStackParams = {
|
export type MusicStackParams = {
|
||||||
[key: string]: Record<string, unknown> | undefined;
|
[key: string]: Record<string, unknown> | undefined;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { SafeScrollView } from 'components/SafeNavigatorView';
|
import { SafeScrollView } from '@/components/SafeNavigatorView';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
const Container = styled(SafeScrollView)`
|
const Container = styled(SafeScrollView)`
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { Paragraph } from 'components/Typography';
|
import { Paragraph } from '@/components/Typography';
|
||||||
import { SafeScrollView } from 'components/SafeNavigatorView';
|
import { SafeScrollView } from '@/components/SafeNavigatorView';
|
||||||
import policy from '../../../../docs/privacy-policy.md';
|
import policy from '../../../../docs/privacy-policy.md';
|
||||||
|
|
||||||
const Container = styled(SafeScrollView)`
|
const Container = styled(SafeScrollView)`
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import CheckmarkIcon from 'assets/icons/checkmark.svg';
|
import CheckmarkIcon from 'assets/icons/checkmark.svg';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import { Gap } from 'components/Utility';
|
import { Gap } from '@/components/Utility';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
|
|
||||||
export const RadioList = styled.View`
|
export const RadioList = styled.View`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
|
|
||||||
export const SwitchContainer = styled.View`
|
export const SwitchContainer = styled.View`
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { createStackNavigator } from '@react-navigation/stack';
|
import { createStackNavigator } from '@react-navigation/stack';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import ListButton from 'components/ListButton';
|
import ListButton from '@/components/ListButton';
|
||||||
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
import useDefaultStyles, { ColoredBlurView } from '@/components/Colors';
|
||||||
|
|
||||||
import { SettingsNavigationProp } from './types';
|
import { SettingsNavigationProp } from './types';
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ import Sentry from './stacks/Sentry';
|
|||||||
import Library from './stacks/Library';
|
import Library from './stacks/Library';
|
||||||
import ColorScheme from './stacks/ColorScheme';
|
import ColorScheme from './stacks/ColorScheme';
|
||||||
import PlaybackReporting from './stacks/PlaybackReporting';
|
import PlaybackReporting from './stacks/PlaybackReporting';
|
||||||
import { SafeScrollView } from 'components/SafeNavigatorView';
|
import { SafeScrollView } from '@/components/SafeNavigatorView';
|
||||||
import PrivacyPolicy from './components/PrivacyPolicy';
|
import PrivacyPolicy from './components/PrivacyPolicy';
|
||||||
|
|
||||||
export function SettingsList() {
|
export function SettingsList() {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import TrackPlayer from 'react-native-track-player';
|
import TrackPlayer from 'react-native-track-player';
|
||||||
import music from 'store/music';
|
import music from '@/store/music';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import Button from 'components/Button';
|
import Button from '@/components/Button';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { Paragraph } from 'components/Typography';
|
import { Paragraph } from '@/components/Typography';
|
||||||
import { useAppDispatch } from 'store';
|
import { useAppDispatch } from '@/store';
|
||||||
import Container from '../components/Container';
|
import Container from '../components/Container';
|
||||||
|
|
||||||
const ClearCache = styled(Button)`
|
const ClearCache = styled(Button)`
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { Paragraph } from 'components/Typography';
|
import { Paragraph } from '@/components/Typography';
|
||||||
import Container from '../components/Container';
|
import Container from '../components/Container';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { RadioItem, RadioList } from '../components/Radio';
|
import { RadioItem, RadioList } from '../components/Radio';
|
||||||
import { ColorScheme } from 'store/settings/types';
|
import { ColorScheme } from '@/store/settings/types';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { setColorScheme } from 'store/settings/actions';
|
import { setColorScheme } from '@/store/settings/actions';
|
||||||
|
|
||||||
export default function ColorSchemeSetting() {
|
export default function ColorSchemeSetting() {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { NavigationProp } from '../..';
|
import { NavigationProp } from '../..';
|
||||||
import { useTypedSelector } from 'store';
|
import { useTypedSelector } from '@/store';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import Button from 'components/Button';
|
import Button from '@/components/Button';
|
||||||
import { Paragraph } from 'components/Typography';
|
import { Paragraph } from '@/components/Typography';
|
||||||
import Container from '../components/Container';
|
import Container from '../components/Container';
|
||||||
import { InputContainer, Input } from '../components/Input';
|
import { InputContainer, Input } from '../components/Input';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Paragraph } from 'components/Typography';
|
import { Paragraph } from '@/components/Typography';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { Switch } from 'react-native-gesture-handler';
|
import { Switch } from 'react-native-gesture-handler';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { SafeScrollView } from 'components/SafeNavigatorView';
|
import { SafeScrollView } from '@/components/SafeNavigatorView';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { setEnablePlaybackReporting } from 'store/settings/actions';
|
import { setEnablePlaybackReporting } from '@/store/settings/actions';
|
||||||
import Container from '../components/Container';
|
import Container from '../components/Container';
|
||||||
import { SwitchContainer, SwitchLabel } from '../components/Switch';
|
import { SwitchContainer, SwitchLabel } from '../components/Switch';
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import { Paragraph, Text } from 'components/Typography';
|
import { Paragraph, Text } from '@/components/Typography';
|
||||||
|
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Switch } from 'react-native-gesture-handler';
|
import { Switch } from 'react-native-gesture-handler';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
import { isSentryEnabled, setSentryStatus } from 'utility/Sentry';
|
import { isSentryEnabled, setSentryStatus } from '@/utility/Sentry';
|
||||||
import Accordion from 'react-native-collapsible/Accordion';
|
import Accordion from 'react-native-collapsible/Accordion';
|
||||||
import ChevronIcon from 'assets/icons/chevron-right.svg';
|
import ChevronIcon from 'assets/icons/chevron-right.svg';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import useDefaultStyles, { DefaultStylesProvider } from 'components/Colors';
|
import useDefaultStyles, { DefaultStylesProvider } from '@/components/Colors';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { SafeScrollView } from 'components/SafeNavigatorView';
|
import { SafeScrollView } from '@/components/SafeNavigatorView';
|
||||||
|
|
||||||
const Container = styled.View`
|
const Container = styled.View`
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { createBottomTabNavigator, BottomTabNavigationProp } from '@react-naviga
|
|||||||
import { StackNavigationProp } from '@react-navigation/stack';
|
import { StackNavigationProp } from '@react-navigation/stack';
|
||||||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||||
import { CompositeNavigationProp } from '@react-navigation/native';
|
import { CompositeNavigationProp } from '@react-navigation/native';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
|
|
||||||
import SearchStack from './Search';
|
import SearchStack from './Search';
|
||||||
import Music from './Music';
|
import Music from './Music';
|
||||||
@@ -17,13 +17,13 @@ import SearchIcon from 'assets/icons/magnifying-glass.svg';
|
|||||||
import NotesIcon from 'assets/icons/notes.svg';
|
import NotesIcon from 'assets/icons/notes.svg';
|
||||||
import GearIcon from 'assets/icons/gear.svg';
|
import GearIcon from 'assets/icons/gear.svg';
|
||||||
import DownloadsIcon from 'assets/icons/arrow-down-to-line.svg';
|
import DownloadsIcon from 'assets/icons/arrow-down-to-line.svg';
|
||||||
import { useTypedSelector } from 'store';
|
import { useTypedSelector } from '@/store';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import ErrorReportingAlert from 'utility/ErrorReportingAlert';
|
import ErrorReportingAlert from '@/utility/ErrorReportingAlert';
|
||||||
import ErrorReportingPopup from './modals/ErrorReportingPopup';
|
import ErrorReportingPopup from './modals/ErrorReportingPopup';
|
||||||
import Player from './modals/Player';
|
import Player from './modals/Player';
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
import { ColoredBlurView } from 'components/Colors';
|
import { ColoredBlurView } from '@/components/Colors';
|
||||||
import { StackParams } from './types';
|
import { StackParams } from './types';
|
||||||
|
|
||||||
const Stack = createNativeStackNavigator<StackParams>();
|
const Stack = createNativeStackNavigator<StackParams>();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Modal from 'components/Modal';
|
import Modal from '@/components/Modal';
|
||||||
import Sentry from 'screens/Settings/stacks/Sentry';
|
import Sentry from 'screens/Settings/stacks/Sentry';
|
||||||
|
|
||||||
export default function ErrorReportingPopup() {
|
export default function ErrorReportingPopup() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { showRoutePicker, useAirplayRoutes } from 'react-airplay';
|
import { showRoutePicker, useAirplayRoutes } from 'react-airplay';
|
||||||
import { TouchableOpacity } from 'react-native';
|
import { TouchableOpacity } from 'react-native';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
import AirplayAudioIcon from 'assets/icons/airplay-audio.svg';
|
import AirplayAudioIcon from 'assets/icons/airplay-audio.svg';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
|
|
||||||
const Container = styled.View<{ active?: boolean }>`
|
const Container = styled.View<{ active?: boolean }>`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useNetInfo } from '@react-native-community/netinfo';
|
import { useNetInfo } from '@react-native-community/netinfo';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import CloudSlash from 'assets/icons/cloud-slash.svg';
|
import CloudSlash from 'assets/icons/cloud-slash.svg';
|
||||||
import { Text } from 'react-native';
|
import { Text } from 'react-native';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
|
|
||||||
const Well = styled.View`
|
const Well = styled.View`
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import TrackPlayer, { State, usePlaybackState } from 'react-native-track-player';
|
import TrackPlayer, { State, usePlaybackState } from 'react-native-track-player';
|
||||||
import { TouchableOpacity, useColorScheme } from 'react-native';
|
import { TouchableOpacity, useColorScheme } from 'react-native';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { useHasNextQueue, useHasPreviousQueue } from 'utility/useQueue';
|
import { useHasNextQueue, useHasPreviousQueue } from '@/utility/useQueue';
|
||||||
import ForwardIcon from 'assets/icons/forward-end.svg';
|
import ForwardIcon from 'assets/icons/forward-end.svg';
|
||||||
import BackwardIcon from 'assets/icons/backward-end.svg';
|
import BackwardIcon from 'assets/icons/backward-end.svg';
|
||||||
import PlayIcon from 'assets/icons/play.svg';
|
import PlayIcon from 'assets/icons/play.svg';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import useCurrentTrack from 'utility/useCurrentTrack';
|
import useCurrentTrack from '@/utility/useCurrentTrack';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import CoverImage from 'components/CoverImage';
|
import CoverImage from '@/components/CoverImage';
|
||||||
import { Header, SubHeader } from 'components/Typography';
|
import { Header, SubHeader } from '@/components/Typography';
|
||||||
|
|
||||||
const Artwork = styled(CoverImage)`
|
const Artwork = styled(CoverImage)`
|
||||||
margin: 0 auto 25px auto;
|
margin: 0 auto 25px auto;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import ProgressTrack, {
|
|||||||
getMinutes,
|
getMinutes,
|
||||||
getSeconds,
|
getSeconds,
|
||||||
ProgressTrackContainer
|
ProgressTrackContainer
|
||||||
} from 'components/Progresstrack';
|
} from '@/components/Progresstrack';
|
||||||
import { Gesture, GestureDetector, gestureHandlerRootHOC } from 'react-native-gesture-handler';
|
import { Gesture, GestureDetector, gestureHandlerRootHOC } from 'react-native-gesture-handler';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import Reanimated, {
|
import Reanimated, {
|
||||||
useSharedValue,
|
useSharedValue,
|
||||||
useAnimatedStyle,
|
useAnimatedStyle,
|
||||||
@@ -17,8 +17,8 @@ import Reanimated, {
|
|||||||
useDerivedValue,
|
useDerivedValue,
|
||||||
runOnJS,
|
runOnJS,
|
||||||
} from 'react-native-reanimated';
|
} from 'react-native-reanimated';
|
||||||
import ReText from 'components/ReText';
|
import ReText from '@/components/ReText';
|
||||||
import useCurrentTrack from 'utility/useCurrentTrack';
|
import useCurrentTrack from '@/utility/useCurrentTrack';
|
||||||
|
|
||||||
const DRAG_HANDLE_SIZE = 20;
|
const DRAG_HANDLE_SIZE = 20;
|
||||||
const PADDING_TOP = 12;
|
const PADDING_TOP = 12;
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
import useQueue from 'utility/useQueue';
|
import useQueue from '@/utility/useQueue';
|
||||||
import { View, StyleSheet, ListRenderItemInfo } from 'react-native';
|
import { View, StyleSheet, ListRenderItemInfo } from 'react-native';
|
||||||
import styled, { css } from 'styled-components/native';
|
import styled, { css } from 'styled-components/native';
|
||||||
import useCurrentTrack from 'utility/useCurrentTrack';
|
import useCurrentTrack from '@/utility/useCurrentTrack';
|
||||||
import TouchableHandler from 'components/TouchableHandler';
|
import TouchableHandler from '@/components/TouchableHandler';
|
||||||
import TrackPlayer, { RepeatMode, Track } from 'react-native-track-player';
|
import TrackPlayer, { RepeatMode, Track } from 'react-native-track-player';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import RepeatIcon from 'assets/icons/repeat.svg';
|
import RepeatIcon from 'assets/icons/repeat.svg';
|
||||||
import RepeatSingleIcon from 'assets/icons/repeat.1.svg';
|
import RepeatSingleIcon from 'assets/icons/repeat.1.svg';
|
||||||
import Button from 'components/Button';
|
import Button from '@/components/Button';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import DownloadIcon from 'components/DownloadIcon';
|
import DownloadIcon from '@/components/DownloadIcon';
|
||||||
import Divider from 'components/Divider';
|
import Divider from '@/components/Divider';
|
||||||
import ticksToDuration from 'utility/ticksToDuration';
|
import ticksToDuration from '@/utility/ticksToDuration';
|
||||||
|
|
||||||
const ICON_SIZE = 16;
|
const ICON_SIZE = 16;
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import useCurrentTrack from 'utility/useCurrentTrack';
|
import useCurrentTrack from '@/utility/useCurrentTrack';
|
||||||
import CloudIcon from 'assets/icons/cloud.svg';
|
import CloudIcon from 'assets/icons/cloud.svg';
|
||||||
import InternalDriveIcon from 'assets/icons/internal-drive.svg';
|
import InternalDriveIcon from 'assets/icons/internal-drive.svg';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import Casting from './Casting';
|
import Casting from './Casting';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
|
|
||||||
const ICON_SIZE = 16;
|
const ICON_SIZE = 16;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component, createRef } from 'react';
|
import React, { Component, createRef } from 'react';
|
||||||
import { WebView, WebViewMessageEvent } from 'react-native-webview';
|
import { WebView, WebViewMessageEvent } from 'react-native-webview';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import { AppState } from 'store';
|
import { AppState } from '@/store';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
serverUrl: string;
|
serverUrl: string;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import React, { useState, useCallback } from 'react';
|
import React, { useState, useCallback } from 'react';
|
||||||
import { Button, View } from 'react-native';
|
import { Button, View } from 'react-native';
|
||||||
import Modal from 'components/Modal';
|
import Modal from '@/components/Modal';
|
||||||
import Input from 'components/Input';
|
import Input from '@/components/Input';
|
||||||
import { setJellyfinCredentials } from 'store/settings/actions';
|
import { setJellyfinCredentials } from '@/store/settings/actions';
|
||||||
import { useNavigation, StackActions } from '@react-navigation/native';
|
import { useNavigation, StackActions } from '@react-navigation/native';
|
||||||
import CredentialGenerator from './components/CredentialGenerator';
|
import CredentialGenerator from './components/CredentialGenerator';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from '@/CONSTANTS';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import useDefaultStyles from 'components/Colors';
|
import useDefaultStyles from '@/components/Colors';
|
||||||
import { Text } from 'components/Typography';
|
import { Text } from '@/components/Typography';
|
||||||
import { useAppDispatch } from 'store';
|
import { useAppDispatch } from '@/store';
|
||||||
|
|
||||||
|
|
||||||
export default function SetJellyfinServer() {
|
export default function SetJellyfinServer() {
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useNavigation, StackActions, useRoute, RouteProp } from '@react-navigation/native';
|
import { useNavigation, StackActions, useRoute, RouteProp } from '@react-navigation/native';
|
||||||
import { StackParams } from 'screens/types';
|
import { StackParams } from 'screens/types';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { Header, SubHeader } from 'components/Typography';
|
import { Header, SubHeader } from '@/components/Typography';
|
||||||
import styled from 'styled-components/native';
|
import styled from 'styled-components/native';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import PlayIcon from 'assets/icons/play.svg';
|
import PlayIcon from 'assets/icons/play.svg';
|
||||||
import DownloadIcon from 'assets/icons/cloud-down-arrow.svg';
|
import DownloadIcon from 'assets/icons/cloud-down-arrow.svg';
|
||||||
import QueueAppendIcon from 'assets/icons/queue-append.svg';
|
import QueueAppendIcon from 'assets/icons/queue-append.svg';
|
||||||
import TrashIcon from 'assets/icons/trash.svg';
|
import TrashIcon from 'assets/icons/trash.svg';
|
||||||
|
|
||||||
import { WrappableButton, WrappableButtonRow } from 'components/WrappableButtonRow';
|
import { WrappableButton, WrappableButtonRow } from '@/components/WrappableButtonRow';
|
||||||
import CoverImage from 'components/CoverImage';
|
import CoverImage from '@/components/CoverImage';
|
||||||
import { queueTrackForDownload, removeDownloadedTrack } from 'store/downloads/actions';
|
import { queueTrackForDownload, removeDownloadedTrack } from '@/store/downloads/actions';
|
||||||
import usePlayTracks from 'utility/usePlayTracks';
|
import usePlayTracks from '@/utility/usePlayTracks';
|
||||||
import { selectIsDownloaded } from 'store/downloads/selectors';
|
import { selectIsDownloaded } from '@/store/downloads/selectors';
|
||||||
import { useGetImage } from 'utility/JellyfinApi';
|
import { useGetImage } from '@/utility/JellyfinApi';
|
||||||
|
|
||||||
type Route = RouteProp<StackParams, 'TrackPopupMenu'>;
|
type Route = RouteProp<StackParams, 'TrackPopupMenu'>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { StackNavigationProp } from '@react-navigation/stack';
|
import { StackNavigationProp } from '@react-navigation/stack';
|
||||||
import { SectionArtistItem } from 'store/music/selectors';
|
import { SectionArtistItem } from '@/store/music/selectors';
|
||||||
import { Album } from 'store/music/types';
|
import { Album } from '@/store/music/types';
|
||||||
|
|
||||||
export type StackParams = {
|
export type StackParams = {
|
||||||
[key: string]: Record<string, unknown> | object | undefined;
|
[key: string]: Record<string, unknown> | object | undefined;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createAction, createAsyncThunk, createEntityAdapter, EntityId } from '@reduxjs/toolkit';
|
import { createAction, createAsyncThunk, createEntityAdapter, EntityId } from '@reduxjs/toolkit';
|
||||||
import { AppState } from 'store';
|
import { AppState } from '@/store';
|
||||||
import { generateTrackUrl } from 'utility/JellyfinApi';
|
import { generateTrackUrl } from '@/utility/JellyfinApi';
|
||||||
import { downloadFile, unlink, DocumentDirectoryPath, exists } from 'react-native-fs';
|
import { downloadFile, unlink, DocumentDirectoryPath, exists } from 'react-native-fs';
|
||||||
import { DownloadEntity } from './types';
|
import { DownloadEntity } from './types';
|
||||||
import MimeTypes from 'utility/MimeTypes';
|
import MimeTypes from '@/utility/MimeTypes';
|
||||||
|
|
||||||
export const downloadAdapter = createEntityAdapter<DownloadEntity>({
|
export const downloadAdapter = createEntityAdapter<DownloadEntity>({
|
||||||
selectId: (entity) => entity.id,
|
selectId: (entity) => entity.id,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { createSelector, EntityId } from '@reduxjs/toolkit';
|
import { createSelector, EntityId } from '@reduxjs/toolkit';
|
||||||
import { intersection } from 'lodash';
|
import { intersection } from 'lodash';
|
||||||
import { AppState } from 'store';
|
import { AppState } from '@/store';
|
||||||
|
|
||||||
export const selectAllDownloads = (state: AppState) => state.downloads;
|
export const selectAllDownloads = (state: AppState) => state.downloads;
|
||||||
export const selectDownloadedEntities = (state: AppState) => state.downloads.entities;
|
export const selectDownloadedEntities = (state: AppState) => state.downloads.entities;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { createAsyncThunk, createEntityAdapter } from '@reduxjs/toolkit';
|
import { createAsyncThunk, createEntityAdapter } from '@reduxjs/toolkit';
|
||||||
import { Album, AlbumTrack, Playlist } from './types';
|
import { Album, AlbumTrack, Playlist } from './types';
|
||||||
import { AsyncThunkAPI } from '..';
|
import { AsyncThunkAPI } from '..';
|
||||||
import { retrieveAllAlbums, retrieveAlbumTracks, retrieveRecentAlbums, searchItem, retrieveAlbum, retrieveAllPlaylists, retrievePlaylistTracks } from 'utility/JellyfinApi';
|
import { retrieveAllAlbums, retrieveAlbumTracks, retrieveRecentAlbums, searchItem, retrieveAlbum, retrieveAllPlaylists, retrievePlaylistTracks } from '@/utility/JellyfinApi';
|
||||||
|
|
||||||
export const albumAdapter = createEntityAdapter<Album>({
|
export const albumAdapter = createEntityAdapter<Album>({
|
||||||
selectId: album => album.Id,
|
selectId: album => album.Id,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
} from './actions';
|
} from './actions';
|
||||||
import { createSlice, Dictionary, EntityId } from '@reduxjs/toolkit';
|
import { createSlice, Dictionary, EntityId } from '@reduxjs/toolkit';
|
||||||
import { Album, AlbumTrack, Playlist } from './types';
|
import { Album, AlbumTrack, Playlist } from './types';
|
||||||
import { setJellyfinCredentials } from 'store/settings/actions';
|
import { setJellyfinCredentials } from '@/store/settings/actions';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
albums: {
|
albums: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useTypedSelector, AppState } from 'store';
|
import { useTypedSelector, AppState } from '@/store';
|
||||||
import { parseISO } from 'date-fns';
|
import { parseISO } from 'date-fns';
|
||||||
import { ALPHABET_LETTERS } from 'CONSTANTS';
|
import { ALPHABET_LETTERS } from '@/CONSTANTS';
|
||||||
import { createSelector, EntityId } from '@reduxjs/toolkit';
|
import { createSelector, EntityId } from '@reduxjs/toolkit';
|
||||||
import { SectionListData } from 'react-native';
|
import { SectionListData } from 'react-native';
|
||||||
import { ArtistItem } from './types';
|
import { ArtistItem } from './types';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
import { useAppDispatch, useTypedSelector } from 'store';
|
import { useAppDispatch, useTypedSelector } from '@/store';
|
||||||
import { t } from '@localisation';
|
import { t } from '@/localisation';
|
||||||
import { setReceivedErrorReportingAlert } from 'store/settings/actions';
|
import { setReceivedErrorReportingAlert } from '@/store/settings/actions';
|
||||||
import { setSentryStatus } from './Sentry';
|
import { setSentryStatus } from './Sentry';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { NavigationProp } from 'screens/types';
|
import { NavigationProp } from 'screens/types';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import TrackPlayer, { RepeatMode, State, Track } from 'react-native-track-player';
|
import TrackPlayer, { RepeatMode, State, Track } from 'react-native-track-player';
|
||||||
import { AppState, useTypedSelector } from 'store';
|
import { AppState, useTypedSelector } from '@/store';
|
||||||
import { Album, AlbumTrack, SimilarAlbum } from 'store/music/types';
|
import { Album, AlbumTrack, SimilarAlbum } from '@/store/music/types';
|
||||||
|
|
||||||
type Credentials = AppState['settings']['jellyfin'];
|
type Credentials = AppState['settings']['jellyfin'];
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import TrackPlayer, { Event, State } from 'react-native-track-player';
|
import TrackPlayer, { Event, State } from 'react-native-track-player';
|
||||||
import store from 'store';
|
import store from '@/store';
|
||||||
import { sendPlaybackEvent } from './JellyfinApi';
|
import { sendPlaybackEvent } from './JellyfinApi';
|
||||||
|
|
||||||
export default async function() {
|
export default async function() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useTypedSelector } from 'store';
|
import { useTypedSelector } from '@/store';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import TrackPlayer, { Track } from 'react-native-track-player';
|
import TrackPlayer, { Track } from 'react-native-track-player';
|
||||||
import { generateTrack } from './JellyfinApi';
|
import { generateTrack } from './JellyfinApi';
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
{
|
{
|
||||||
"extends": "@tsconfig/react-native/tsconfig.json"
|
"extends": "@tsconfig/react-native/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./src",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"*"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"types": [
|
||||||
|
"@types/styled-components-react-native",
|
||||||
|
"@types/node"
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user