mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +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>
77 lines
2.2 KiB
TypeScript
77 lines
2.2 KiB
TypeScript
import { Ionicons } from '@expo/vector-icons';
|
|
import { View, Text, FlatList } from 'react-native';
|
|
|
|
import { Artwork } from '~/components/Artwork';
|
|
import { ListItem } from '~/components/ListItem';
|
|
import { usePlayerStore } from '~/stores/playerStore';
|
|
import { formatDuration } from '~/services/audioService';
|
|
import { useTheme } from '~/utils/themeContext';
|
|
|
|
export default function QueueScreen() {
|
|
const { colors } = useTheme();
|
|
const queue = usePlayerStore((s) => s.getQueue());
|
|
const currentSong = usePlayerStore((s) => s.currentSong);
|
|
const playSong = usePlayerStore((s) => s.playSong);
|
|
|
|
const currentIndex = queue.findIndex((s) => s.id === currentSong?.id);
|
|
|
|
return (
|
|
<View style={{ flex: 1, backgroundColor: colors.background }}>
|
|
{currentSong && (
|
|
<View style={{ padding: 16, borderBottomWidth: 0.5, borderBottomColor: colors.border }}>
|
|
<Text
|
|
style={{
|
|
fontSize: 13,
|
|
color: colors.textSecondary,
|
|
fontWeight: '600',
|
|
marginBottom: 8,
|
|
}}
|
|
>
|
|
AKTUELLER SONG
|
|
</Text>
|
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
<Artwork uri={currentSong.coverArtPath} size={48} />
|
|
<View style={{ flex: 1, marginLeft: 12 }}>
|
|
<Text
|
|
style={{ fontSize: 16, fontWeight: '600', color: colors.primary }}
|
|
numberOfLines={1}
|
|
>
|
|
{currentSong.title}
|
|
</Text>
|
|
<Text style={{ fontSize: 14, color: colors.textSecondary }} numberOfLines={1}>
|
|
{currentSong.artist || 'Unbekannt'}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
)}
|
|
|
|
<Text
|
|
style={{
|
|
fontSize: 13,
|
|
color: colors.textSecondary,
|
|
fontWeight: '600',
|
|
padding: 16,
|
|
paddingBottom: 8,
|
|
}}
|
|
>
|
|
ALS NÄCHSTES
|
|
</Text>
|
|
|
|
<FlatList
|
|
data={queue.slice(currentIndex + 1)}
|
|
keyExtractor={(item, index) => `${item.id}-${index}`}
|
|
contentContainerStyle={{ paddingBottom: 40 }}
|
|
renderItem={({ item, index }) => (
|
|
<ListItem
|
|
title={item.title}
|
|
subtitle={item.artist || 'Unbekannt'}
|
|
trailing={formatDuration(item.duration)}
|
|
left={<Artwork uri={item.coverArtPath} size={40} />}
|
|
onPress={() => playSong(item, queue, currentIndex + 1 + index)}
|
|
/>
|
|
)}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|