v3: localization fixes, char counters & limits on all text fields, ux fixes
This commit is contained in:
@@ -2,7 +2,9 @@ import { useContext, useEffect, useRef, useState } from "react";
|
||||
import { PlayerContext } from "../contexts/PlayerContext.ts";
|
||||
import { MediaPlayer } from "./MediaPlayer.tsx";
|
||||
|
||||
function itemKey(item: { kind: string; embedUrl?: string; fileUrl?: string } | null) {
|
||||
function itemKey(
|
||||
item: { kind: string; embedUrl?: string; fileUrl?: string } | null,
|
||||
) {
|
||||
if (!item) return null;
|
||||
return item.kind === "embed" ? item.embedUrl : item.fileUrl;
|
||||
}
|
||||
@@ -50,13 +52,18 @@ export function GlobalPlayer() {
|
||||
|
||||
const typeClass = current.kind === "embed"
|
||||
? current.type
|
||||
: current.mimeType.startsWith("video/") ? "file-video" : "file-audio";
|
||||
: current.mimeType.startsWith("video/")
|
||||
? "file-video"
|
||||
: "file-audio";
|
||||
|
||||
const title = current.title ?? (current.kind === "embed" ? current.embedUrl : current.fileUrl);
|
||||
const title = current.title ??
|
||||
(current.kind === "embed" ? current.embedUrl : current.fileUrl);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`global-player global-player--${typeClass}${reduced ? " global-player--reduced" : ""}`}
|
||||
className={`global-player global-player--${typeClass}${
|
||||
reduced ? " global-player--reduced" : ""
|
||||
}`}
|
||||
ref={ref}
|
||||
>
|
||||
<div className="global-player-header">
|
||||
|
||||
Reference in New Issue
Block a user