Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42735005b1 | ||
|
|
22606e7f79 | ||
|
|
a9d3331044 | ||
|
|
08e3e8f46d | ||
|
|
5c45ac845d | ||
|
|
3bb59d6021 | ||
|
|
aaed0f3548 | ||
|
|
dbbedf9ab3 | ||
|
|
ea98a547c1 | ||
|
|
091e940013 | ||
|
|
493a969ca8 |
No files matched your search
@@ -10,3 +10,4 @@ ios/App/Pods/
|
|||||||
ios/App/DerivedData/
|
ios/App/DerivedData/
|
||||||
ios/App/*.xcworkspace/xcuserdata/
|
ios/App/*.xcworkspace/xcuserdata/
|
||||||
ios/App/*.xcodeproj/xcuserdata/
|
ios/App/*.xcodeproj/xcuserdata/
|
||||||
|
bug_image/*
|
||||||
@@ -30,7 +30,7 @@ Open the local web address shown by Vite. Choose a dance template or add a sound
|
|||||||
|
|
||||||
## Mobile downloads
|
## Mobile downloads
|
||||||
|
|
||||||
- [Android / e/OS debug APK](downloads/BeatHound-Android-eOS-1.0.0-debug.apk) — installable on Android API 24 or newer. The same APK is intended for compatible e/OS 4+ devices.
|
- [Android / e/OS debug APK 1.0.1](downloads/BeatHound-Android-eOS-1.0.1-debug.apk) — installable on Android API 24 or newer. The same APK is intended for compatible e/OS 4+ devices.
|
||||||
|
|
||||||
The Android file is a debug-signed build for testing. It is not a Google Play release package. No iOS app or download is currently supported because of financial constraints.
|
The Android file is a debug-signed build for testing. It is not a Google Play release package. No iOS app or download is currently supported because of financial constraints.
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ The mobile prototype uses Capacitor for Android.
|
|||||||
npm run android:debug
|
npm run android:debug
|
||||||
```
|
```
|
||||||
|
|
||||||
The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-1.0.0-debug.apk`. iOS is currently unsupported for financial reasons; see the [native build guide](docs/native-builds.md).
|
The Android build needs JDK 21 and Android SDK Platform 36 / Build Tools 36.0.0. It writes the Gradle output and copies the APK to `downloads/BeatHound-Android-eOS-1.0.1-debug.apk`. iOS is currently unsupported for financial reasons; see the [native build guide](docs/native-builds.md).
|
||||||
|
|
||||||
## Project checks
|
## Project checks
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ android {
|
|||||||
applicationId "com.ninosaurier.beathound"
|
applicationId "com.ninosaurier.beathound"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 2
|
||||||
versionName "1.0.0"
|
versionName "1.0.1"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"docs:build": "vitepress build docs",
|
"docs:build": "vitepress build docs",
|
||||||
"docs:preview": "vitepress preview docs --host 0.0.0.0",
|
"docs:preview": "vitepress preview docs --host 0.0.0.0",
|
||||||
"cap:sync": "npm run build:mobile && cap sync",
|
"cap:sync": "npm run build:mobile && cap sync",
|
||||||
"android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-1.0.0-debug.apk",
|
"android:debug": "npm run build:mobile && cap sync android && cd android && ./gradlew assembleDebug && cd .. && mkdir -p downloads && cp android/app/build/outputs/apk/debug/app-debug.apk downloads/BeatHound-Android-eOS-1.0.1-debug.apk",
|
||||||
"ios:sync": "npm run build:mobile && cap sync ios",
|
"ios:sync": "npm run build:mobile && cap sync ios",
|
||||||
"ios:open": "cap open ios",
|
"ios:open": "cap open ios",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { useRef } from 'react';
|
|
||||||
import { IonButton, IonIcon, IonPopover } from '@ionic/react';
|
import { IonButton, IonIcon, IonPopover } from '@ionic/react';
|
||||||
import { ellipsisVertical } from 'ionicons/icons';
|
import { ellipsisVertical } from 'ionicons/icons';
|
||||||
import { usePopoverDisclosure } from '../hooks/usePopoverDisclosure';
|
import { usePopoverDisclosure } from '../hooks/usePopoverDisclosure';
|
||||||
@@ -10,11 +9,10 @@ interface AppHeaderProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
||||||
const popoverRef = useRef<HTMLIonPopoverElement>(null);
|
|
||||||
const popover = usePopoverDisclosure();
|
const popover = usePopoverDisclosure();
|
||||||
|
|
||||||
function selectView(view: AppView): void {
|
function selectView(view: AppView): void {
|
||||||
void popoverRef.current?.dismiss();
|
popover.close();
|
||||||
onNavigate(view);
|
onNavigate(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,9 +36,9 @@ export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
|||||||
|
|
||||||
<div className="app-header-actions">
|
<div className="app-header-actions">
|
||||||
<IonButton
|
<IonButton
|
||||||
id="app-menu-trigger"
|
|
||||||
className="app-menu-trigger"
|
className="app-menu-trigger"
|
||||||
fill="clear"
|
fill="clear"
|
||||||
|
onClick={(event) => popover.open(event.nativeEvent)}
|
||||||
aria-label="Open app menu"
|
aria-label="Open app menu"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={popover.isOpen}
|
aria-expanded={popover.isOpen}
|
||||||
@@ -51,12 +49,11 @@ export function AppHeader({ activeView, onNavigate }: AppHeaderProps) {
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="app-menu-popover"
|
className="app-menu-popover"
|
||||||
ref={popoverRef}
|
isOpen={popover.isOpen}
|
||||||
trigger="app-menu-trigger"
|
event={popover.event}
|
||||||
triggerAction="click"
|
reference="event"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="end"
|
alignment="end"
|
||||||
onDidPresent={popover.onDidPresent}
|
|
||||||
onDidDismiss={popover.onDidDismiss}
|
onDidDismiss={popover.onDidDismiss}
|
||||||
>
|
>
|
||||||
<nav className="app-menu-options" aria-label="App navigation">
|
<nav className="app-menu-options" aria-label="App navigation">
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export const BeatTemplateSelector = memo(function BeatTemplateSelector({
|
|||||||
const selectedTemplate = BEAT_TEMPLATES.find((template) => template.id === selectedTemplateId);
|
const selectedTemplate = BEAT_TEMPLATES.find((template) => template.id === selectedTemplateId);
|
||||||
|
|
||||||
function selectTemplate(template: BeatTemplate): void {
|
function selectTemplate(template: BeatTemplate): void {
|
||||||
|
popover.close();
|
||||||
setSelectedTemplateId(template.id);
|
setSelectedTemplateId(template.id);
|
||||||
onSelectTemplate(template);
|
onSelectTemplate(template);
|
||||||
}
|
}
|
||||||
@@ -24,9 +25,9 @@ export const BeatTemplateSelector = memo(function BeatTemplateSelector({
|
|||||||
return (
|
return (
|
||||||
<div className="beat-template-selector">
|
<div className="beat-template-selector">
|
||||||
<IonButton
|
<IonButton
|
||||||
id="beat-template-trigger"
|
|
||||||
className="beat-template-trigger"
|
className="beat-template-trigger"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
|
onClick={(event) => popover.open(event.nativeEvent)}
|
||||||
aria-label={`Dance template: ${selectedTemplate?.label ?? 'Select a template'}`}
|
aria-label={`Dance template: ${selectedTemplate?.label ?? 'Select a template'}`}
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={popover.isOpen}
|
aria-expanded={popover.isOpen}
|
||||||
@@ -39,12 +40,12 @@ export const BeatTemplateSelector = memo(function BeatTemplateSelector({
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="beat-template-popover"
|
className="beat-template-popover"
|
||||||
trigger="beat-template-trigger"
|
isOpen={popover.isOpen}
|
||||||
triggerAction="click"
|
event={popover.event}
|
||||||
|
reference="event"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="center"
|
alignment="center"
|
||||||
dismissOnSelect
|
dismissOnSelect
|
||||||
onDidPresent={popover.onDidPresent}
|
|
||||||
onDidDismiss={popover.onDidDismiss}
|
onDidDismiss={popover.onDidDismiss}
|
||||||
>
|
>
|
||||||
<div className="beat-template-options" role="group" aria-label="Dance templates">
|
<div className="beat-template-options" role="group" aria-label="Dance templates">
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorPro
|
|||||||
className="instrument-picker-modal"
|
className="instrument-picker-modal"
|
||||||
isOpen={isPickerOpen}
|
isOpen={isPickerOpen}
|
||||||
breakpoints={PICKER_SHEET_BREAKPOINTS}
|
breakpoints={PICKER_SHEET_BREAKPOINTS}
|
||||||
initialBreakpoint={0.82}
|
initialBreakpoint={1}
|
||||||
expandToScroll={false}
|
expandToScroll={false}
|
||||||
handle
|
handle
|
||||||
onDidDismiss={handlePickerDidDismiss}
|
onDidDismiss={handlePickerDidDismiss}
|
||||||
@@ -129,7 +129,6 @@ export function InstrumentSelector({ onSelectInstrument }: InstrumentSelectorPro
|
|||||||
value={searchQuery}
|
value={searchQuery}
|
||||||
debounce={0}
|
debounce={0}
|
||||||
showClearButton="always"
|
showClearButton="always"
|
||||||
onIonFocus={() => void modalRef.current?.setCurrentBreakpoint(1)}
|
|
||||||
onIonInput={(event) => handleSearchInput(event.detail.value)}
|
onIonInput={(event) => handleSearchInput(event.detail.value)}
|
||||||
onIonClear={() => handleSearchInput('')}
|
onIonClear={() => handleSearchInput('')}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonButton
|
<IonButton
|
||||||
id="sound-ring-selector-trigger"
|
|
||||||
className="sound-ring-selector-trigger"
|
className="sound-ring-selector-trigger"
|
||||||
fill="clear"
|
fill="clear"
|
||||||
disabled={soundIds.length === 0}
|
disabled={soundIds.length === 0}
|
||||||
|
onClick={(event) => popover.open(event.nativeEvent)}
|
||||||
aria-label={focusedSound ? `Selected ring: ${focusedSound.label}` : 'Select a sound ring'}
|
aria-label={focusedSound ? `Selected ring: ${focusedSound.label}` : 'Select a sound ring'}
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={popover.isOpen}
|
aria-expanded={popover.isOpen}
|
||||||
@@ -46,12 +46,12 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="sound-ring-popover"
|
className="sound-ring-popover"
|
||||||
trigger="sound-ring-selector-trigger"
|
isOpen={popover.isOpen}
|
||||||
triggerAction="click"
|
event={popover.event}
|
||||||
|
reference="event"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="end"
|
alignment="end"
|
||||||
dismissOnSelect
|
dismissOnSelect
|
||||||
onDidPresent={popover.onDidPresent}
|
|
||||||
onDidDismiss={popover.onDidDismiss}
|
onDidDismiss={popover.onDidDismiss}
|
||||||
>
|
>
|
||||||
<div className="sound-ring-options" role="group" aria-label="Sound rings">
|
<div className="sound-ring-options" role="group" aria-label="Sound rings">
|
||||||
@@ -63,7 +63,10 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
|||||||
className="sound-ring-option"
|
className="sound-ring-option"
|
||||||
fill={selected ? 'solid' : 'clear'}
|
fill={selected ? 'solid' : 'clear'}
|
||||||
aria-pressed={selected}
|
aria-pressed={selected}
|
||||||
onClick={() => onSelectSound(soundId)}
|
onClick={() => {
|
||||||
|
popover.close();
|
||||||
|
onSelectSound(soundId);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="sound-ring-option-content">
|
<span className="sound-ring-option-content">
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -16,15 +16,15 @@ const TEMPO_THUMB_SIZE = 18;
|
|||||||
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
||||||
const popover = usePopoverDisclosure();
|
const popover = usePopoverDisclosure();
|
||||||
const tempoProgress = ((tempoBpm - MIN_TEMPO_BPM) / (MAX_TEMPO_BPM - MIN_TEMPO_BPM)) * 100;
|
const tempoProgress = ((tempoBpm - MIN_TEMPO_BPM) / (MAX_TEMPO_BPM - MIN_TEMPO_BPM)) * 100;
|
||||||
const tempoThumbCenter = (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE) / 2
|
const tempoThumbCenter = TEMPO_THUMB_SIZE / 2
|
||||||
+ ((100 - tempoProgress) / 100) * (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE);
|
+ ((100 - tempoProgress) / 100) * (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonButton
|
<IonButton
|
||||||
id="main-tempo-control-trigger"
|
|
||||||
className="tempo-trigger"
|
className="tempo-trigger"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
|
onClick={(event) => popover.open(event.nativeEvent)}
|
||||||
aria-label={`Change tempo, currently ${tempoBpm} BPM`}
|
aria-label={`Change tempo, currently ${tempoBpm} BPM`}
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={popover.isOpen}
|
aria-expanded={popover.isOpen}
|
||||||
@@ -37,11 +37,11 @@ export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="tempo-popover"
|
className="tempo-popover"
|
||||||
trigger="main-tempo-control-trigger"
|
isOpen={popover.isOpen}
|
||||||
triggerAction="click"
|
event={popover.event}
|
||||||
|
reference="event"
|
||||||
side="top"
|
side="top"
|
||||||
alignment="start"
|
alignment="start"
|
||||||
onDidPresent={popover.onDidPresent}
|
|
||||||
onDidDismiss={popover.onDidDismiss}
|
onDidDismiss={popover.onDidDismiss}
|
||||||
>
|
>
|
||||||
<div className="tempo-popover-content">
|
<div className="tempo-popover-content">
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ export const TimeSignatureSelector = memo(function TimeSignatureSelector({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonButton
|
<IonButton
|
||||||
id="time-signature-trigger"
|
|
||||||
className="meter-trigger"
|
className="meter-trigger"
|
||||||
fill="solid"
|
fill="solid"
|
||||||
|
onClick={(event) => popover.open(event.nativeEvent)}
|
||||||
aria-label={`Change time signature, currently ${beatsPerBar}/4`}
|
aria-label={`Change time signature, currently ${beatsPerBar}/4`}
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={popover.isOpen}
|
aria-expanded={popover.isOpen}
|
||||||
@@ -34,12 +34,12 @@ export const TimeSignatureSelector = memo(function TimeSignatureSelector({
|
|||||||
|
|
||||||
<IonPopover
|
<IonPopover
|
||||||
className="meter-popover"
|
className="meter-popover"
|
||||||
trigger="time-signature-trigger"
|
isOpen={popover.isOpen}
|
||||||
triggerAction="click"
|
event={popover.event}
|
||||||
|
reference="event"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
alignment="start"
|
alignment="start"
|
||||||
dismissOnSelect
|
dismissOnSelect
|
||||||
onDidPresent={popover.onDidPresent}
|
|
||||||
onDidDismiss={popover.onDidDismiss}
|
onDidDismiss={popover.onDidDismiss}
|
||||||
>
|
>
|
||||||
<div className="meter-popover-content" role="group" aria-label="Time signature">
|
<div className="meter-popover-content" role="group" aria-label="Time signature">
|
||||||
@@ -49,7 +49,10 @@ export const TimeSignatureSelector = memo(function TimeSignatureSelector({
|
|||||||
className="meter-option"
|
className="meter-option"
|
||||||
fill={option === beatsPerBar ? 'solid' : 'clear'}
|
fill={option === beatsPerBar ? 'solid' : 'clear'}
|
||||||
aria-pressed={option === beatsPerBar}
|
aria-pressed={option === beatsPerBar}
|
||||||
onClick={() => onChange(option)}
|
onClick={() => {
|
||||||
|
popover.close();
|
||||||
|
onChange(option);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span className="meter-option-content">{option}/4</span>
|
<span className="meter-option-content">{option}/4</span>
|
||||||
</IonButton>
|
</IonButton>
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
export interface PopoverDisclosure {
|
export interface PopoverDisclosure {
|
||||||
|
event: MouseEvent | undefined;
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onDidPresent: () => void;
|
open: (event: MouseEvent) => void;
|
||||||
|
close: () => void;
|
||||||
onDidDismiss: () => void;
|
onDidDismiss: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function usePopoverDisclosure(): PopoverDisclosure {
|
export function usePopoverDisclosure(): PopoverDisclosure {
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
const [event, setEvent] = useState<MouseEvent>();
|
||||||
|
|
||||||
const onDidPresent = useCallback(() => setIsOpen(true), []);
|
const open = useCallback((popoverEvent: MouseEvent) => {
|
||||||
const onDidDismiss = useCallback(() => setIsOpen(false), []);
|
setEvent(popoverEvent);
|
||||||
|
setIsOpen(true);
|
||||||
|
}, []);
|
||||||
|
const close = useCallback(() => {
|
||||||
|
setIsOpen(false);
|
||||||
|
setEvent(undefined);
|
||||||
|
}, []);
|
||||||
|
|
||||||
return { isOpen, onDidPresent, onDidDismiss };
|
return { event, isOpen, open, close, onDidDismiss: close };
|
||||||
}
|
}
|
||||||
+2
-3
@@ -874,9 +874,8 @@ ion-content.app-content-studio {
|
|||||||
|
|
||||||
ion-modal.instrument-picker-modal {
|
ion-modal.instrument-picker-modal {
|
||||||
--width: min(420px, calc(100vw - 24px));
|
--width: min(420px, calc(100vw - 24px));
|
||||||
--height: min(88vh, 620px);
|
--height: min(620px, calc(100% - (var(--ion-modal-offset-top, 0px) + 10px)));
|
||||||
--max-height: calc(100vh - 12px);
|
--max-height: calc(100% - (var(--ion-modal-offset-top, 0px) + 10px));
|
||||||
--max-height: calc(100dvh - 12px);
|
|
||||||
--background: var(--surface);
|
--background: var(--surface);
|
||||||
--border-radius: 18px 18px 0 0;
|
--border-radius: 18px 18px 0 0;
|
||||||
--box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.45);
|
--box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.45);
|
||||||
|
|||||||
Reference in new issue
Block a user