update
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped

This commit is contained in:
1xDed committed 2026-12-02 08:37:23 +03:00
1 parent 7fb3d6cfa4
commit cbb750a413
67 files changed
+5399 -3413

No files matched your search

+21 -9
View File
@@ -8,9 +8,9 @@ import useRemoteControlStore, {
type CastButtonProps = {
item?: BaseItemDto | null;
transfer?: Omit<RemoteTransfer, "item">;
transfer?: RemoteTransfer;
/** Computed on click so playback position/queue are current. */
getTransfer?: () => Omit<RemoteTransfer, "item">;
getTransfer?: () => RemoteTransfer | null;
size?: "small" | "medium" | "large";
};
@@ -22,16 +22,28 @@ const CastButton = ({
}: CastButtonProps) => {
const openDialog = useRemoteControlStore((s) => s.openDialog);
return (
<Tooltip title={item ? "Воспроизвести на другом устройстве" : "Удалённое управление"}>
<Tooltip
title={
item
? "Передать текущее медиа на устройство"
: "Удалённое управление"
}
>
<IconButton
size={size}
aria-label={item ? "Воспроизвести на другом устройстве" : "Удалённое управление"}
onClick={() =>
openDialog({
...(getTransfer ? getTransfer() : transfer),
item: item ?? null,
})
aria-label={
item
? "Передать текущее медиа на устройство"
: "Удалённое управление"
}
onClick={() => {
const computed = getTransfer ? getTransfer() : transfer;
const resolvedItem = item ?? computed?.item ?? null;
openDialog({
...(computed ?? {}),
item: resolvedItem,
});
}}
>
<span className="material-symbols-rounded">cast</span>
</IconButton>