Front: Merge
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
> Why do I have a folder named ".expo" in my project?
|
||||
|
||||
The ".expo" folder is created when an Expo project is started using "expo start" command.
|
||||
|
||||
> What do the files contain?
|
||||
|
||||
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
|
||||
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
|
||||
- "settings.json": contains the server configuration that is used to serve the application manifest.
|
||||
|
||||
> Should I commit the ".expo" folder?
|
||||
|
||||
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
|
||||
|
||||
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"hostType": "lan",
|
||||
"lanType": "ip",
|
||||
"dev": true,
|
||||
"minify": false,
|
||||
"urlRandomness": null,
|
||||
"https": false
|
||||
}
|
||||
@@ -24,11 +24,11 @@ import TextButton from './components/TextButton';
|
||||
|
||||
|
||||
const protectedRoutes = () => ({
|
||||
Home: { component: HomeView, options: { title: translate('welcome') } },
|
||||
Home: { component: HomeView, options: { title: translate('welcome'), headerLeft: null } },
|
||||
Settings: { component: SetttingsNavigator, options: { title: 'Settings' } },
|
||||
Play: { component: PlayView, options: { title: translate('play') } },
|
||||
Song: { component: SongLobbyView, options: { title: translate('play') } },
|
||||
Score: { component: ScoreView, options: { title: translate('score') } },
|
||||
Score: { component: ScoreView, options: { title: translate('score'), headerLeft: null } },
|
||||
Search: { component: SearchView, options: { title: translate('search') } },
|
||||
User: { component: ProfileView, options: { title: translate('user') } },
|
||||
}) as const;
|
||||
|
||||
@@ -68,13 +68,13 @@ const HomeView = () => {
|
||||
}
|
||||
/>
|
||||
<Stack direction={{ base: 'column', lg: 'row' }}>
|
||||
<Box flex={{ md: 1 }}>
|
||||
<Box flex={{ lg: 1 }}>
|
||||
<Heading><Translate translationKey='mySkillsToImprove'/></Heading>
|
||||
<Box padding={5}>
|
||||
<CompetenciesTable {...skillsQuery.data}/>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box flex={{ md: 1 }}>
|
||||
<Box flex={{ lg: 1 }}>
|
||||
<SongCardGrid
|
||||
heading={<Translate translationKey='recentlyPlayed'/>}
|
||||
songs={songHistory
|
||||
|
||||
@@ -51,6 +51,7 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
|
||||
API.getSongMusicXML(songId).then((data) => new TextDecoder().decode(data)),
|
||||
{ staleTime: Infinity }
|
||||
);
|
||||
const [midiKeyboardFound, setMidiKeyboardFound] = useState<boolean>();
|
||||
|
||||
const onPause = () => {
|
||||
stopwatch.pause();
|
||||
@@ -89,7 +90,7 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
|
||||
toast.show({ description: 'No MIDI Keyboard found' });
|
||||
return;
|
||||
}
|
||||
toast.show({ description: `MIDI ready!`, placement: 'top' });
|
||||
setMidiKeyboardFound(true);
|
||||
let inputIndex = 0;
|
||||
webSocket.current = new WebSocket(scoroBaseApiUrl);
|
||||
webSocket.current.onopen = () => {
|
||||
@@ -251,9 +252,7 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
|
||||
<Text style={{ fontWeight: '700' }}>{song.data.name}</Text>
|
||||
</Center>
|
||||
<Row style={{ flex: 1, height: '100%', justifyContent: 'space-evenly', alignItems: 'center' }}>
|
||||
<IconButton size='sm' colorScheme='secondary' variant='solid' icon={
|
||||
<Icon as={Ionicons} name={"play-back"}/>
|
||||
}/>
|
||||
{midiKeyboardFound && <>
|
||||
<IconButton size='sm' variant='solid' icon={
|
||||
<Icon as={Ionicons} name={paused ? "play" : "pause"}/>
|
||||
} onPress={() => {
|
||||
@@ -270,12 +269,13 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
|
||||
setVirtualPianoVisible(!isVirtualPianoVisible);
|
||||
}}/>
|
||||
<Text>{Math.floor(time / 60000)}:{Math.floor((time % 60000) / 1000).toFixed(0).toString().padStart(2, '0')}</Text>
|
||||
<IconButton size='sm' colorScheme='coolGray' variant='solid' icon={
|
||||
<IconButton size='sm' colorScheme='coolGray' variant='solid' opacity={time ?? 1} disabled={time == 0} icon={
|
||||
<Icon as={Ionicons} name="stop"/>
|
||||
} onPress={() => {
|
||||
onEnd();
|
||||
navigation.navigate('Score', { songId: song.data.id });
|
||||
}}/>
|
||||
</>}
|
||||
</Row>
|
||||
</Row>
|
||||
</Box>
|
||||
|
||||
@@ -18,8 +18,7 @@ const ScoreView = ({ songId, route }: RouteProps<ScoreViewProps>) => {
|
||||
() => API.getArtist(songQuery.data!.artistId!),
|
||||
{ enabled: songQuery.data != undefined }
|
||||
);
|
||||
const songScoreQuery = useQuery(["score", songId], () => API.getUserPlayHistory()
|
||||
.then((history) => history.find((h) => h.songID == songId )!));
|
||||
const songHistoryQuery = useQuery(["song", "history"], () => API.getUserPlayHistory());
|
||||
// const perfoamnceRecommandationsQuery = useQuery(['song', props.songId, 'score', 'latest', 'recommendations'], () => API.getLastSongPerformanceScore(props.songId));
|
||||
const recommendations = useQuery(['song', 'recommendations'], () => API.getUserRecommendations());
|
||||
const artistRecommendations = useQueries(recommendations.data
|
||||
@@ -29,9 +28,14 @@ const ScoreView = ({ songId, route }: RouteProps<ScoreViewProps>) => {
|
||||
queryFn: () => API.getArtist(song.artistId!)
|
||||
})) ?? []
|
||||
)
|
||||
if (!recommendations.data || artistRecommendations.find(({ data }) => !data) || !songScoreQuery.data || !songQuery.data || (songQuery.data.artistId && !artistQuery.data)) {
|
||||
|
||||
if (!recommendations.data || artistRecommendations.find(({ data }) => !data) || !songHistoryQuery.data || !songQuery.data || (songQuery.data.artistId && !artistQuery.data)) {
|
||||
return <LoadingView/>;
|
||||
}
|
||||
const songScore = songHistoryQuery.data.find((history) => history.songID == songId);
|
||||
if (!songScore) {
|
||||
return <Center><Translate translationKey="unknownError"/></Center>;
|
||||
}
|
||||
return <ScrollView p={8} contentContainerStyle={{ alignItems: 'center' }}>
|
||||
<VStack width={{ base: '100%', lg: '50%' }} textAlign='center'>
|
||||
<Text bold fontSize='lg'>{songQuery.data.name}</Text>
|
||||
@@ -60,7 +64,7 @@ const ScoreView = ({ songId, route }: RouteProps<ScoreViewProps>) => {
|
||||
<Row style={{ alignItems: 'center' }}>
|
||||
<Translate translationKey='score' format={(t) => t + ' : '}/>
|
||||
<Text bold fontSize='xl'>
|
||||
{songScoreQuery.data.score + "pts"}
|
||||
{songScore.score + "pts"}
|
||||
</Text>
|
||||
</Row>
|
||||
</Column>
|
||||
|
||||
@@ -4742,11 +4742,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/vexflow/-/vexflow-1.2.38.tgz#a09b32956b2005e567cac851d539961c43ce0992"
|
||||
integrity sha512-OmEfhv07molNFqbOJ/UD2bUHZbeUzKo4aj+jpe21Ce8+xY2ihCXwcUcfSHv0oCVdnw/cpkPxQcIyLh/MCd7e/g==
|
||||
|
||||
"@types/vexflow@^3.0.0":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/vexflow/-/vexflow-3.0.1.tgz#3b249484542de9ad36fc261002552b6481ba794d"
|
||||
integrity sha512-uocoyb4hjVJ2sBsf7Oe4gGrwOaCohGsRV6zGOmJOFUrM8iI3OkQjNS2wDjt6gCo3Kg6tf3mRNnqnDFK57TZHZA==
|
||||
|
||||
"@types/webpack-env@^1.16.0", "@types/webpack-env@^1.17.0":
|
||||
version "1.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.18.0.tgz#ed6ecaa8e5ed5dfe8b2b3d00181702c9925f13fb"
|
||||
@@ -5727,14 +5722,6 @@ audio-loader@^0.5.0:
|
||||
resolved "https://registry.yarnpkg.com/audio-loader/-/audio-loader-0.5.0.tgz#9c125d1b25c33cd9626084054d9f6b7f31ddc908"
|
||||
integrity sha512-mEoYRjZhqkBSen/X9i2PNosqvafEsur8bI5MNoPr0wsJu9Nzlul3Yv1elYeMPsXxTxYhXLY8AZlScBvaK4mydg==
|
||||
|
||||
automation-events@^2.0.19:
|
||||
version "2.0.19"
|
||||
resolved "https://registry.yarnpkg.com/automation-events/-/automation-events-2.0.19.tgz#b9969baee3897ded9d5f4ba9cfb4b18565176b12"
|
||||
integrity sha512-6RUNmFkmTYXq/W+ovdwLdqqj44rGh9+dGjg4qLaktVHYT1+c+PdlYAkaCn/H2AaqprW9NZhK+jsXT4t8izPV+w==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.11.2"
|
||||
tslib "^2.0.1"
|
||||
|
||||
autoprefixer@^9.8.6:
|
||||
version "9.8.8"
|
||||
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.8.tgz#fd4bd4595385fa6f06599de749a4d5f7a474957a"
|
||||
@@ -11859,16 +11846,6 @@ jszip@3.10.1:
|
||||
readable-stream "~2.3.6"
|
||||
setimmediate "^1.0.5"
|
||||
|
||||
jszip@3.4.0:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.4.0.tgz#1a69421fa5f0bb9bc222a46bca88182fba075350"
|
||||
integrity sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg==
|
||||
dependencies:
|
||||
lie "~3.3.0"
|
||||
pako "~1.0.2"
|
||||
readable-stream "~2.3.6"
|
||||
set-immediate-shim "~1.0.1"
|
||||
|
||||
junk@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/junk/-/junk-3.1.0.tgz#31499098d902b7e98c5d9b9c80f43457a88abfa1"
|
||||
@@ -13726,17 +13703,6 @@ open@^8.0.4, open@^8.3.0, open@^8.4.0:
|
||||
is-docker "^2.1.1"
|
||||
is-wsl "^2.2.0"
|
||||
|
||||
opensheetmusicdisplay@^0.8.4:
|
||||
version "0.8.7"
|
||||
resolved "https://registry.yarnpkg.com/opensheetmusicdisplay/-/opensheetmusicdisplay-0.8.7.tgz#73e1fff4ebfa761224db870184dbf14d96b93939"
|
||||
integrity sha512-KBfWrhKhCTR2GaG9xnj9bIgYJd2/k3YZdQ9FPQDjbfVttMTD/CNBf1VNBU0cSZfU4pkRPpF16It+uACxK+wYQg==
|
||||
dependencies:
|
||||
"@types/vexflow" "^3.0.0"
|
||||
jszip "3.4.0"
|
||||
loglevel "^1.6.8"
|
||||
typescript-collections "^1.3.3"
|
||||
vexflow "1.2.93"
|
||||
|
||||
opensheetmusicdisplay@^1.7.5:
|
||||
version "1.7.5"
|
||||
resolved "https://registry.yarnpkg.com/opensheetmusicdisplay/-/opensheetmusicdisplay-1.7.5.tgz#9324a3be2527e584c615626ab0d8913017924ffe"
|
||||
@@ -13827,15 +13793,6 @@ osenv@^0.1.5:
|
||||
os-homedir "^1.0.0"
|
||||
os-tmpdir "^1.0.0"
|
||||
|
||||
osmd-audio-player@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/osmd-audio-player/-/osmd-audio-player-0.7.0.tgz#60a0d8b513dff761691d40f7d044a6cbee6b652d"
|
||||
integrity sha512-77DlsBYavexSNxadpil3Q3tvoJPSAWQ2h2sRee/kRMwQiS+qxuz1Z+kTN1QW7js3T+KqpUyOYn02+Q5MRqsfbw==
|
||||
dependencies:
|
||||
opensheetmusicdisplay "^0.8.4"
|
||||
soundfont-player "^0.12.0"
|
||||
standardized-audio-context "^24.1.25"
|
||||
|
||||
p-all@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/p-all/-/p-all-2.1.0.tgz#91419be56b7dee8fe4c5db875d55e0da084244a0"
|
||||
@@ -16160,11 +16117,6 @@ set-blocking@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
|
||||
integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==
|
||||
|
||||
set-immediate-shim@~1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
|
||||
integrity sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ==
|
||||
|
||||
set-value@^2.0.0, set-value@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
|
||||
@@ -16601,15 +16553,6 @@ stacktrace-parser@^0.1.3:
|
||||
dependencies:
|
||||
type-fest "^0.7.1"
|
||||
|
||||
standardized-audio-context@^24.1.25:
|
||||
version "24.1.26"
|
||||
resolved "https://registry.yarnpkg.com/standardized-audio-context/-/standardized-audio-context-24.1.26.tgz#6c549a275cf071ba827efe21d2ea08f9bdc996fd"
|
||||
integrity sha512-Grm5EZGcg7hDmLZWbyZ/93dBzlRii9HUmRjmyyatissEzdBPxeA4Ptt9VjtYnd0mEOzxxbS222SxpbYnV57JFA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.11.2"
|
||||
automation-events "^2.0.19"
|
||||
tslib "^2.0.1"
|
||||
|
||||
state-toggle@^1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe"
|
||||
|
||||
Reference in New Issue
Block a user