mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:21:10 +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>
70 lines
1.8 KiB
TypeScript
70 lines
1.8 KiB
TypeScript
import { Ionicons } from '@expo/vector-icons';
|
|
import { Stack, useRouter } from 'expo-router';
|
|
import { useEffect } from 'react';
|
|
import { FlatList, Pressable, View, Text } from 'react-native';
|
|
|
|
import { EmptyState } from '~/components/EmptyState';
|
|
import { ListItem } from '~/components/ListItem';
|
|
import { usePlaylistStore } from '~/stores/playlistStore';
|
|
import { useTheme } from '~/utils/themeContext';
|
|
|
|
export default function PlaylistsScreen() {
|
|
const { colors } = useTheme();
|
|
const router = useRouter();
|
|
const { playlists, loadPlaylists } = usePlaylistStore();
|
|
|
|
useEffect(() => {
|
|
loadPlaylists();
|
|
}, []);
|
|
|
|
return (
|
|
<View style={{ flex: 1 }}>
|
|
<Stack.Screen
|
|
options={{
|
|
title: 'Playlists',
|
|
headerRight: () => (
|
|
<Pressable onPress={() => router.push('/playlist/new')} style={{ padding: 8 }}>
|
|
<Ionicons name="add" size={28} color={colors.primary} />
|
|
</Pressable>
|
|
),
|
|
}}
|
|
/>
|
|
|
|
{playlists.length === 0 ? (
|
|
<EmptyState
|
|
icon="list-outline"
|
|
title="Keine Playlists"
|
|
message="Erstelle eine Playlist über den + Button."
|
|
/>
|
|
) : (
|
|
<FlatList
|
|
data={playlists}
|
|
keyExtractor={(item) => item.id}
|
|
contentContainerStyle={{ paddingBottom: 100 }}
|
|
renderItem={({ item }) => (
|
|
<ListItem
|
|
title={item.name}
|
|
subtitle={item.description || undefined}
|
|
left={
|
|
<View
|
|
style={{
|
|
width: 48,
|
|
height: 48,
|
|
borderRadius: 8,
|
|
backgroundColor: colors.primary + '20',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
}}
|
|
>
|
|
<Ionicons name="musical-notes" size={24} color={colors.primary} />
|
|
</View>
|
|
}
|
|
onPress={() => router.push(`/playlist/${item.id}`)}
|
|
showChevron
|
|
/>
|
|
)}
|
|
/>
|
|
)}
|
|
</View>
|
|
);
|
|
}
|