Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ WORKDIR /app
# Install pnpm
RUN npm install -g pnpm

# better-sqlite3 may fall back to a native node-gyp rebuild on Alpine.
# Keep the build toolchain available so the runtime install/rebuild is
# deterministic when a prebuilt binary is unavailable.
RUN apk add --no-cache python3 make g++

# Copy package files
COPY package.json pnpm-lock.yaml ./

Expand Down
4 changes: 1 addition & 3 deletions src/components/ParticipantItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,7 @@ export function ParticipantItem({
<button
onClick={() => {
setShowMenu(false);
if (confirm('Remove this participant from the queue?')) {
actions.removeFromQueue({ id: participant.id });
}
actions.removeFromQueue({ id: participant.id });
}}
style={{
width: '100%',
Expand Down
14 changes: 6 additions & 8 deletions src/components/QueueManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,12 @@ function SortableItem({
transform: CSS.Transform.toString(transform),
transition,
opacity: isDragging ? 0.5 : 1,
cursor: isDragging ? 'grabbing' : 'grab',
};

return (
<div
ref={setNodeRef}
style={style}
{...attributes}
{...listeners}
>
<div
style={{
Expand Down Expand Up @@ -196,11 +193,14 @@ function SortableItem({
<div style={{ display: 'flex', alignItems: 'flex-start', gap: '8px', flex: 1 }}>
<div style={{
padding: '4px',
cursor: 'grab',
cursor: isDragging ? 'grabbing' : 'grab',
color: '#999',
display: 'flex',
alignItems: 'center'
}}>
}}
{...attributes}
{...listeners}
>
<IconGripVertical size={20} />
</div>
<div style={{ flex: 1, minWidth: 0 }}>
Expand Down Expand Up @@ -470,9 +470,7 @@ export function QueueManager({
};

const handleDelete = (id: string) => {
if (confirm('Remove this participant from the queue?')) {
actions.removeFromQueue({ id });
}
actions.removeFromQueue({ id });
};

const handleStartEdit = (participant: Participant) => {
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,15 @@ async function createResources(app: ModuleAPI) {
return {};
},

addManualParticipant: async (args: { name: string; description?: string; socialLinks: SocialLink[]; addToQueue?: boolean }) => {
addManualParticipant: async (args: { name: string; description?: string; notes?: string; socialLinks: SocialLink[]; addToQueue?: boolean }) => {
// Enforce 3-link maximum (take first 3 if more provided)
const validatedSocialLinks = args.socialLinks.slice(0, 3);

const newParticipant: Participant = {
id: `participant-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
name: args.name,
description: args.description,
notes: args.notes,
socialLinks: validatedSocialLinks,
order: 0,
source: 'manual',
Expand Down
39 changes: 29 additions & 10 deletions src/pages/BackstagePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export function BackstagePage({
const [syncStatus, setSyncStatus] = useState<string | null>(null);
const [manualName, setManualName] = useState('');
const [manualDescription, setManualDescription] = useState('');
const [manualNotes, setManualNotes] = useState('');
const [manualLinks, setManualLinks] = useState<any[]>([]);

// Auto-refresh effect
Expand Down Expand Up @@ -96,13 +97,15 @@ export function BackstagePage({
await actions.addManualParticipant({
name: manualName.trim(),
description: manualDescription.trim() || undefined,
notes: manualNotes.trim() || undefined,
socialLinks: manualLinks,
addToQueue: false, // Don't add to queue automatically - must be done manually
});

// Clear form
setManualName('');
setManualDescription('');
setManualNotes('');
setManualLinks([]);
};

Expand Down Expand Up @@ -186,16 +189,11 @@ export function BackstagePage({
No participants in queue yet. Add people from the "All Signed Up" section below.
</div>
) : (
queuedParticipants.map((participant, index) => (
<ParticipantItem
key={participant.id}
participant={participant}
index={index}
currentPerformerId={currentPerformerId}
isInQueue={true}
actions={actions}
/>
))
<QueueManager
participants={queuedParticipants}
currentPerformerId={currentPerformerId}
actions={actions}
/>
)}
</div>

Expand Down Expand Up @@ -401,6 +399,27 @@ export function BackstagePage({
}}
/>
</div>
<div>
<label style={{ display: 'block', marginBottom: '4px', fontSize: '14px', fontWeight: 'bold' }}>
Backstage Notes (Internal Only)
</label>
<textarea
value={manualNotes}
onChange={(e) => setManualNotes(e.target.value)}
placeholder="Notes for backstage use only..."
rows={3}
style={{
width: '100%',
padding: '8px',
border: '1px solid #ccc',
borderRadius: '4px',
fontSize: '14px',
resize: 'vertical',
fontFamily: 'inherit',
backgroundColor: '#fffbf0'
}}
/>
</div>
<div>
<label style={{ display: 'block', marginBottom: '4px', fontSize: '14px', fontWeight: 'bold' }}>
Social Links
Expand Down
66 changes: 66 additions & 0 deletions src/pages/DisplayPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useNavigate } from 'react-router';
import { Participant } from '../types';
import { BackgroundLayout } from '../components/BackgroundLayout';
import { QRCodeDisplay } from '../components/QRCodeDisplay';
import { buildSocialUrl, getPlatformIcon } from '../utils/socialLinks';
import {
colors,
getTypographyStyle,
Expand All @@ -30,6 +31,12 @@ type DisplayPageProps = {
export function DisplayPage({ participants, currentPerformerId }: DisplayPageProps) {
const navigate = useNavigate();
const currentPerformer = participants.find(p => p.id === currentPerformerId);
const socialLinks = currentPerformer
? [...currentPerformer.socialLinks]
.filter(link => link.url.trim().length > 0)
.sort((a, b) => a.order - b.order)
.slice(0, 3)
: [];

// Generate QR code URL for performer profile
const getPerformerQRUrl = (performer: Participant): string => {
Expand Down Expand Up @@ -143,6 +150,65 @@ export function DisplayPage({ participants, currentPerformerId }: DisplayPagePro
{currentPerformer.name}
</div>

{/* Social links (if provided) */}
{socialLinks.length > 0 && (
<div
style={{
display: 'flex',
flexWrap: 'wrap',
gap: `${spacing.sm}px`,
alignItems: 'center',
}}
>
{socialLinks.map((link) => {
const Icon = getPlatformIcon(link.type);
const url = buildSocialUrl(link.url, link.type);

return (
<a
key={link.id}
href={url}
target="_blank"
rel="noopener noreferrer"
style={{
...getTypographyStyle('socialHandle', 'kiosk'),
display: 'flex',
alignItems: 'center',
gap: `${spacing.xs}px`,
maxWidth: '420px',
padding: '10px 16px',
color: colors.whiteNoise,
backgroundColor: 'rgba(255, 255, 255, 0.18)',
border: '1px solid rgba(255, 255, 255, 0.34)',
borderRadius: '999px',
textDecoration: 'none',
overflow: 'hidden',
}}
>
<span
style={{
display: 'flex',
alignItems: 'center',
flexShrink: 0,
}}
>
<Icon size={34} />
</span>
<span
style={{
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}
>
{link.url}
</span>
</a>
);
})}
</div>
)}

{/* Description (if exists) */}
{currentPerformer.description && (
<div
Expand Down
2 changes: 2 additions & 0 deletions src/pages/SignupQRPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export function SignupQRPage({
justifyContent: 'center',
minHeight: '100vh',
padding: `${spacing.xl}px`,
boxSizing: 'border-box',
transform: 'translateX(clamp(-40px, -2.5vw, -16px))',
}}
>
{/* Dual QR Code Container */}
Expand Down