mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
Combines LightWrite (beat/lyrics editor) and Mukke (iOS music player) into a single web-based music workspace app. Archives the old Mukke mobile app. - Rename: @lightwrite/* → @mukke/*, all branding, configs, Dockerfiles - New DB schemas: songs, playlists, playlist_songs + songId FK on projects - New backend modules: SongModule, PlaylistModule, LibraryModule - New web: app shell with sidebar, library (songs/albums/artists/genres), web player (queue/shuffle/repeat/MediaSession), playlists, search, upload, dashboard, album/artist/genre detail pages - Auth: add forgot-password + reset-password pages, extend auth store - Tests: 40 backend unit tests (song, playlist, library services) - Config: env generation, MinIO bucket, docker-compose prod, cloudflare - Docs: update CLAUDE.md, auth guidelines with SvelteKit checklist Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import Slider from '@react-native-community/slider';
|
|
import { View, Text } from 'react-native';
|
|
|
|
import { useTheme } from '~/utils/themeContext';
|
|
import { formatDuration } from '~/services/audioService';
|
|
|
|
interface ProgressBarProps {
|
|
position: number;
|
|
duration: number;
|
|
onSeek: (position: number) => void;
|
|
}
|
|
|
|
export function ProgressBar({ position, duration, onSeek }: ProgressBarProps) {
|
|
const { colors } = useTheme();
|
|
|
|
return (
|
|
<View style={{ width: '100%', paddingHorizontal: 20 }}>
|
|
<Slider
|
|
value={duration > 0 ? position / duration : 0}
|
|
onSlidingComplete={(value) => onSeek(value * duration)}
|
|
minimumValue={0}
|
|
maximumValue={1}
|
|
minimumTrackTintColor={colors.primary}
|
|
maximumTrackTintColor={colors.backgroundTertiary}
|
|
thumbTintColor={colors.primary}
|
|
/>
|
|
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: -4 }}>
|
|
<Text style={{ fontSize: 12, color: colors.textSecondary }}>
|
|
{formatDuration(position)}
|
|
</Text>
|
|
<Text style={{ fontSize: 12, color: colors.textSecondary }}>
|
|
-{formatDuration(Math.max(0, duration - position))}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|