Compare commits
4 Commits
17fe5cecf0
...
168e3da23c
| Author | SHA1 | Date | |
|---|---|---|---|
| 168e3da23c | |||
| 6b93061e87 | |||
| 0a8d9ee4e8 | |||
| 9ef4311586 |
@ -15,7 +15,7 @@ A real-time karaoke application designed for in-home party use with multi-user s
|
||||
- **Artist Browsing** - Browse songs by artist with modal views
|
||||
- **Song Lists** - Predefined song collections with availability matching
|
||||
- **Top Played** - Popular songs based on play history
|
||||
- **New Songs** - Recently added songs to the catalog (see PRD for implementation details)
|
||||
- **New Songs** - Recently added songs to the catalog (see PRD for implementation details) (see PRD for implementation details) (see PRD for implementation details)
|
||||
|
||||
### **Admin Features**
|
||||
- **Queue Control** - Reorder and delete queue items
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Invoke-WebRequest -Uri "https://us-central1-firebase-herse.cloudfunctions.net/recalculateTopPlayed" `
|
||||
>> -Method POST `
|
||||
>> -Headers @{"Content-Type"="application/json"} `
|
||||
>> -Body '{"data": {"controllerName": "bsully5150"}}'
|
||||
Invoke-WebRequest -Uri "https://us-central1-firebase-herse.cloudfunctions.net/recalculateTopPlayed" ` -Method POST ` -Headers @{"Content-Type"="application/json"} ` -Body '{"data": {"controllerName": "bsully5150"}}'
|
||||
|
||||
Invoke-WebRequest -Uri "https://us-central1-firebase-herse.cloudfunctions.net/precompileSongListMatches" -Method POST -Headers @{"Content-Type"="application/json"} -Body '{"data": {"controllerName": "mbrucedogs"}}'
|
||||
|
||||
Invoke-WebRequest -Uri "https://us-central1-firebase-herse.cloudfunctions.net/processAllSongListsFullDatasetCallable" -Method POST -Headers @{"Content-Type"="application/json"} -Body '{"data": {"controllerName": "mbrucedogs"}}'
|
||||
@ -6,6 +6,7 @@ import { debugLog } from '../../utils/logger';
|
||||
import { setAuth } from '../../redux/authSlice';
|
||||
import { database } from '../../firebase/config';
|
||||
import { ref, get } from 'firebase/database';
|
||||
import { singerService } from '../../firebase/services';
|
||||
import type { Authentication } from '../../types';
|
||||
|
||||
interface LoginPromptProps {
|
||||
@ -46,6 +47,21 @@ const LoginPrompt: React.FC<LoginPromptProps> = ({ isAdmin, onComplete }) => {
|
||||
};
|
||||
debugLog('Dispatching auth:', auth);
|
||||
dispatch(setAuth(auth));
|
||||
|
||||
// Automatically add singer to the singers list if they don't exist
|
||||
try {
|
||||
await singerService.addSinger(partyId.trim(), singerName.trim());
|
||||
debugLog('Singer automatically added to singers list');
|
||||
} catch (error) {
|
||||
// If singer already exists, that's fine - just log it
|
||||
if (error instanceof Error && error.message === 'Singer already exists') {
|
||||
debugLog('Singer already exists in singers list');
|
||||
} else {
|
||||
console.error('Error adding singer automatically:', error);
|
||||
// Don't block login if singer addition fails
|
||||
}
|
||||
}
|
||||
|
||||
debugLog('Calling onComplete');
|
||||
onComplete();
|
||||
} catch (error) {
|
||||
|
||||
@ -10,7 +10,7 @@ import type { SongItemProps, QueueItem, Song } from '../../types';
|
||||
import { SongItemContext } from '../../types';
|
||||
import { ActionButtonVariant, ActionButtonSize, ActionButtonIconSlot } from '../../types';
|
||||
import { Icons } from '../../constants';
|
||||
import { star } from 'ionicons/icons';
|
||||
import { star, heart } from 'ionicons/icons';
|
||||
|
||||
// Utility function to extract filename from path
|
||||
const extractFilename = (path: string): string => {
|
||||
@ -31,12 +31,14 @@ export const SongInfoDisplay: React.FC<{
|
||||
showCount?: boolean;
|
||||
showFullPath?: boolean;
|
||||
showTopPlayedStar?: boolean;
|
||||
showFavoriteHeart?: boolean;
|
||||
}> = React.memo(({
|
||||
song,
|
||||
showPath = false,
|
||||
showCount = false,
|
||||
showFullPath = false,
|
||||
showTopPlayedStar = false
|
||||
showTopPlayedStar = false,
|
||||
showFavoriteHeart = false
|
||||
}) => {
|
||||
return (
|
||||
<IonLabel>
|
||||
@ -59,6 +61,13 @@ export const SongInfoDisplay: React.FC<{
|
||||
style={{ fontSize: '1rem' }}
|
||||
/>
|
||||
)}
|
||||
{showFavoriteHeart && (
|
||||
<IonIcon
|
||||
icon={heart}
|
||||
color="danger"
|
||||
style={{ fontSize: '1rem' }}
|
||||
/>
|
||||
)}
|
||||
{song.title}
|
||||
</div>
|
||||
<div
|
||||
@ -312,6 +321,7 @@ const SongItem: React.FC<SongItemProps> = React.memo(({
|
||||
showCount={shouldShowCount}
|
||||
showFullPath={showFullPath}
|
||||
showTopPlayedStar={isInTopPlayed}
|
||||
showFavoriteHeart={isInFavorites}
|
||||
/>
|
||||
|
||||
{showActions && (
|
||||
|
||||
@ -34,7 +34,7 @@ const Favorites: React.FC = () => {
|
||||
song={song}
|
||||
context={SongItemContext.FAVORITES}
|
||||
showInfoButton={true}
|
||||
showAddButton={false}
|
||||
showAddButton={true}
|
||||
showDeleteButton={true}
|
||||
onDeleteItem={() => handleToggleFavorite(song)}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user