Skip to content
Merged
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
8 changes: 1 addition & 7 deletions packages/client/src/components/spotify/SpotifyMiniPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ const REPEAT_TRACK_END_GRACE_MS = 15_000;
const REPEAT_TRACK_REPLAY_COOLDOWN_MS = 8_000;
const MANUAL_CONTROL_REPEAT_SUPPRESS_MS = 15_000;
const DJ_MARI_PLAYLIST_READY_TOAST_MS = 20_000;
const DOTTOR_SUPPORT_GIF = "/sprites/dottore/dottore_jumping.gif";
const MOBILE_WIDGET_COLLAPSED_SIZE = 48;
const MOBILE_WIDGET_EXPANDED_MAX_WIDTH = 320;
const MOBILE_WIDGET_EXPANDED_HORIZONTAL_GUTTER = 24;
Expand Down Expand Up @@ -554,12 +553,7 @@ export function SpotifyMiniPlayer({
djMariToastRef.current = toast.custom(
() => (
<div className="flex max-w-[22rem] items-center gap-3 pr-1 text-[var(--foreground)]">
<img
src={DOTTOR_SUPPORT_GIF}
alt=""
className="h-14 w-14 shrink-0 rounded-lg object-contain"
draggable={false}
/>
<Loader2 size="2rem" className="shrink-0 animate-spin text-[var(--muted-foreground)]" />
<p className="text-sm font-medium leading-snug">DJ Mari is composing a playlist for you, hold on tight!</p>
<button
type="button"
Expand Down
22 changes: 2 additions & 20 deletions packages/client/src/components/ui/ProfessorMariWorkingWindow.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import { useEffect, useState } from "react";
import { X } from "lucide-react";
import { Loader2, X } from "lucide-react";
import { cn } from "../../lib/utils";

const DOTTOR_SUPPORT_GIF = "/sprites/dottore/dottore_jumping.gif";

interface ProfessorMariWorkingWindowProps {
visible: boolean;
onDismiss?: () => void;
className?: string;
}

export function ProfessorMariWorkingWindow({ visible, onDismiss, className }: ProfessorMariWorkingWindowProps) {
const [imageFailed, setImageFailed] = useState(false);

useEffect(() => {
if (visible) {
setImageFailed(false);
}
}, [visible]);

if (!visible) return null;

return (
Expand All @@ -30,14 +19,7 @@ export function ProfessorMariWorkingWindow({ visible, onDismiss, className }: Pr
role="status"
aria-live="polite"
>
{!imageFailed && (
<img
src={DOTTOR_SUPPORT_GIF}
alt=""
className="h-10 w-10 shrink-0 object-contain [image-rendering:pixelated]"
onError={() => setImageFailed(true)}
/>
)}
<Loader2 size="1.5rem" className="shrink-0 animate-spin text-[var(--muted-foreground)]" />
<p className={cn("min-w-0 text-xs font-medium leading-relaxed text-[var(--foreground)]", onDismiss && "pr-6")}>
Prof Mari is working...
</p>
Expand Down