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