diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 52b7e90..4cea453 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -5,7 +5,6 @@ volumes:
scoro_logs:
meilisearch:
-
services:
back:
#platform: linux/amd64
@@ -22,7 +21,7 @@ services:
depends_on:
db:
condition: service_healthy
-
+
meilisearch:
condition: service_healthy
env_file:
@@ -93,15 +92,14 @@ services:
- "4567:4567"
meilisearch:
- image: getmeili/meilisearch:v1.4
+ image: getmeili/meilisearch:v1.5
volumes:
- meilisearch:/meili_data
env_file:
- .env
-
+
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 10s
timeout: 10s
retries: 5
-
diff --git a/front/components/Play/PartitionMagic.tsx b/front/components/Play/PartitionMagic.tsx
index 0fb56c0..3661088 100644
--- a/front/components/Play/PartitionMagic.tsx
+++ b/front/components/Play/PartitionMagic.tsx
@@ -35,9 +35,8 @@ const getCursorToPlay = (
return;
}
for (let i = cursorInfos.length - 1; i > currentCurIdx; i--) {
- const cursorInfo = cursorInfos[i]!;
- if (cursorInfo.timestamp <= timestamp) {
- onCursorMove(cursorInfo, i);
+ if (cursorInfos[i]!.timestamp <= timestamp) {
+ onCursorMove(cursorInfos[i]!, i);
}
}
};
@@ -186,7 +185,7 @@ const PartitionMagic = ({
}, [data?.cursors, melodySound.current?._loaded]);
React.useEffect(() => {
- if (!shouldPlay && playType != 'practice') return;
+ if (!shouldPlay) return;
if (!piano.current || !isPianoLoaded) return;
if (!data || data?.cursors.length === 0) return;
getCursorToPlay(
@@ -194,6 +193,8 @@ const PartitionMagic = ({
currentCurIdx.current,
timestamp + transitionDuration,
(cursor, idx) => {
+ console.log(data.cursors)
+ console.log("b ", timestamp, cursor, currentCurIdx.current)
currentCurIdx.current = idx;
partitionOffset.value = withTiming(
-(cursor.x - data!.cursors[0]!.x) / partitionDims[0],
@@ -202,7 +203,7 @@ const PartitionMagic = ({
easing: Easing.inOut(Easing.ease),
}
);
- if (playType == 'practice') return;
+ if (playType === 'practice') return;
cursor.notes.forEach((note) => {
piano.current?.start({
note: note.note,
diff --git a/front/components/ScoreModal.tsx b/front/components/ScoreModal.tsx
index fc15e0a..b202d99 100644
--- a/front/components/ScoreModal.tsx
+++ b/front/components/ScoreModal.tsx
@@ -46,7 +46,7 @@ const ScoreModal = (props: ScoreModalProps) => {
/>
))}
- {Math.max(score, 0)}%
+ {Math.max(score, 0).toFixed(2)}%
{props.precision}%
diff --git a/front/views/PlayView.tsx b/front/views/PlayView.tsx
index 18d8eed..6f08cea 100644
--- a/front/views/PlayView.tsx
+++ b/front/views/PlayView.tsx
@@ -336,7 +336,10 @@ const PlayView = ({ songId }: PlayViewProps) => {
style={{}}
type="outlined"
title={translate('practiceBtn')}
- onPress={async () => setPlayType('practice')}
+ onPress={async () => {
+ setPlayType('practice');
+ setShouldPlay(true);
+ }}
/>