init branch

This commit is contained in:
Clément Le Bihan
2023-11-24 00:23:36 +01:00
parent 9133a369d5
commit ecac53516e
8 changed files with 36 additions and 17 deletions

View File

@@ -0,0 +1,16 @@
FROM ubuntu:22.04 as buildandroid
# Install dependencies (yarn, nodejs, git, etc.)
RUN apt-get update && apt-get install -y \
curl \
git \
gnupg \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN npm install -g expo-cli
RUN eas login --non-interactive --username $EAS_USERNAME --password $EAS_PASSWORD
RUN eas:configure -p android

View File

@@ -17,6 +17,7 @@ const CardGridCustom = <T extends Record<string, unknown>>(props: CardGridCustom
<VStack space={5}>
{heading && <Heading>{heading}</Heading>}
<FlatGrid
nestedScrollEnabled
maxItemsPerRow={maxItemsPerRow}
additionalRowStyle={style ?? { justifyContent: 'flex-start' }}
data={content}

View File

@@ -15,6 +15,7 @@ const SongCardGrid = (props: SongCardGrid) => {
<VStack space={5}>
<Heading>{props.heading}</Heading>
<FlatGrid
nestedScrollEnabled
maxItemsPerRow={props.maxItemsPerRow}
additionalRowStyle={props.style ?? { justifyContent: 'flex-start' }}
data={props.songs}

View File

@@ -195,6 +195,7 @@ function MusicListComponent({
// FlatList: Renders list efficiently, only rendering visible items.
return (
<FlatList
nestedScrollEnabled
style={styles.container}
ListHeaderComponent={headerComponent}
data={musicListState.displayedMusics}

View File

@@ -65,7 +65,7 @@ const ScaffoldAuth: FunctionComponent<ScaffoldAuthProps> = ({
<Wrap space={4} direction="row" style={{ padding: 16, paddingBottom: 0 }}>
<Row space={2} flex={1}>
<Image
source={{ uri: logo }}
// source={{ uri: logo }}
style={{
aspectRatio: 1,
width: 32,

View File

@@ -164,7 +164,7 @@ const styles = StyleSheet.create({
flex: 1,
paddingHorizontal: 12 + 20 + 12,
paddingVertical: 12,
outlineStyle: 'none',
// outlineStyle: 'none',
},
iconContainerLeft: {
position: 'absolute',
@@ -173,7 +173,7 @@ const styles = StyleSheet.create({
},
iconContainerRight: {
position: 'absolute',
outlineStyle: 'none',
// outlineStyle: 'none',
right: 12,
zIndex: 1,
},

View File

@@ -8,8 +8,8 @@
"distribution": "internal"
},
"env": {
"EXPO_PUBLIC_API_URL": "https://chroma.octohub.app/api",
"EXPO_PUBLIC_SCORO_URL": "wss://chroma.octohub.app/ws"
"EXPO_PUBLIC_API_URL": "https://nightly.chroma.octohub.app/api",
"EXPO_PUBLIC_SCORO_URL": "wss://nightly.chroma.octohub.app/ws"
}
},
"production": {
@@ -20,8 +20,8 @@
"distribution": "internal"
},
"env": {
"EXPO_PUBLIC_API_URL": "https://chroma.octohub.app/api",
"EXPO_PUBLIC_SCORO_URL": "wss://chroma.octohub.app/ws"
"EXPO_PUBLIC_API_URL": "https://nightly.chroma.octohub.app/api",
"EXPO_PUBLIC_SCORO_URL": "wss://nightly.chroma.octohub.app/ws"
}
}
}

View File

@@ -23,7 +23,7 @@ import { RootState } from '../state/Store';
import { Translate, translate } from '../i18n/i18n';
import { ColorSchemeType } from 'native-base/lib/typescript/components/types';
import { useStopwatch } from 'react-use-precision-timer';
import { MIDIAccess, MIDIMessageEvent, requestMIDIAccess } from '@arthi-chaud/react-native-midi';
// import { MIDIAccess, MIDIMessageEvent, requestMIDIAccess } from '@arthi-chaud/react-native-midi';
import * as Linking from 'expo-linking';
import url from 'url';
import { PianoCanvasContext } from '../models/PianoGame';
@@ -62,14 +62,14 @@ if (process.env.NODE_ENV != 'development' && Platform.OS === 'web') {
});
}
function parseMidiMessage(message: MIDIMessageEvent) {
return {
command: message.data.at(0)! >> 4,
channel: message.data.at(0)! & 0xf,
note: message.data.at(1)!,
velocity: message.data.at(2)! / 127,
};
}
// function parseMidiMessage(message: MIDIMessageEvent) {
// return {
// command: message.data.at(0)! >> 4,
// channel: message.data.at(0)! & 0xf,
// note: message.data.at(1)!,
// velocity: message.data.at(2)! / 127,
// };
// }
//create a context with an array of number
export const PianoCC = createContext<PianoCanvasContext>({
@@ -300,7 +300,7 @@ const PlayView = ({ songId, route }: RouteProps<PlayViewProps>) => {
return;
}
if (song.data && !webSocket.current && partitionRendered) {
requestMIDIAccess().then(onMIDISuccess).catch(onMIDIFailure);
// requestMIDIAccess().then(onMIDISuccess).catch(onMIDIFailure);
}
}, [song.data, partitionRendered]);