feat: localize UI and improve playback
Continuous Integration / build_web (push) Failing after 1s
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
Continuous Integration / build_web (push) Failing after 1s
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
- translate the interface into Russian - add picture-in-picture and video fit modes - derive skip segments from Jellyfin chapter markers - align player navigation and add a window drag region - keep audio playback alive across routes
This commit is contained in:
1 parent
5784036eb1
commit
d9bce4de04
100 files changed
+1364
-706
No files matched your search
@@ -37,7 +37,7 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
||||
await setServer(bestServer.systemInfo?.Id ?? "", bestServer);
|
||||
setAddServerDialog(false);
|
||||
enqueueSnackbar(
|
||||
"Client added successfully. You might need to refresh client list.",
|
||||
"Сервер добавлен. Возможно, потребуется обновить список серверов.",
|
||||
{
|
||||
variant: "success",
|
||||
},
|
||||
@@ -50,11 +50,11 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
||||
onError: (err) => {
|
||||
console.error(err);
|
||||
enqueueSnackbar(`${err}`, { variant: "error" });
|
||||
enqueueSnackbar("Something went wrong", { variant: "error" });
|
||||
enqueueSnackbar("Что-то пошло не так", { variant: "error" });
|
||||
},
|
||||
onSettled: async (bestServer) => {
|
||||
if (!bestServer) {
|
||||
enqueueSnackbar("Provided server address is not a Jellyfin server.", {
|
||||
enqueueSnackbar("Указанный адрес не является сервером Jellyfin.", {
|
||||
variant: "error",
|
||||
});
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
Connect to Server
|
||||
Подключиться к серверу
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="body2"
|
||||
@@ -121,7 +121,7 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
Enter your Jellyfin server address to continue
|
||||
Введите адрес сервера Jellyfin, чтобы продолжить
|
||||
</Typography>
|
||||
</Stack>
|
||||
|
||||
@@ -174,7 +174,7 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
||||
variant="text"
|
||||
sx={{ borderRadius: 2 }}
|
||||
>
|
||||
Cancel
|
||||
Отмена
|
||||
</Button>
|
||||
<LoadingButton
|
||||
loading={addServer.isPending}
|
||||
@@ -184,7 +184,7 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
||||
sx={{ borderRadius: 2, px: 3 }}
|
||||
disabled={!serverIp}
|
||||
>
|
||||
Connect
|
||||
Подключиться
|
||||
</LoadingButton>
|
||||
</Stack>
|
||||
</Stack>
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) {
|
||||
) => {
|
||||
if (!user?.Id || !api) {
|
||||
console.error("User not logged in");
|
||||
enqueueSnackbar("You need to be logged in to play music", {
|
||||
enqueueSnackbar("Войдите, чтобы слушать музыку", {
|
||||
variant: "error",
|
||||
});
|
||||
return;
|
||||
@@ -96,7 +96,7 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) {
|
||||
fontWeight: 300,
|
||||
}}
|
||||
>
|
||||
{track.HasLyrics && <img src={lyricsIcon} alt="lyrics" />}
|
||||
{track.HasLyrics && <img src={lyricsIcon} alt="Текст песни" />}
|
||||
{track.Artists?.join(", ")}
|
||||
</Typography>
|
||||
</div>
|
||||
|
||||
@@ -19,11 +19,11 @@ export const AlphaSelector = React.memo(function AlphaSelector() {
|
||||
const arr = Array.from({ length: 26 }, (_, i) =>
|
||||
String.fromCharCode(65 + i),
|
||||
);
|
||||
return ["All", ...arr];
|
||||
return ["Все", ...arr];
|
||||
}, []);
|
||||
|
||||
const handleSelect = (letter: string) => {
|
||||
const value = letter === "All" ? undefined : letter;
|
||||
const value = letter === "Все" ? undefined : letter;
|
||||
if (currentLibraryId)
|
||||
updateLibrary(currentLibraryId, { nameStartsWith: value });
|
||||
};
|
||||
@@ -31,13 +31,13 @@ export const AlphaSelector = React.memo(function AlphaSelector() {
|
||||
return (
|
||||
<div className="alpha-selector">
|
||||
{letters.map((l) => {
|
||||
const active = (nameStartsWith || "All") === l;
|
||||
const active = (nameStartsWith || "Все") === l;
|
||||
return (
|
||||
<button
|
||||
key={l}
|
||||
className={active ? "alpha-letter active" : "alpha-letter"}
|
||||
onClick={() => handleSelect(l)}
|
||||
aria-label={`Filter by ${l}`}
|
||||
aria-label={`Фильтр по букве ${l}`}
|
||||
type="button"
|
||||
>
|
||||
{l}
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
z-index: 999 !important;
|
||||
top: 0 !important;
|
||||
|
||||
// Keep the left controls clear of the macOS traffic lights.
|
||||
// Keep the left controls clear of the macOS traffic lights and put the
|
||||
// header row on the same level as them.
|
||||
html.is-macos & {
|
||||
padding-top: 0.6rem;
|
||||
padding-left: calc(#{$page-margin} - 1.7em + 72px);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,9 +76,9 @@ const AppBarContent = () => {
|
||||
|
||||
const fallbackTitle = (() => {
|
||||
const path = location.pathname;
|
||||
if (path === "/favorite") return "Favorites";
|
||||
if (path.startsWith("/music/")) return "Music";
|
||||
if (path.startsWith("/player/audio")) return "Now Playing";
|
||||
if (path === "/favorite") return "Избранное";
|
||||
if (path.startsWith("/music/")) return "Музыка";
|
||||
if (path.startsWith("/player/audio")) return "Сейчас играет";
|
||||
return "";
|
||||
})();
|
||||
const title = pageTitle || fallbackTitle;
|
||||
@@ -100,14 +100,14 @@ const AppBarContent = () => {
|
||||
data-tauri-drag-region
|
||||
style={{ gap: "0.6em" }}
|
||||
>
|
||||
<Tooltip title="Open navigation">
|
||||
<IconButton onClick={handleDrawerOpen} aria-label="Open navigation">
|
||||
<Tooltip title="Открыть меню">
|
||||
<IconButton onClick={handleDrawerOpen} aria-label="Открыть меню">
|
||||
<span className="material-symbols-rounded">menu</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<MemoizeBackButton />
|
||||
<Tooltip title="Home">
|
||||
<IconButton onClick={handleNavigateToHome} aria-label="Home">
|
||||
<Tooltip title="Главная">
|
||||
<IconButton onClick={handleNavigateToHome} aria-label="Главная">
|
||||
<span
|
||||
className={
|
||||
location.pathname === "/home"
|
||||
@@ -132,24 +132,24 @@ const AppBarContent = () => {
|
||||
data-tauri-drag-region
|
||||
style={{ gap: "0.6em" }}
|
||||
>
|
||||
<Tooltip title="Watch together">
|
||||
<Tooltip title="Смотреть вместе">
|
||||
<IconButton
|
||||
onClick={openSyncPlayDialog}
|
||||
aria-label="Watch together"
|
||||
aria-label="Смотреть вместе"
|
||||
>
|
||||
<span className="material-symbols-rounded">groups</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<CastButton />
|
||||
<Tooltip title="Search">
|
||||
<IconButton onClick={toggleSearchDialog} aria-label="Search">
|
||||
<Tooltip title="Поиск">
|
||||
<IconButton onClick={toggleSearchDialog} aria-label="Поиск">
|
||||
<span className="material-symbols-rounded">search</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Favorites">
|
||||
<Tooltip title="Избранное">
|
||||
<IconButton
|
||||
onClick={handleNavigateToFavorite}
|
||||
aria-label="Favorites"
|
||||
aria-label="Избранное"
|
||||
>
|
||||
<span className="material-symbols-rounded">favorite</span>
|
||||
</IconButton>
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function AppBarBackOnly() {
|
||||
edge="start"
|
||||
//@ts-ignore
|
||||
color="white"
|
||||
aria-label="back"
|
||||
aria-label="Назад"
|
||||
disabled={history.length <= 1}
|
||||
onClick={handleBack}
|
||||
sx={{ mr: 2 }}
|
||||
|
||||
@@ -63,7 +63,7 @@ export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||
<ListItem>
|
||||
<ListItemButton onClick={onClose}>
|
||||
<span className="material-symbols-rounded">menu_open</span>
|
||||
<div style={{ marginLeft: "8px" }}>Close</div>
|
||||
<div style={{ marginLeft: "8px" }}>Закрыть</div>
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
</List>
|
||||
@@ -72,14 +72,14 @@ export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||
variant="overline"
|
||||
sx={{ display: "block", px: 2, pt: 1.5, opacity: 0.55 }}
|
||||
>
|
||||
Browse
|
||||
Обзор
|
||||
</Typography>
|
||||
<List>
|
||||
<ListItemLink
|
||||
className="library-drawer-item"
|
||||
to="/home"
|
||||
icon="home"
|
||||
primary="Home"
|
||||
primary="Главная"
|
||||
onClick={onClose}
|
||||
/>
|
||||
<ListItemLink
|
||||
@@ -87,14 +87,14 @@ export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||
to="/search"
|
||||
search={{ query: "" }}
|
||||
icon="search"
|
||||
primary="Search"
|
||||
primary="Поиск"
|
||||
onClick={onClose}
|
||||
/>
|
||||
<ListItemLink
|
||||
className="library-drawer-item"
|
||||
to="/favorite"
|
||||
icon="favorite"
|
||||
primary="Favorites"
|
||||
primary="Избранное"
|
||||
onClick={onClose}
|
||||
/>
|
||||
{libraries.isSuccess &&
|
||||
@@ -107,7 +107,7 @@ export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||
icon={
|
||||
library.CollectionType && getTypeIcon(library.CollectionType)
|
||||
}
|
||||
primary={library.Name ?? "Library"}
|
||||
primary={library.Name ?? "Библиотека"}
|
||||
onClick={onClose}
|
||||
/>
|
||||
))}
|
||||
@@ -117,27 +117,27 @@ export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||
variant="overline"
|
||||
sx={{ display: "block", px: 2, pt: 1.5, opacity: 0.55 }}
|
||||
>
|
||||
Settings
|
||||
Настройки
|
||||
</Typography>
|
||||
<List>
|
||||
<ListItemLink
|
||||
to="/settings/preferences"
|
||||
icon="settings"
|
||||
primary="Settings"
|
||||
primary="Настройки"
|
||||
className="library-drawer-item"
|
||||
onClick={onClose}
|
||||
/>
|
||||
<ListItemLink
|
||||
to="/settings/changeServer"
|
||||
icon="dns"
|
||||
primary="Change Server"
|
||||
primary="Сменить сервер"
|
||||
className="library-drawer-item"
|
||||
onClick={onClose}
|
||||
/>
|
||||
<ListItemLink
|
||||
to="/settings/about"
|
||||
icon="info"
|
||||
primary="About"
|
||||
primary="О приложении"
|
||||
className="library-drawer-item"
|
||||
onClick={onClose}
|
||||
/>
|
||||
|
||||
@@ -12,8 +12,8 @@ export default function BackButton() {
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
disabled={history.length === 0}
|
||||
aria-label="Back"
|
||||
title="Back"
|
||||
aria-label="Назад"
|
||||
title="Назад"
|
||||
>
|
||||
<span className="material-symbols-rounded">arrow_back</span>
|
||||
</IconButton>
|
||||
|
||||
@@ -22,10 +22,10 @@ const CastButton = ({
|
||||
}: CastButtonProps) => {
|
||||
const openDialog = useRemoteControlStore((s) => s.openDialog);
|
||||
return (
|
||||
<Tooltip title={item ? "Play on another device" : "Remote control"}>
|
||||
<Tooltip title={item ? "Воспроизвести на другом устройстве" : "Удалённое управление"}>
|
||||
<IconButton
|
||||
size={size}
|
||||
aria-label={item ? "Play on another device" : "Remote control"}
|
||||
aria-label={item ? "Воспроизвести на другом устройстве" : "Удалённое управление"}
|
||||
onClick={() =>
|
||||
openDialog({
|
||||
...(getTransfer ? getTransfer() : transfer),
|
||||
|
||||
@@ -25,28 +25,28 @@ const InstantMixButton = ({ item, withLabel = false }: InstantMixButtonProps) =>
|
||||
try {
|
||||
const { count } = await startInstantMix(api, user.Id, item);
|
||||
if (count === 0) {
|
||||
enqueueSnackbar("No tracks found for this Instant Mix", {
|
||||
enqueueSnackbar("Треки для микса не найдены", {
|
||||
variant: "warning",
|
||||
});
|
||||
} else {
|
||||
enqueueSnackbar(`Instant Mix: ${count} tracks`, {
|
||||
enqueueSnackbar(`Микс: ${count} треков`, {
|
||||
variant: "success",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Instant Mix failed", error);
|
||||
enqueueSnackbar("Could not start Instant Mix", { variant: "error" });
|
||||
enqueueSnackbar("Не удалось запустить микс", { variant: "error" });
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Tooltip title="Instant Mix">
|
||||
<Tooltip title="Микс">
|
||||
<span>
|
||||
{withLabel ? (
|
||||
<IconButton
|
||||
aria-label="Instant Mix"
|
||||
aria-label="Микс"
|
||||
onClick={handleClick}
|
||||
disabled={busy || !item}
|
||||
>
|
||||
@@ -54,7 +54,7 @@ const InstantMixButton = ({ item, withLabel = false }: InstantMixButtonProps) =>
|
||||
</IconButton>
|
||||
) : (
|
||||
<IconButton
|
||||
aria-label="Instant Mix"
|
||||
aria-label="Микс"
|
||||
onClick={handleClick}
|
||||
disabled={busy || !item}
|
||||
>
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function LikeButton({
|
||||
const mutation = useMutation({
|
||||
mutationFn: handleLiking,
|
||||
onError: (error) => {
|
||||
enqueueSnackbar(`An error occured while updating "${itemName}"`, {
|
||||
enqueueSnackbar(`Не удалось обновить «${itemName}»`, {
|
||||
variant: "error",
|
||||
});
|
||||
console.error(error);
|
||||
|
||||
@@ -54,7 +54,7 @@ export default function MarkPlayedButton({
|
||||
enqueueSnackbar(`${error}`, {
|
||||
variant: "error",
|
||||
});
|
||||
enqueueSnackbar(`An error occured while updating "${itemName}"`, {
|
||||
enqueueSnackbar(`Не удалось обновить «${itemName}»`, {
|
||||
variant: "error",
|
||||
});
|
||||
console.error(error);
|
||||
|
||||
@@ -90,13 +90,13 @@ const PlayButton = ({
|
||||
mutationKey: ["playButton", item?.Id, userId],
|
||||
mutationFn: async (currentEpisodeId?: string) => {
|
||||
if (!api) {
|
||||
throw new Error("API is not available");
|
||||
throw new Error("API недоступно");
|
||||
}
|
||||
if (!userId) {
|
||||
throw new Error("User ID is not available");
|
||||
throw new Error("Не указан пользователь");
|
||||
}
|
||||
if (!item.Id) {
|
||||
throw new Error("Item ID is not available");
|
||||
throw new Error("Не найден идентификатор элемента");
|
||||
}
|
||||
|
||||
return await getPlaybackInfo(api, userId, item, {
|
||||
@@ -109,23 +109,23 @@ const PlayButton = ({
|
||||
},
|
||||
onSuccess: async (result: PlayResult | null) => {
|
||||
if (!api) {
|
||||
console.error("API is not available");
|
||||
enqueueSnackbar("API is not available", { variant: "error" });
|
||||
console.error("API недоступно");
|
||||
enqueueSnackbar("API недоступно", { variant: "error" });
|
||||
return;
|
||||
}
|
||||
if (!userId) {
|
||||
console.error("User ID is not available");
|
||||
enqueueSnackbar("User ID is not available", { variant: "error" });
|
||||
console.error("Не указан пользователь");
|
||||
enqueueSnackbar("Не указан пользователь", { variant: "error" });
|
||||
return;
|
||||
}
|
||||
if (!result?.item?.Items?.length) {
|
||||
console.error("No items found");
|
||||
enqueueSnackbar("No items found", { variant: "error" });
|
||||
console.error("Ничего не найдено");
|
||||
enqueueSnackbar("Ничего не найдено", { variant: "error" });
|
||||
return;
|
||||
}
|
||||
if (!result?.item?.Items?.[0]?.Id) {
|
||||
console.error("No item ID found");
|
||||
enqueueSnackbar("No item ID found", { variant: "error" });
|
||||
console.error("Не найден идентификатор элемента");
|
||||
enqueueSnackbar("Не найден идентификатор элемента", { variant: "error" });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -148,8 +148,8 @@ const PlayButton = ({
|
||||
}
|
||||
} else {
|
||||
if (!result?.mediaSource?.MediaSources?.[0]?.Id) {
|
||||
console.error("No media source ID found");
|
||||
enqueueSnackbar("No media source ID found", { variant: "error" });
|
||||
console.error("Не найден источник медиа");
|
||||
enqueueSnackbar("Не найден источник медиа", { variant: "error" });
|
||||
return;
|
||||
}
|
||||
const episodeIndex = result.episodeIndex;
|
||||
@@ -205,13 +205,13 @@ const PlayButton = ({
|
||||
queryKey: ["playButton", "currentEpisode", item?.Id],
|
||||
queryFn: async () => {
|
||||
if (!api) {
|
||||
throw new Error("API is not available");
|
||||
throw new Error("API недоступно");
|
||||
}
|
||||
if (!userId) {
|
||||
throw new Error("User ID is not available");
|
||||
throw new Error("Не указан пользователь");
|
||||
}
|
||||
if (!item.Id) {
|
||||
throw new Error("Item ID is not available");
|
||||
throw new Error("Не найден идентификатор элемента");
|
||||
}
|
||||
const seasons = await getShowApi(api).getSeasons({
|
||||
seriesId: item.Id,
|
||||
@@ -237,12 +237,26 @@ const PlayButton = ({
|
||||
enabled: itemType === BaseItemKind.Series,
|
||||
});
|
||||
|
||||
const isAudioItem =
|
||||
item?.Type === "MusicAlbum" ||
|
||||
item?.Type === "Audio" ||
|
||||
item?.Type === "AudioBook" ||
|
||||
item?.Type === "Playlist" ||
|
||||
audio;
|
||||
const playLabel = item.UserData?.PlaybackPositionTicks
|
||||
? isAudioItem
|
||||
? "Продолжить прослушивание"
|
||||
: "Продолжить просмотр"
|
||||
: isAudioItem
|
||||
? "Слушать"
|
||||
: "Смотреть";
|
||||
|
||||
if (iconOnly) {
|
||||
return (
|
||||
//@ts-expect-error
|
||||
<Fab
|
||||
color="primary"
|
||||
aria-label="Play"
|
||||
aria-label={isAudioItem ? "Слушать" : "Смотреть"}
|
||||
className={className}
|
||||
onClick={(e) => {
|
||||
if (item.Type === "Episode") {
|
||||
@@ -322,14 +336,14 @@ const PlayButton = ({
|
||||
}
|
||||
>
|
||||
{currentEpisode.isPending ? (
|
||||
"Loading..."
|
||||
"Загрузка..."
|
||||
) : !currentEpisode.data ||
|
||||
!currentEpisode.data.Items ||
|
||||
currentEpisode.data.Items.length === 0 ? (
|
||||
"No episodes to watch found"
|
||||
"Нет серий для просмотра"
|
||||
) : (
|
||||
<>
|
||||
Watch S{currentEpisode.data.Items[0].ParentIndexNumber ?? 1}E
|
||||
Смотреть S{currentEpisode.data.Items[0].ParentIndexNumber ?? 1}E
|
||||
{currentEpisode.data.Items[0]?.IndexNumber ?? 1}
|
||||
<MemoizedLinearProgress
|
||||
//@ts-expect-error
|
||||
@@ -363,7 +377,7 @@ const PlayButton = ({
|
||||
(currentEpisode.data?.Items?.[0]?.UserData
|
||||
?.PlaybackPositionTicks ?? 0),
|
||||
)}{" "}
|
||||
left
|
||||
осталось
|
||||
</Typography>
|
||||
)}
|
||||
</div>
|
||||
@@ -403,15 +417,7 @@ const PlayButton = ({
|
||||
color="white"
|
||||
size={size}
|
||||
>
|
||||
{item.UserData?.PlaybackPositionTicks
|
||||
? "Continue Watching"
|
||||
: item?.Type === "MusicAlbum" ||
|
||||
item?.Type === "Audio" ||
|
||||
item?.Type === "AudioBook" ||
|
||||
item?.Type === "Playlist" ||
|
||||
audio
|
||||
? "Play Now"
|
||||
: "Watch Now"}
|
||||
{playLabel}
|
||||
<MemoizedLinearProgress
|
||||
//@ts-expect-error
|
||||
value={
|
||||
@@ -437,7 +443,7 @@ const PlayButton = ({
|
||||
(item.RunTimeTicks ?? 0) -
|
||||
(item.UserData?.PlaybackPositionTicks ?? 0),
|
||||
)}{" "}
|
||||
left
|
||||
осталось
|
||||
</Typography>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,8 @@ const QueueButton = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="Queue">
|
||||
<IconButton onClick={() => setOpen(true)} aria-label="Open queue">
|
||||
<Tooltip title="Очередь">
|
||||
<IconButton onClick={() => setOpen(true)} aria-label="Открыть очередь">
|
||||
<span className="material-symbols-rounded">queue_music</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
@@ -86,7 +86,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
const { AccessToken, User } = result?.data ?? {};
|
||||
if (api && AccessToken && User?.Name && User.Id) {
|
||||
setCheckForQuickConnect(false);
|
||||
enqueueSnackbar(`Logged in as ${User.Name}!`, {
|
||||
enqueueSnackbar(`Вы вошли как ${User.Name}!`, {
|
||||
variant: "success",
|
||||
});
|
||||
createApi(api.basePath, AccessToken);
|
||||
@@ -99,7 +99,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
}
|
||||
},
|
||||
onError: (error) => {
|
||||
enqueueSnackbar("Error authenticating user.", { variant: "error" });
|
||||
enqueueSnackbar("Не удалось войти.", { variant: "error" });
|
||||
console.error(error);
|
||||
},
|
||||
});
|
||||
@@ -126,7 +126,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
mutationKey: ["quick-connect-button", "initiate-connection"],
|
||||
mutationFn: async () => {
|
||||
if (!quickConnectEnabled.data?.data) {
|
||||
enqueueSnackbar("Quick Connect is not enabled on server.", {
|
||||
enqueueSnackbar("Quick Connect не включён на сервере.", {
|
||||
variant: "error",
|
||||
});
|
||||
}
|
||||
@@ -142,7 +142,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
setCheckForQuickConnect(true);
|
||||
},
|
||||
onError: (error) => {
|
||||
enqueueSnackbar("Error initiating Quick Connect.", { variant: "error" });
|
||||
enqueueSnackbar("Не удалось запустить Quick Connect.", { variant: "error" });
|
||||
console.error(error);
|
||||
},
|
||||
});
|
||||
@@ -182,8 +182,8 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
onClick={() => initQuickConnect.mutate()}
|
||||
>
|
||||
{quickConnectEnabled.data?.data
|
||||
? "Use Quick Connect"
|
||||
: "Quick Connect Disabled"}
|
||||
? "Войти через Quick Connect"
|
||||
: "Quick Connect недоступен"}
|
||||
</LoadingButton>
|
||||
<Dialog
|
||||
open={Boolean(quickConnectCode)}
|
||||
@@ -213,22 +213,22 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
mb: 2,
|
||||
}}
|
||||
>
|
||||
Quick Connect Code:
|
||||
Код Quick Connect:
|
||||
</Typography>
|
||||
<DialogContentText>
|
||||
Use this code in the Quick Connect tab in your server to login.
|
||||
Введите этот код в разделе Quick Connect на сервере, чтобы войти.
|
||||
</DialogContentText>
|
||||
<div
|
||||
className="flex flex-row"
|
||||
style={{ gap: "1em", alignItems: "center", marginTop: "1em" }}
|
||||
>
|
||||
<Tooltip title="Click to copy" arrow placement="top">
|
||||
<Tooltip title="Нажмите, чтобы скопировать" arrow placement="top">
|
||||
<Typography
|
||||
variant="h3"
|
||||
color="textPrimary"
|
||||
onClick={async () => {
|
||||
quickConnectCode && (await writeText(quickConnectCode));
|
||||
enqueueSnackbar("Quick Connect Code copied!", {
|
||||
enqueueSnackbar("Код Quick Connect скопирован!", {
|
||||
variant: "info",
|
||||
key: "copiedText",
|
||||
});
|
||||
@@ -252,8 +252,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
variant="body2"
|
||||
sx={{ mt: 2, opacity: 0.75, textAlign: "center" }}
|
||||
>
|
||||
Or scan this code with Blink on your phone to approve the
|
||||
login.
|
||||
Или отсканируйте код в Blink на телефоне, чтобы подтвердить вход.
|
||||
</Typography>
|
||||
<div style={{ marginTop: "1em", background: "#08001f", borderRadius: 12, padding: 8 }}>
|
||||
<QRCodeImage
|
||||
@@ -278,10 +277,10 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
onChange={(e) => setRememberUser(e.target.checked)}
|
||||
/>
|
||||
}
|
||||
label="Remember device"
|
||||
label="Запомнить устройство"
|
||||
/>
|
||||
<Button variant="contained" onClick={handleQuickConnectClose}>
|
||||
Close
|
||||
Закрыть
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
@@ -37,7 +37,7 @@ const trendingImageUrl = (
|
||||
const trendingLabel = (item: BaseItemDto): string => {
|
||||
const genre = item.Genres?.[0];
|
||||
if (genre) return genre.charAt(0).toUpperCase() + genre.slice(1);
|
||||
return item.Type === BaseItemKind.Series ? "Series" : "Movie";
|
||||
return item.Type === BaseItemKind.Series ? "Сериал" : "Фильм";
|
||||
};
|
||||
|
||||
const Carousel = ({
|
||||
@@ -97,7 +97,7 @@ const Carousel = ({
|
||||
<section
|
||||
className={`cinema-hero ${isPaused ? "paused" : ""}`}
|
||||
aria-roledescription="carousel"
|
||||
aria-label="Featured"
|
||||
aria-label="Рекомендуемое"
|
||||
onMouseEnter={() => setIsPaused(true)}
|
||||
onMouseLeave={() => setIsPaused(false)}
|
||||
>
|
||||
@@ -108,7 +108,7 @@ const Carousel = ({
|
||||
type="button"
|
||||
className="cinema-arrow right"
|
||||
onClick={next}
|
||||
aria-label="Next"
|
||||
aria-label="Далее"
|
||||
>
|
||||
<span className="material-symbols-rounded">chevron_right</span>
|
||||
</button>
|
||||
@@ -116,7 +116,7 @@ const Carousel = ({
|
||||
|
||||
<div className="cinema-trending">
|
||||
<div className="cinema-trending-head">
|
||||
<h3>Trending now</h3>
|
||||
<h3>В тренде</h3>
|
||||
{total > 1 && (
|
||||
<div className="cinema-dots">
|
||||
{content.map((item, index) => (
|
||||
@@ -143,7 +143,7 @@ const Carousel = ({
|
||||
index === currentSlide ? "active" : ""
|
||||
}`}
|
||||
onClick={() => goTo(index)}
|
||||
aria-label={item.Name ?? "Featured item"}
|
||||
aria-label={item.Name ?? "Рекомендуемое"}
|
||||
>
|
||||
{imageUrl ? (
|
||||
<img
|
||||
|
||||
@@ -146,10 +146,10 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
||||
>
|
||||
<span className="hero-carousel-label">
|
||||
{item.UserData?.PlaybackPositionTicks
|
||||
? "Continue watching"
|
||||
? "Продолжить просмотр"
|
||||
: item.Type === BaseItemKind.Series
|
||||
? "New series"
|
||||
: "New movie"}
|
||||
? "Новый сериал"
|
||||
: "Новый фильм"}
|
||||
</span>
|
||||
</MotionStack>
|
||||
<MotionTypography
|
||||
@@ -315,7 +315,7 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
||||
}
|
||||
onClick={handleMoreInfo}
|
||||
>
|
||||
More info
|
||||
Подробнее
|
||||
</Button>
|
||||
<Stack
|
||||
direction="row"
|
||||
|
||||
@@ -27,15 +27,15 @@ import { useLibraryStateStore } from "@/utils/store/libraryState";
|
||||
const route = getRouteApi("/_api/library/$id");
|
||||
|
||||
const FILTER_LABELS: Record<FILTERS, string> = {
|
||||
isPlayed: "Played",
|
||||
isUnPlayed: "Unplayed",
|
||||
isResumable: "Resumable",
|
||||
isFavorite: "Favorite",
|
||||
hasSubtitles: "Has Subtitles",
|
||||
hasTrailer: "Has Trailer",
|
||||
hasSpecialFeature: "Special Feature",
|
||||
hasThemeSong: "Theme Song",
|
||||
hasThemeVideo: "Theme Video",
|
||||
isPlayed: "Просмотрено",
|
||||
isUnPlayed: "Не просмотрено",
|
||||
isResumable: "Можно продолжить",
|
||||
isFavorite: "Избранное",
|
||||
hasSubtitles: "Есть субтитры",
|
||||
hasTrailer: "Есть трейлер",
|
||||
hasSpecialFeature: "Дополнительные материалы",
|
||||
hasThemeSong: "Тематическая песня",
|
||||
hasThemeVideo: "Тематическое видео",
|
||||
isSD: "SD",
|
||||
isHD: "HD",
|
||||
is4K: "4K",
|
||||
@@ -173,7 +173,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
paper: { className: "glass-dialog-paper" },
|
||||
}}
|
||||
>
|
||||
<DialogTitle>Filters</DialogTitle>
|
||||
<DialogTitle>Фильтры</DialogTitle>
|
||||
<DialogContent
|
||||
dividers
|
||||
sx={{ borderColor: "rgba(255, 255, 255, 0.1)" }}
|
||||
@@ -200,7 +200,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
<span className="material-symbols-rounded">expand_more</span>
|
||||
}
|
||||
>
|
||||
<Typography variant="subtitle2">General</Typography>
|
||||
<Typography variant="subtitle2">Общие</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
|
||||
<FormGroup>
|
||||
@@ -252,7 +252,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Typography variant="subtitle2">Video features</Typography>
|
||||
<Typography variant="subtitle2">Видео</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
|
||||
<FormGroup>
|
||||
@@ -306,7 +306,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Typography variant="subtitle2">Resolution</Typography>
|
||||
<Typography variant="subtitle2">Разрешение</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
|
||||
<FormGroup>
|
||||
@@ -354,7 +354,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Typography variant="subtitle2">Media type</Typography>
|
||||
<Typography variant="subtitle2">Тип медиа</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
|
||||
<FormGroup>
|
||||
@@ -374,7 +374,17 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
size="small"
|
||||
/>
|
||||
}
|
||||
label={k}
|
||||
label={
|
||||
k === "VideoFile"
|
||||
? "Видеофайл"
|
||||
: k === "BluRay"
|
||||
? "Blu-ray"
|
||||
: k === "Dvd"
|
||||
? "DVD"
|
||||
: k === "Iso"
|
||||
? "ISO"
|
||||
: k
|
||||
}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
@@ -405,7 +415,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Typography variant="subtitle2">Genres</Typography>
|
||||
<Typography variant="subtitle2">Жанры</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
|
||||
<FormGroup>
|
||||
@@ -440,7 +450,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
color="inherit"
|
||||
disabled={Object.keys(localFilters).length === 0}
|
||||
>
|
||||
Clear
|
||||
Сбросить
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
@@ -451,11 +461,11 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
||||
color="inherit"
|
||||
disabled={!dirty}
|
||||
>
|
||||
Reset
|
||||
Сбросить всё
|
||||
</Button>
|
||||
<Button onClick={onClose}>Cancel</Button>
|
||||
<Button onClick={onClose}>Отмена</Button>
|
||||
<Button onClick={apply} disabled={!dirty} variant="contained">
|
||||
Apply
|
||||
Применить
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
@@ -488,11 +498,11 @@ export const FiltersDialogTrigger: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<Tooltip
|
||||
title={activeCount ? `${activeCount} active filters` : "Filters"}
|
||||
title={activeCount ? `${activeCount} активных фильтров` : "Фильтры"}
|
||||
>
|
||||
<IconButton
|
||||
onClick={() => setOpen(true)}
|
||||
aria-label="Open filters dialog"
|
||||
aria-label="Открыть фильтры"
|
||||
>
|
||||
<span
|
||||
className="material-symbols-rounded"
|
||||
|
||||
@@ -54,7 +54,7 @@ const formatTime = (ticks: number) => {
|
||||
};
|
||||
|
||||
const deviceLabel = (session: SessionInfoDto) =>
|
||||
session.DeviceName || session.Client || "another device";
|
||||
session.DeviceName || session.Client || "другое устройство";
|
||||
|
||||
const posterId = (item: BaseItemDto) =>
|
||||
item.ImageTags?.Primary ? item.Id : (item.SeriesId ?? item.Id);
|
||||
@@ -167,13 +167,13 @@ const FollowMe = () => {
|
||||
if (kind === "video") navigate({ to: "/player" });
|
||||
if (kind === "audio") navigate({ to: "/player/audio" });
|
||||
if (kind !== "none") {
|
||||
enqueueSnackbar(`Continuing from ${deviceLabel(candidate.session)}`, {
|
||||
enqueueSnackbar(`Продолжаем с ${deviceLabel(candidate.session)}`, {
|
||||
variant: "success",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Follow-me transfer failed", error);
|
||||
enqueueSnackbar("Could not continue playback here", {
|
||||
enqueueSnackbar("Не удалось продолжить воспроизведение здесь", {
|
||||
variant: "error",
|
||||
});
|
||||
} finally {
|
||||
@@ -230,10 +230,10 @@ const FollowMe = () => {
|
||||
variant="overline"
|
||||
sx={{ lineHeight: 1.2, opacity: 0.65, letterSpacing: 0.8 }}
|
||||
>
|
||||
{paused ? "Paused on" : "Playing on"} {deviceLabel(session)}
|
||||
{paused ? "Пауза на" : "Идёт на"} {deviceLabel(session)}
|
||||
</Typography>
|
||||
<Typography variant="subtitle2" noWrap sx={{ fontWeight: 700 }}>
|
||||
{item.SeriesName ?? item.Name ?? "Continue watching"}
|
||||
{item.SeriesName ?? item.Name ?? "Продолжить просмотр"}
|
||||
</Typography>
|
||||
<Typography variant="caption" noWrap sx={{ opacity: 0.65 }}>
|
||||
{item.SeriesName && item.Name ? `${item.Name} · ` : ""}
|
||||
@@ -247,21 +247,21 @@ const FollowMe = () => {
|
||||
disabled={transferring}
|
||||
sx={{ textTransform: "none", borderRadius: "999px" }}
|
||||
>
|
||||
{transferring ? "Starting…" : "Continue here"}
|
||||
{transferring ? "Запуск…" : "Продолжить здесь"}
|
||||
</Button>
|
||||
<Button
|
||||
size="small"
|
||||
onClick={() => dismiss(candidate.key)}
|
||||
sx={{ textTransform: "none", borderRadius: "999px", opacity: 0.7 }}
|
||||
>
|
||||
Not now
|
||||
Не сейчас
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
<Tooltip title="Dismiss">
|
||||
<Tooltip title="Скрыть">
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label="Dismiss continue prompt"
|
||||
aria-label="Скрыть предложение"
|
||||
onClick={() => dismiss(candidate.key)}
|
||||
sx={{ alignSelf: "flex-start", opacity: 0.55 }}
|
||||
>
|
||||
|
||||
@@ -7,10 +7,10 @@ import { getTypeIcon } from "@/components/utils/iconsCollection";
|
||||
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
||||
|
||||
const groups = [
|
||||
{ type: "Actor", title: "Actors" },
|
||||
{ type: "Writer", title: "Writers" },
|
||||
{ type: "Director", title: "Directors" },
|
||||
{ type: "Producer", title: "Producers" },
|
||||
{ type: "Actor", title: "Актёры" },
|
||||
{ type: "Writer", title: "Сценаристы" },
|
||||
{ type: "Director", title: "Режиссёры" },
|
||||
{ type: "Producer", title: "Продюсеры" },
|
||||
] as const;
|
||||
|
||||
type CastAndCrewProps = {
|
||||
@@ -33,7 +33,7 @@ const CastAndCrew = ({ people, api }: CastAndCrewProps) => {
|
||||
return (
|
||||
<div className="item-detail-cast">
|
||||
<Typography variant="h5" sx={{ mb: 2 }}>
|
||||
Cast & Crew
|
||||
Актёры и команда
|
||||
</Typography>
|
||||
{grouped.map(
|
||||
(group) =>
|
||||
|
||||
@@ -118,7 +118,7 @@ export const TrackSelectors = ({
|
||||
<>
|
||||
{tracks.video.length > 0 && (
|
||||
<TextField
|
||||
label="Video"
|
||||
label="Видео"
|
||||
select
|
||||
style={{ width: "100%", marginBottom: "1em" }}
|
||||
value={selection.video}
|
||||
@@ -134,7 +134,7 @@ export const TrackSelectors = ({
|
||||
)}
|
||||
{tracks.audio.length > 0 && (
|
||||
<TextField
|
||||
label="Audio"
|
||||
label="Аудио"
|
||||
select
|
||||
style={{ width: "100%", marginBottom: "1em" }}
|
||||
value={selection.audio}
|
||||
@@ -150,7 +150,7 @@ export const TrackSelectors = ({
|
||||
)}
|
||||
{tracks.subtitle.length > 0 && (
|
||||
<TextField
|
||||
label="Subtitle"
|
||||
label="Субтитры"
|
||||
select
|
||||
style={{ width: "100%" }}
|
||||
value={selection.subtitle}
|
||||
@@ -159,7 +159,7 @@ export const TrackSelectors = ({
|
||||
onChange={(e) => setSelection({ subtitle: Number(e.target.value) })}
|
||||
>
|
||||
<MenuItem key={-1} value={-1}>
|
||||
No Subtitle
|
||||
Без субтитров
|
||||
</MenuItem>
|
||||
{tracks.subtitle.map((track) => (
|
||||
<MenuItem key={track.Index} value={track.Index}>
|
||||
|
||||
@@ -19,8 +19,8 @@ export const getItemCardCaption = (item: BaseItemDto) => {
|
||||
}
|
||||
if (item.Type === BaseItemKind.Series) {
|
||||
const end = item.EndDate
|
||||
? new Date(item.EndDate).toLocaleString([], { year: "numeric" })
|
||||
: "Present";
|
||||
? new Date(item.EndDate).toLocaleString("ru-RU", { year: "numeric" })
|
||||
: "н.в.";
|
||||
return `${item.ProductionYear} - ${end}`;
|
||||
}
|
||||
return item.ProductionYear;
|
||||
@@ -38,7 +38,7 @@ const SimilarItems = ({ item }: { item: BaseItemDto }) => {
|
||||
|
||||
return (
|
||||
<CardScroller
|
||||
title="You might also like"
|
||||
title="Вам может понравиться"
|
||||
displayCards={7}
|
||||
disableDecoration
|
||||
>
|
||||
|
||||
@@ -24,7 +24,7 @@ const UpcomingEpisodes = ({ episode }: { episode: BaseItemDto }) => {
|
||||
if (!upcomingEpisodes.data?.Items?.length) return null;
|
||||
|
||||
return (
|
||||
<CardScroller title="Upcoming Episodes" displayCards={4} disableDecoration>
|
||||
<CardScroller title="Будущие серии" displayCards={4} disableDecoration>
|
||||
{upcomingEpisodes.data.Items.map((upcoming) => (
|
||||
<Card
|
||||
key={upcoming.Id}
|
||||
|
||||
@@ -53,19 +53,19 @@ const PersonView = ({ item }: { item: BaseItemDto }) => {
|
||||
<>
|
||||
{item.PremiereDate && (
|
||||
<div>
|
||||
<Typography variant="h6">Birth</Typography>
|
||||
<Typography variant="h6">Дата рождения</Typography>
|
||||
<Typography variant="subtitle1" sx={{ opacity: 0.8 }}>
|
||||
{new Date(item.PremiereDate).toDateString()}
|
||||
{new Date(item.PremiereDate).toLocaleDateString("ru-RU")}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{item.EndDate && (
|
||||
<div>
|
||||
<Typography variant="h6" sx={{ mt: 2 }}>
|
||||
Death
|
||||
Дата смерти
|
||||
</Typography>
|
||||
<Typography variant="subtitle2" sx={{ opacity: 0.8 }}>
|
||||
{new Date(item.EndDate).toDateString()}
|
||||
{new Date(item.EndDate).toLocaleDateString("ru-RU")}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -36,7 +36,7 @@ import ItemDetailLayout, { ExternalLinks } from "../itemDetailLayout";
|
||||
import SimilarItems from "../similarItems";
|
||||
|
||||
const getEpisodeDateString = (date: Date) =>
|
||||
new Intl.DateTimeFormat(navigator.language ?? "en-US", {
|
||||
new Intl.DateTimeFormat("ru-RU", {
|
||||
dateStyle: "full",
|
||||
}).format(date);
|
||||
|
||||
@@ -339,7 +339,7 @@ const SeriesView = ({ item }: { item: BaseItemDto }) => {
|
||||
<CastAndCrew people={item.People} api={api} />
|
||||
{(specialFeatures.data?.length ?? 0) > 0 && (
|
||||
<CardScroller
|
||||
title="Special Features"
|
||||
title="Дополнительные материалы"
|
||||
displayCards={7}
|
||||
disableDecoration
|
||||
>
|
||||
|
||||
@@ -55,7 +55,7 @@ export const ArtistAlbum = ({ user, album, boxProps }: ArtistAlbumProps) => {
|
||||
{!!album.ImageTags?.Primary && (
|
||||
<div className="album-image">
|
||||
<img
|
||||
alt={album.Name ?? "Album Image"}
|
||||
alt={album.Name ?? "Обложка альбома"}
|
||||
src={`${api?.basePath}/Items/${album.Id}/Images/Primary?fillHeight=532&fillWidth=532&quality=96`}
|
||||
style={{
|
||||
width: "100%",
|
||||
@@ -150,8 +150,8 @@ export const ArtistAlbum = ({ user, album, boxProps }: ArtistAlbumProps) => {
|
||||
<div>
|
||||
<div className="item-info-track header">
|
||||
<span className="material-symbols-rounded index">tag</span>
|
||||
<Typography variant="subtitle1">Title</Typography>
|
||||
<Typography variant="subtitle1">Duration</Typography>
|
||||
<Typography variant="subtitle1">Название</Typography>
|
||||
<Typography variant="subtitle1">Длительность</Typography>
|
||||
</div>
|
||||
{albumTracks.data?.Items?.map((track, index) => (
|
||||
<AlbumMusicTrack
|
||||
|
||||
@@ -45,14 +45,14 @@ export const LatestMediaSection = ({
|
||||
item.Type === BaseItemKind.Episode
|
||||
? `S${item.ParentIndexNumber ?? 0}:E${
|
||||
item.IndexNumber ?? 0
|
||||
} - ${item.Name ?? "Unknown"}`
|
||||
} - ${item.Name ?? "Неизвестно"}`
|
||||
: item.Type === BaseItemKind.Series
|
||||
? `${item.ProductionYear} - ${
|
||||
item.EndDate
|
||||
? new Date(item.EndDate).toLocaleString([], {
|
||||
? new Date(item.EndDate).toLocaleString("ru-RU", {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
: "н.в."
|
||||
}`
|
||||
: item.ProductionYear
|
||||
}
|
||||
|
||||
@@ -272,16 +272,16 @@ export const LibraryHeader = () => {
|
||||
<div className="flex flex-row" data-tauri-drag-region style={{ gap: "0.6em" }}>
|
||||
<IconButton
|
||||
onClick={handleDrawerOpen}
|
||||
aria-label="Open navigation"
|
||||
title="Open navigation"
|
||||
aria-label="Открыть меню"
|
||||
title="Открыть меню"
|
||||
>
|
||||
<div className="material-symbols-rounded">menu</div>
|
||||
</IconButton>
|
||||
<MemoizeBackButton />
|
||||
<IconButton
|
||||
onClick={handleNavigateToHome}
|
||||
aria-label="Home"
|
||||
title="Home"
|
||||
aria-label="Главная"
|
||||
title="Главная"
|
||||
>
|
||||
<div
|
||||
className={
|
||||
@@ -300,7 +300,7 @@ export const LibraryHeader = () => {
|
||||
>
|
||||
<div
|
||||
className="library-title-count flex flex-row flex-align-center"
|
||||
title={`${libraryName}${typeof totalCount === "number" ? ` · ${totalCount.toLocaleString()} items` : ""}`}
|
||||
title={`${libraryName}${typeof totalCount === "number" ? ` · ${totalCount.toLocaleString()} элементов` : ""}`}
|
||||
>
|
||||
<Typography variant="subtitle1" noWrap align="center">
|
||||
{libraryName}
|
||||
@@ -324,7 +324,7 @@ export const LibraryHeader = () => {
|
||||
>
|
||||
<MenuItem disabled value="">
|
||||
<Typography variant="overline" color="textSecondary">
|
||||
View
|
||||
Вид
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
{compatibleViews.map((v) => (
|
||||
@@ -335,7 +335,7 @@ export const LibraryHeader = () => {
|
||||
</TextField>
|
||||
<IconButton
|
||||
onClick={handleSortAscendingToggle}
|
||||
aria-label="Toggle sort order"
|
||||
aria-label="Изменить порядок сортировки"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
@@ -362,7 +362,7 @@ export const LibraryHeader = () => {
|
||||
>
|
||||
<MenuItem disabled value="">
|
||||
<Typography variant="overline" color="textSecondary">
|
||||
Sort By
|
||||
Сортировка
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
{SORT_BY_OPTIONS.map((option) => {
|
||||
@@ -403,16 +403,16 @@ export const LibraryHeader = () => {
|
||||
</span>
|
||||
<IconButton
|
||||
onClick={toggleSearchDialog}
|
||||
aria-label="Search"
|
||||
title="Search"
|
||||
aria-label="Поиск"
|
||||
title="Поиск"
|
||||
>
|
||||
<div className="material-symbols-rounded">search</div>
|
||||
</IconButton>
|
||||
<IconButton
|
||||
className="library-header-favorite"
|
||||
onClick={handleNavigateToFavorite}
|
||||
aria-label="Favorites"
|
||||
title="Favorites"
|
||||
aria-label="Избранное"
|
||||
title="Избранное"
|
||||
>
|
||||
<div className="material-symbols-rounded">favorite</div>
|
||||
</IconButton>
|
||||
|
||||
@@ -288,9 +288,9 @@ const LibraryItemsGrid = () => {
|
||||
>
|
||||
sentiment_dissatisfied
|
||||
</div>
|
||||
<div style={{ fontSize: 16 }}>No items to show</div>
|
||||
<div style={{ fontSize: 16 }}>Нет элементов для отображения</div>
|
||||
<div style={{ fontSize: 13, marginTop: 6 }}>
|
||||
Try adjusting filters, sort, or the A–Z selector.
|
||||
Попробуйте изменить фильтры, сортировку или выбор по алфавиту.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -357,7 +357,7 @@ const LibraryItemsGrid = () => {
|
||||
year: "numeric",
|
||||
},
|
||||
)
|
||||
: "Present"
|
||||
: "н.в."
|
||||
}`
|
||||
: item?.ProductionYear
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ const LoginShell = ({
|
||||
{serverName ?? serverHost}
|
||||
</span>
|
||||
<Link to="/setup/server/list" className="login-shell-server-change">
|
||||
Change
|
||||
Сменить
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -47,7 +47,7 @@ export const ProfileAvatar = ({
|
||||
</span>
|
||||
)}
|
||||
{locked && (
|
||||
<span className="profile-lock" title="Password protected">
|
||||
<span className="profile-lock" title="Защищено паролем">
|
||||
<span className="material-symbols-rounded">lock</span>
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -46,7 +46,7 @@ const MusicTrack = ({
|
||||
</span>
|
||||
</div>
|
||||
<img
|
||||
alt={item.Name ?? "Music Track"}
|
||||
alt={item.Name ?? "Трек"}
|
||||
src={
|
||||
api &&
|
||||
getImageUrlsApi(api).getItemImageUrlById(
|
||||
@@ -105,7 +105,7 @@ const MusicTrack = ({
|
||||
{item.HasLyrics && (
|
||||
<img
|
||||
src={lyrics_icon}
|
||||
alt="Lyrics"
|
||||
alt="Текст песни"
|
||||
className="music-track-info-lyrics"
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -34,7 +34,7 @@ export const EmptyNotice = ({ extraMsg }: { extraMsg?: string }) => {
|
||||
fontWeight: 300,
|
||||
}}
|
||||
>
|
||||
No results found
|
||||
Ничего не найдено
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
|
||||
@@ -42,7 +42,7 @@ export const ErrorNotice = ({ error }: { error?: unknown }) => {
|
||||
fontWeight: 300,
|
||||
}}
|
||||
>
|
||||
Something went wrong.
|
||||
Что-то пошло не так.
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="body2"
|
||||
@@ -66,7 +66,7 @@ export const ErrorNotice = ({ error }: { error?: unknown }) => {
|
||||
{normalizedError
|
||||
? normalizedError.stack ||
|
||||
`${normalizedError.name}: ${normalizedError.message}`
|
||||
: "Unknown error"}
|
||||
: "Неизвестная ошибка"}
|
||||
</Typography>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@ const OutroCard = (props: { handleShowCredits: () => void }) => {
|
||||
if (!item || !item.Type) return null;
|
||||
return (
|
||||
<div className="outro-card">
|
||||
<Typography variant="h4">Up Next</Typography>
|
||||
<Typography variant="h4">Далее</Typography>
|
||||
<div className="outro-card-content">
|
||||
{item?.ImageTags?.Primary ? (
|
||||
<img
|
||||
@@ -73,7 +73,7 @@ const OutroCard = (props: { handleShowCredits: () => void }) => {
|
||||
</div>
|
||||
}
|
||||
>
|
||||
Play Now
|
||||
Смотреть
|
||||
</Button>
|
||||
<Button
|
||||
onClick={props.handleShowCredits}
|
||||
@@ -81,7 +81,7 @@ const OutroCard = (props: { handleShowCredits: () => void }) => {
|
||||
color="white"
|
||||
variant="outlined"
|
||||
>
|
||||
Watch Credits
|
||||
Смотреть титры
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,9 +43,9 @@ const DeviceMenu = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title="Devices">
|
||||
<Tooltip title="Устройства">
|
||||
<IconButton
|
||||
aria-label="Devices"
|
||||
aria-label="Устройства"
|
||||
onClick={(event) => setAnchor(event.currentTarget)}
|
||||
>
|
||||
<span className="material-symbols-rounded">devices</span>
|
||||
@@ -68,16 +68,16 @@ const DeviceMenu = ({
|
||||
<span className="material-symbols-rounded">computer</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary="This device"
|
||||
primary="Это устройство"
|
||||
secondary={
|
||||
localActive ? (localItem?.Name ?? "Playing") : "Idle"
|
||||
localActive ? (localItem?.Name ?? "Играет") : "Свободно"
|
||||
}
|
||||
/>
|
||||
</MenuItem>
|
||||
<Divider />
|
||||
{sessions.length === 0 ? (
|
||||
<MenuItem disabled>
|
||||
<ListItemText primary="No other devices are online" />
|
||||
<ListItemText primary="Другие устройства не в сети" />
|
||||
</MenuItem>
|
||||
) : (
|
||||
sessions.map((session) => (
|
||||
@@ -95,11 +95,11 @@ const DeviceMenu = ({
|
||||
</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={session.DeviceName || session.Client || "Device"}
|
||||
primary={session.DeviceName || session.Client || "Устройство"}
|
||||
secondary={
|
||||
session.NowPlayingItem?.Name ??
|
||||
session.Client ??
|
||||
"Not playing"
|
||||
"Ничего не играет"
|
||||
}
|
||||
/>
|
||||
</MenuItem>
|
||||
@@ -115,7 +115,7 @@ const DeviceMenu = ({
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">settings_remote</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Remote control…" />
|
||||
<ListItemText primary="Удалённое управление…" />
|
||||
</MenuItem>
|
||||
<Divider />
|
||||
<MenuItem
|
||||
@@ -129,11 +129,11 @@ const DeviceMenu = ({
|
||||
<span className="material-symbols-rounded">sync</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary="Sync playback"
|
||||
primary="Синхронизация воспроизведения"
|
||||
secondary={
|
||||
syncEnabled
|
||||
? "Devices follow this session"
|
||||
: "Keep devices in step"
|
||||
? "Устройства следуют за этим сеансом"
|
||||
: "Синхронизировать устройства"
|
||||
}
|
||||
/>
|
||||
<Switch
|
||||
|
||||
@@ -60,7 +60,7 @@ const LyricsPanel = ({ item, api, currentTime, onSeek }: LyricsPanelProps) => {
|
||||
if (lyrics.isLoading) {
|
||||
return (
|
||||
<div className="audio-lyrics-status">
|
||||
<Typography>Loading lyrics...</Typography>
|
||||
<Typography>Загрузка текста...</Typography>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ const LyricsPanel = ({ item, api, currentTime, onSeek }: LyricsPanelProps) => {
|
||||
if (lyrics.isError || !lyrics.data || !lyrics.data.Lyrics?.length) {
|
||||
return (
|
||||
<div className="audio-lyrics-status">
|
||||
<Typography>No lyrics available</Typography>
|
||||
<Typography>Текст недоступен</Typography>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ const LyricsPanel = ({ item, api, currentTime, onSeek }: LyricsPanelProps) => {
|
||||
{!hasSyncedLyrics && (
|
||||
<div className="audio-lyrics-unsynced-notice">
|
||||
<span className="material-symbols-rounded">info</span>
|
||||
<Typography variant="caption">Synced lyrics not available</Typography>
|
||||
<Typography variant="caption">Синхронизированный текст недоступен</Typography>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -42,13 +42,13 @@ const PlayerActions = ({
|
||||
/>}
|
||||
<QueueButton />
|
||||
<div className="audio-player-volume">{children}</div>
|
||||
<Tooltip title="Open player">
|
||||
<IconButton onClick={onExpand} aria-label="Open player">
|
||||
<Tooltip title="Открыть плеер">
|
||||
<IconButton onClick={onExpand} aria-label="Открыть плеер">
|
||||
<span className="material-symbols-rounded">open_in_full</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Stop and close">
|
||||
<IconButton onClick={onClose} aria-label="Stop and close">
|
||||
<Tooltip title="Остановить и закрыть">
|
||||
<IconButton onClick={onClose} aria-label="Остановить и закрыть">
|
||||
<span className="material-symbols-rounded">close</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
@@ -36,7 +36,7 @@ const PlayerInfo = ({ item, api, onOpen }: PlayerInfoProps) => {
|
||||
type="button"
|
||||
className="audio-player-image-container"
|
||||
onClick={onOpen}
|
||||
aria-label="Open player"
|
||||
aria-label="Открыть плеер"
|
||||
>
|
||||
<span className="material-symbols-rounded audio-player-image-icon">
|
||||
music_note
|
||||
|
||||
@@ -56,7 +56,7 @@ const PlayerProgress = ({
|
||||
max={duration}
|
||||
onChange={handleChange}
|
||||
onChangeCommitted={handleChangeCommitted}
|
||||
aria-label="Seek"
|
||||
aria-label="Перемотка"
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ const PlayerProgress = ({
|
||||
max={duration}
|
||||
onChange={handleChange}
|
||||
onChangeCommitted={handleChangeCommitted}
|
||||
aria-label="Seek"
|
||||
aria-label="Перемотка"
|
||||
/>
|
||||
<div className="player-progress-stacked-times">
|
||||
<span>{getRuntimeMusic(sliderValue)}</span>
|
||||
|
||||
@@ -64,7 +64,7 @@ const StatsPanel: React.FC<StatsPanelProps> = ({ item, audioRef }) => {
|
||||
return (
|
||||
<Box sx={{ p: 2 }}>
|
||||
<Typography variant="h6" sx={{ mb: 2 }}>
|
||||
Stats for Nerds
|
||||
Статистика
|
||||
</Typography>
|
||||
|
||||
<Paper
|
||||
@@ -78,11 +78,11 @@ const StatsPanel: React.FC<StatsPanelProps> = ({ item, audioRef }) => {
|
||||
variant="subtitle2"
|
||||
sx={{ mb: 1, opacity: 0.5, textTransform: "uppercase" }}
|
||||
>
|
||||
Media Source
|
||||
Источник медиа
|
||||
</Typography>
|
||||
<StatRow label="Container" value={mediaSource?.Container} />
|
||||
<StatRow label="Контейнер" value={mediaSource?.Container} />
|
||||
<StatRow
|
||||
label="Bitrate"
|
||||
label="Битрейт"
|
||||
value={
|
||||
mediaSource?.Bitrate
|
||||
? `${Math.round(mediaSource.Bitrate / 1000)} kbps`
|
||||
@@ -90,34 +90,34 @@ const StatsPanel: React.FC<StatsPanelProps> = ({ item, audioRef }) => {
|
||||
}
|
||||
/>
|
||||
<StatRow
|
||||
label="Size"
|
||||
label="Размер"
|
||||
value={
|
||||
mediaSource?.Size
|
||||
? `${(mediaSource.Size / 1024 / 1024).toFixed(2)} MB`
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
<StatRow label="Path" value={mediaSource?.Path} />
|
||||
<StatRow label="Путь" value={mediaSource?.Path} />
|
||||
|
||||
<Box sx={{ mt: 3 }}>
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
sx={{ mb: 1, opacity: 0.5, textTransform: "uppercase" }}
|
||||
>
|
||||
Audio Stream
|
||||
Аудиопоток
|
||||
</Typography>
|
||||
<StatRow label="Codec" value={mediaStream?.Codec} />
|
||||
<StatRow label="Channels" value={mediaStream?.Channels} />
|
||||
<StatRow label="Кодек" value={mediaStream?.Codec} />
|
||||
<StatRow label="Каналы" value={mediaStream?.Channels} />
|
||||
<StatRow
|
||||
label="Sample Rate"
|
||||
label="Частота дискретизации"
|
||||
value={
|
||||
mediaStream?.SampleRate
|
||||
? `${mediaStream.SampleRate} Hz`
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
<StatRow label="Bit Depth" value={mediaStream?.BitDepth} />
|
||||
<StatRow label="Language" value={mediaStream?.Language} />
|
||||
<StatRow label="Глубина" value={mediaStream?.BitDepth} />
|
||||
<StatRow label="Язык" value={mediaStream?.Language} />
|
||||
</Box>
|
||||
|
||||
<Box sx={{ mt: 3 }}>
|
||||
@@ -125,11 +125,11 @@ const StatsPanel: React.FC<StatsPanelProps> = ({ item, audioRef }) => {
|
||||
variant="subtitle2"
|
||||
sx={{ mb: 1, opacity: 0.5, textTransform: "uppercase" }}
|
||||
>
|
||||
Player
|
||||
Плеер
|
||||
</Typography>
|
||||
<StatRow label="Buffered" value={buffered} />
|
||||
<StatRow label="Буфер" value={buffered} />
|
||||
<StatRow
|
||||
label="Volume"
|
||||
label="Громкость"
|
||||
value={
|
||||
audioRef?.current
|
||||
? `${Math.round(audioRef.current.volume * 100)}%`
|
||||
@@ -137,7 +137,7 @@ const StatsPanel: React.FC<StatsPanelProps> = ({ item, audioRef }) => {
|
||||
}
|
||||
/>
|
||||
<StatRow
|
||||
label="Playback Rate"
|
||||
label="Скорость воспроизведения"
|
||||
value={audioRef?.current?.playbackRate}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@@ -139,12 +139,12 @@ const AudioPlayer = () => {
|
||||
: (activeItem?.AlbumArtists ?? []);
|
||||
const artistNames = artists.map((artist) => artist.Name).filter(Boolean);
|
||||
const remoteDevice = remote
|
||||
? remote.DeviceName || remote.Client || "another device"
|
||||
? remote.DeviceName || remote.Client || "другое устройство"
|
||||
: undefined;
|
||||
const subtitle = remote
|
||||
? artistNames.length > 0
|
||||
? `${artistNames.join(", ")} · ${remoteDevice}`
|
||||
: `Playing on ${remoteDevice}`
|
||||
: `Идёт на ${remoteDevice}`
|
||||
: artistNames.join(", ") || activeItem?.Album || "";
|
||||
const coverUrl =
|
||||
api && activeItem?.Id
|
||||
@@ -231,9 +231,9 @@ const AudioPlayer = () => {
|
||||
})
|
||||
: undefined;
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: item.Name ?? "Unknown Title",
|
||||
artist: item.Artists?.join(", ") ?? "Unknown Artist",
|
||||
album: item.Album ?? "Unknown Album",
|
||||
title: item.Name ?? "Неизвестное название",
|
||||
artist: item.Artists?.join(", ") ?? "Неизвестный исполнитель",
|
||||
album: item.Album ?? "Неизвестный альбом",
|
||||
artwork: imageUrl
|
||||
? [{ src: imageUrl, sizes: "512x512", type: "image/jpeg" }]
|
||||
: [],
|
||||
@@ -368,8 +368,8 @@ const AudioPlayer = () => {
|
||||
});
|
||||
await sessions.refetch();
|
||||
} catch (error) {
|
||||
console.error("Remote command failed", error);
|
||||
enqueueSnackbar("Remote command failed", { variant: "error" });
|
||||
console.error("Команда не выполнена", error);
|
||||
enqueueSnackbar("Команда не выполнена", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -385,7 +385,7 @@ const AudioPlayer = () => {
|
||||
if (kind === "video") navigate({ to: "/player" });
|
||||
} catch (error) {
|
||||
console.error("Transfer failed", error);
|
||||
enqueueSnackbar("Could not transfer playback", { variant: "error" });
|
||||
enqueueSnackbar("Не удалось перенести воспроизведение", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -432,8 +432,8 @@ const AudioPlayer = () => {
|
||||
setSelectedRemoteId(session.Id);
|
||||
await sessions.refetch();
|
||||
} catch (error) {
|
||||
console.error("Could not switch device", error);
|
||||
enqueueSnackbar("Could not switch device", { variant: "error" });
|
||||
console.error("Не удалось переключить устройство", error);
|
||||
enqueueSnackbar("Не удалось переключить устройство", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -462,7 +462,7 @@ const AudioPlayer = () => {
|
||||
await sessions.refetch();
|
||||
} catch (error) {
|
||||
console.error("Remote general command failed", error);
|
||||
enqueueSnackbar("Remote command failed", { variant: "error" });
|
||||
enqueueSnackbar("Команда не выполнена", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -512,13 +512,13 @@ const AudioPlayer = () => {
|
||||
try {
|
||||
const { count } = await startInstantMix(api, user.Id, activeItem);
|
||||
if (count === 0) {
|
||||
enqueueSnackbar("No tracks found for Instant Mix", {
|
||||
enqueueSnackbar("Нет треков для микса", {
|
||||
variant: "warning",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
enqueueSnackbar("Could not start Instant Mix", { variant: "error" });
|
||||
enqueueSnackbar("Не удалось запустить микс", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -534,11 +534,34 @@ const AudioPlayer = () => {
|
||||
});
|
||||
};
|
||||
|
||||
if (!barVisible || isFullPlayer) {
|
||||
const audioElement = display ? (
|
||||
<audio
|
||||
autoPlay
|
||||
src={url}
|
||||
ref={audioRef}
|
||||
key={item?.Id ?? "noItem"}
|
||||
onTimeUpdate={handleTimeUpdate}
|
||||
onEnded={handleEnded}
|
||||
onPlay={onPlay}
|
||||
onPause={onPause}
|
||||
onSeeked={updatePositionState}
|
||||
onLoadedMetadata={(event) => {
|
||||
const player = event.currentTarget;
|
||||
if (!seekAppliedRef.current && startTimeTicks > 0) {
|
||||
seekAppliedRef.current = true;
|
||||
player.currentTime = ticksToSec(startTimeTicks);
|
||||
}
|
||||
updatePositionState();
|
||||
}}
|
||||
id="audio-player"
|
||||
/>
|
||||
) : null;
|
||||
|
||||
if (!barVisible && !display) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
const bar = (
|
||||
<AnimatePresence mode="sync">
|
||||
<motion.div
|
||||
initial={{ transform: "translate(-50%, 150%)" }}
|
||||
@@ -552,7 +575,7 @@ const AudioPlayer = () => {
|
||||
type="button"
|
||||
className="media-bar-cover"
|
||||
onClick={handleNavigate}
|
||||
aria-label="Open player"
|
||||
aria-label="Открыть плеер"
|
||||
>
|
||||
{coverUrl ? (
|
||||
<img src={coverUrl} alt="" />
|
||||
@@ -567,7 +590,7 @@ const AudioPlayer = () => {
|
||||
title={activeItem?.Name ?? undefined}
|
||||
onClick={handleNavigate}
|
||||
>
|
||||
{activeItem?.Name ?? "Unknown"}
|
||||
{activeItem?.Name ?? "Неизвестно"}
|
||||
</Typography>
|
||||
<Typography variant="caption" noWrap className="media-bar-subtitle">
|
||||
{subtitle || "Blink"}
|
||||
@@ -575,7 +598,7 @@ const AudioPlayer = () => {
|
||||
</div>
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label="More"
|
||||
aria-label="Ещё"
|
||||
className="media-bar-more"
|
||||
onClick={handleMoreOpen}
|
||||
>
|
||||
@@ -585,7 +608,7 @@ const AudioPlayer = () => {
|
||||
|
||||
<div className="media-bar-center">
|
||||
<div className="media-bar-controls">
|
||||
<Tooltip title="Shuffle">
|
||||
<Tooltip title="Перемешать">
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={handleShuffle}
|
||||
@@ -594,21 +617,21 @@ const AudioPlayer = () => {
|
||||
<span className="material-symbols-rounded">shuffle</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Previous">
|
||||
<Tooltip title="Предыдущий">
|
||||
<IconButton
|
||||
size="small"
|
||||
onClick={handlePrevious}
|
||||
aria-label="Previous"
|
||||
aria-label="Предыдущий"
|
||||
>
|
||||
<span className="material-symbols-rounded">
|
||||
skip_previous
|
||||
</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title={isPlaying ? "Pause" : "Play"}>
|
||||
<Tooltip title={isPlaying ? "Пауза" : "Слушать"}>
|
||||
<IconButton
|
||||
className="media-bar-play"
|
||||
aria-label={isPlaying ? "Pause" : "Play"}
|
||||
aria-label={isPlaying ? "Пауза" : "Слушать"}
|
||||
onClick={() =>
|
||||
remote
|
||||
? remoteCommand(PlaystateCommand.PlayPause)
|
||||
@@ -620,8 +643,8 @@ const AudioPlayer = () => {
|
||||
</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Tooltip title="Next">
|
||||
<IconButton size="small" onClick={handleNext} aria-label="Next">
|
||||
<Tooltip title="Следующий">
|
||||
<IconButton size="small" onClick={handleNext} aria-label="Следующий">
|
||||
<span className="material-symbols-rounded">skip_next</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
@@ -629,15 +652,15 @@ const AudioPlayer = () => {
|
||||
title={
|
||||
remote
|
||||
? remoteRepeat === "RepeatNone"
|
||||
? "Repeat off"
|
||||
? "Повтор выкл."
|
||||
: remoteRepeat === "RepeatAll"
|
||||
? "Repeat all"
|
||||
: "Repeat one"
|
||||
? "Повтор всех"
|
||||
: "Повтор одного"
|
||||
: repeatMode === "off"
|
||||
? "Repeat off"
|
||||
? "Повтор выкл."
|
||||
: repeatMode === "all"
|
||||
? "Repeat all"
|
||||
: "Repeat one"
|
||||
? "Повтор всех"
|
||||
: "Повтор одного"
|
||||
}
|
||||
>
|
||||
<IconButton
|
||||
@@ -667,10 +690,10 @@ const AudioPlayer = () => {
|
||||
|
||||
<div className="media-bar-right">
|
||||
{remote && (
|
||||
<Tooltip title="Transfer to this device">
|
||||
<Tooltip title="Перенести на это устройство">
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label="Transfer to this device"
|
||||
aria-label="Перенести на это устройство"
|
||||
onClick={transferToLocal}
|
||||
>
|
||||
<span className="material-symbols-rounded">
|
||||
@@ -680,7 +703,7 @@ const AudioPlayer = () => {
|
||||
</Tooltip>
|
||||
)}
|
||||
{!remote && <QueueButton />}
|
||||
<Tooltip title={remote ? (remoteMuted ? "Unmute" : "Mute") : (isMuted ? "Unmute" : "Mute")}>
|
||||
<Tooltip title={remote ? (remoteMuted ? "Включить звук" : "Выключить звук") : (isMuted ? "Включить звук" : "Выключить звук")}>
|
||||
<IconButton size="small" onClick={handleMute}>
|
||||
<span className="material-symbols-rounded">
|
||||
{remote
|
||||
@@ -700,7 +723,7 @@ const AudioPlayer = () => {
|
||||
min={0}
|
||||
max={1}
|
||||
step={0.01}
|
||||
aria-label="Volume"
|
||||
aria-label="Громкость"
|
||||
onChange={(_, value) => {
|
||||
const next = Array.isArray(value) ? value[0] : value;
|
||||
if (remote) {
|
||||
@@ -730,7 +753,7 @@ const AudioPlayer = () => {
|
||||
canSync={canSync}
|
||||
onToggleSync={toggleSync}
|
||||
/>
|
||||
<Tooltip title="Open player">
|
||||
<Tooltip title="Открыть плеер">
|
||||
<IconButton size="small" onClick={handleNavigate}>
|
||||
<span className="material-symbols-rounded">open_in_full</span>
|
||||
</IconButton>
|
||||
@@ -747,7 +770,7 @@ const AudioPlayer = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">radio</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Instant Mix" />
|
||||
<ListItemText primary="Микс" />
|
||||
</MenuItem>
|
||||
{remote ? (
|
||||
<MenuItem
|
||||
@@ -761,14 +784,14 @@ const AudioPlayer = () => {
|
||||
system_update_alt
|
||||
</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Transfer to this device" />
|
||||
<ListItemText primary="Перенести на это устройство" />
|
||||
</MenuItem>
|
||||
) : (
|
||||
<MenuItem onClick={openCastForLocal}>
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">cast</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Play on another device…" />
|
||||
<ListItemText primary="Воспроизвести на другом устройстве…" />
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem
|
||||
@@ -780,7 +803,7 @@ const AudioPlayer = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">settings_remote</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Remote control…" />
|
||||
<ListItemText primary="Удалённое управление…" />
|
||||
</MenuItem>
|
||||
<Divider />
|
||||
<MenuItem
|
||||
@@ -797,35 +820,20 @@ const AudioPlayer = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">stop</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Stop" />
|
||||
<ListItemText primary="Остановить" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
{display && (
|
||||
<audio
|
||||
autoPlay
|
||||
src={url}
|
||||
ref={audioRef}
|
||||
key={item?.Id ?? "noItem"}
|
||||
onTimeUpdate={handleTimeUpdate}
|
||||
onEnded={handleEnded}
|
||||
onPlay={onPlay}
|
||||
onPause={onPause}
|
||||
onSeeked={updatePositionState}
|
||||
onLoadedMetadata={(event) => {
|
||||
const player = event.currentTarget;
|
||||
if (!seekAppliedRef.current && startTimeTicks > 0) {
|
||||
seekAppliedRef.current = true;
|
||||
player.currentTime = ticksToSec(startTimeTicks);
|
||||
}
|
||||
updatePositionState();
|
||||
}}
|
||||
id="audio-player"
|
||||
/>
|
||||
)}
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
{audioElement}
|
||||
{barVisible && !isFullPlayer && bar}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default AudioPlayer;
|
||||
@@ -29,20 +29,20 @@ const ErrorDisplay = ({ error, onRetry, onExit }: ErrorDisplayProps) => {
|
||||
}}
|
||||
>
|
||||
<Typography variant="h5" color="error">
|
||||
Playback Error
|
||||
Ошибка воспроизведения
|
||||
</Typography>
|
||||
<Typography variant="body1">
|
||||
{error.message || "An unknown error occurred during playback."}
|
||||
{error.message || "Во время воспроизведения произошла неизвестная ошибка."}
|
||||
</Typography>
|
||||
<div style={{ display: "flex", gap: "1rem" }}>
|
||||
{onRetry && (
|
||||
<Button variant="contained" color="primary" onClick={onRetry}>
|
||||
Retry
|
||||
Повторить
|
||||
</Button>
|
||||
)}
|
||||
{onExit && (
|
||||
<Button variant="outlined" color="secondary" onClick={onExit}>
|
||||
Exit
|
||||
Выйти
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -115,7 +115,7 @@ const StatsForNerds = ({ playerRef }: StatsForNerdsProps) => {
|
||||
fontWeight: "bold",
|
||||
}}
|
||||
>
|
||||
Stats for Nerds
|
||||
Статистика
|
||||
</Typography>
|
||||
<IconButton
|
||||
size="small"
|
||||
@@ -138,29 +138,29 @@ const StatsForNerds = ({ playerRef }: StatsForNerdsProps) => {
|
||||
gap: "0.5em 1em",
|
||||
}}
|
||||
>
|
||||
<span>Video ID:</span> <span>{itemId}</span>
|
||||
<span>Media Source ID:</span> <span>{mediaSourceId}</span>
|
||||
<span>Play Session ID:</span> <span>{playsessionId}</span>
|
||||
<span>Playback Method:</span> <span>{mediaSource.playMethod}</span>
|
||||
<span>Container:</span> <span>{mediaSource.container}</span>
|
||||
<span>Video Codec:</span> <span>{mediaSource.videoCodec}</span>
|
||||
<span>Audio Codec:</span> <span>{mediaSource.audioCodec}</span>
|
||||
<span>Bitrate:</span>{" "}
|
||||
<span>ID видео:</span> <span>{itemId}</span>
|
||||
<span>ID источника:</span> <span>{mediaSourceId}</span>
|
||||
<span>ID сеанса:</span> <span>{playsessionId}</span>
|
||||
<span>Метод воспроизведения:</span> <span>{mediaSource.playMethod}</span>
|
||||
<span>Контейнер:</span> <span>{mediaSource.container}</span>
|
||||
<span>Видеокодек:</span> <span>{mediaSource.videoCodec}</span>
|
||||
<span>Аудиокодек:</span> <span>{mediaSource.audioCodec}</span>
|
||||
<span>Битрейт:</span>{" "}
|
||||
<span>
|
||||
{mediaSource.bitrate
|
||||
? `${(mediaSource.bitrate / 1000000).toFixed(2)} Mbps`
|
||||
: "-"}
|
||||
</span>
|
||||
<span>Stream URL:</span>{" "}
|
||||
<span>URL потока:</span>{" "}
|
||||
<span style={{ wordBreak: "break-all" }}>{playbackStream}</span>
|
||||
<span>Resolution:</span> <span>{videoStats.resolution}</span>
|
||||
<span>Volume:</span> <span>{Math.round(volume * 100)}%</span>
|
||||
<span>Buffer Health:</span> <span>{videoStats.buffered}</span>
|
||||
<span>Dropped Frames:</span>{" "}
|
||||
<span>Разрешение:</span> <span>{videoStats.resolution}</span>
|
||||
<span>Громкость:</span> <span>{Math.round(volume * 100)}%</span>
|
||||
<span>Буфер:</span> <span>{videoStats.buffered}</span>
|
||||
<span>Пропущенные кадры:</span>{" "}
|
||||
<span>
|
||||
{videoStats.droppedFrames} / {videoStats.totalFrames}
|
||||
</span>
|
||||
<span>Is Buffering:</span> <span>{isBuffering ? "Yes" : "No"}</span>
|
||||
<span>Буферизация:</span> <span>{isBuffering ? "Да" : "Нет"}</span>
|
||||
</div>
|
||||
</Paper>
|
||||
);
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
import { IconButton, Tooltip } from "@mui/material";
|
||||
import { useSnackbar } from "notistack";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import {
|
||||
getPlayerVideoElement,
|
||||
isPictureInPictureActive,
|
||||
supportsPictureInPicture,
|
||||
togglePictureInPicture,
|
||||
} from "@/utils/methods/pictureInPicture";
|
||||
import { usePlaybackStore } from "@/utils/store/playback";
|
||||
|
||||
const PictureInPictureButton = () => {
|
||||
const playsessionId = usePlaybackStore((state) => state.playsessionId);
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
const [supported, setSupported] = useState(() => supportsPictureInPicture());
|
||||
const [active, setActive] = useState(false);
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
const update = () => {
|
||||
const currentVideo = getPlayerVideoElement();
|
||||
if (currentVideo) {
|
||||
setSupported(supportsPictureInPicture(currentVideo));
|
||||
}
|
||||
setActive(currentVideo ? isPictureInPictureActive(currentVideo) : false);
|
||||
};
|
||||
|
||||
const video = getPlayerVideoElement();
|
||||
if (video) {
|
||||
setSupported(supportsPictureInPicture(video));
|
||||
setActive(isPictureInPictureActive(video));
|
||||
}
|
||||
|
||||
document.addEventListener("enterpictureinpicture", update, true);
|
||||
document.addEventListener("leavepictureinpicture", update, true);
|
||||
document.addEventListener("webkitpresentationmodechanged", update, true);
|
||||
const interval = window.setInterval(update, 1000);
|
||||
|
||||
return () => {
|
||||
window.clearInterval(interval);
|
||||
document.removeEventListener("enterpictureinpicture", update, true);
|
||||
document.removeEventListener("leavepictureinpicture", update, true);
|
||||
document.removeEventListener(
|
||||
"webkitpresentationmodechanged",
|
||||
update,
|
||||
true,
|
||||
);
|
||||
};
|
||||
}, [playsessionId]);
|
||||
|
||||
if (!supported) return null;
|
||||
|
||||
const label = active ? "Выйти из картинки в картинке" : "Картинка в картинке";
|
||||
|
||||
const handleClick = async () => {
|
||||
const video = getPlayerVideoElement();
|
||||
if (!video) {
|
||||
enqueueSnackbar("Видео ещё не готово", { variant: "info" });
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
setBusy(true);
|
||||
await togglePictureInPicture(video);
|
||||
setActive(isPictureInPictureActive(video));
|
||||
} catch (error) {
|
||||
console.error("Picture-in-picture failed", error);
|
||||
enqueueSnackbar("Не удалось включить картинку в картинке", {
|
||||
variant: "error",
|
||||
});
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Tooltip title={label}>
|
||||
<span>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
disabled={busy}
|
||||
aria-label={label}
|
||||
title={label}
|
||||
>
|
||||
<span className="material-symbols-rounded fill">
|
||||
{active ? "picture_in_picture" : "picture_in_picture_alt"}
|
||||
</span>
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
export default PictureInPictureButton;
|
||||
@@ -35,7 +35,7 @@ const SkipSegmentButton = () => {
|
||||
currentSegmentIndex >= 0 &&
|
||||
activeSegmentId &&
|
||||
(segmentType !== "Outro" || !hasNextItem);
|
||||
const label = segmentType === "Outro" ? "Skip credits" : `Skip ${segmentType}`;
|
||||
const label = segmentType === "Outro" ? "Пропустить титры" : segmentType === "Intro" ? "Пропустить интро" : segmentType === "Recap" ? "Пропустить рекап" : segmentType === "Commercial" ? "Пропустить рекламу" : segmentType === "Preview" ? "Пропустить превью" : "Пропустить";
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
import {
|
||||
IconButton,
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Tooltip,
|
||||
} from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import type { VideoFitMode } from "@/utils/types/videoFitMode";
|
||||
|
||||
const OPTIONS: Array<{
|
||||
value: VideoFitMode;
|
||||
label: string;
|
||||
icon: string;
|
||||
hint: string;
|
||||
}> = [
|
||||
{
|
||||
value: "fit",
|
||||
label: "По размеру",
|
||||
icon: "fit_screen",
|
||||
hint: "Вписать видео целиком",
|
||||
},
|
||||
{
|
||||
value: "fill",
|
||||
label: "Заполнить экран",
|
||||
icon: "zoom_out_map",
|
||||
hint: "Убрать полосы, обрезав края",
|
||||
},
|
||||
{
|
||||
value: "stretch",
|
||||
label: "Растянуть",
|
||||
icon: "aspect_ratio",
|
||||
hint: "Растянуть на весь экран",
|
||||
},
|
||||
];
|
||||
|
||||
type VideoFitButtonProps = {
|
||||
mode: VideoFitMode;
|
||||
onChange: (mode: VideoFitMode) => void;
|
||||
};
|
||||
|
||||
const VideoFitButton = ({ mode, onChange }: VideoFitButtonProps) => {
|
||||
const [anchor, setAnchor] = useState<HTMLButtonElement | null>(null);
|
||||
const current = OPTIONS.find((option) => option.value === mode) ?? OPTIONS[0];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title={`Режим изображения: ${current.label}`}>
|
||||
<IconButton
|
||||
onClick={(event) => setAnchor(event.currentTarget)}
|
||||
aria-label="Режим изображения"
|
||||
>
|
||||
<span className="material-symbols-rounded">aspect_ratio</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<Menu
|
||||
anchorEl={anchor}
|
||||
open={Boolean(anchor)}
|
||||
onClose={() => setAnchor(null)}
|
||||
anchorOrigin={{ vertical: "top", horizontal: "center" }}
|
||||
transformOrigin={{ vertical: "bottom", horizontal: "center" }}
|
||||
slotProps={{ paper: { className: "glass-menu-paper" } }}
|
||||
>
|
||||
{OPTIONS.map((option) => (
|
||||
<MenuItem
|
||||
key={option.value}
|
||||
selected={option.value === mode}
|
||||
onClick={() => {
|
||||
onChange(option.value);
|
||||
setAnchor(null);
|
||||
}}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">{option.icon}</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText primary={option.label} secondary={option.hint} />
|
||||
{option.value === mode && (
|
||||
<span
|
||||
className="material-symbols-rounded"
|
||||
style={{ marginLeft: "1em" }}
|
||||
>
|
||||
check
|
||||
</span>
|
||||
)}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default VideoFitButton;
|
||||
@@ -1,10 +1,34 @@
|
||||
.video-player {
|
||||
--media-object-fit: contain;
|
||||
|
||||
background: black;
|
||||
position: absolute;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
video {
|
||||
object-fit: var(--media-object-fit);
|
||||
}
|
||||
|
||||
&.video-fit-fill {
|
||||
--media-object-fit: cover;
|
||||
}
|
||||
|
||||
&.video-fit-stretch {
|
||||
--media-object-fit: fill;
|
||||
}
|
||||
|
||||
&-drag-region {
|
||||
position: absolute;
|
||||
inset: 0 0 auto;
|
||||
height: 38px;
|
||||
z-index: 4;
|
||||
cursor: default;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&-osd {
|
||||
position: absolute;
|
||||
width: 100vw;
|
||||
@@ -27,6 +51,29 @@
|
||||
&.hovering {
|
||||
cursor: default;
|
||||
}
|
||||
&-back,
|
||||
&-actions {
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
z-index: 3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.3em;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgb(255 255 255 / 0.08);
|
||||
background: rgb(0 0 0 / 0.28);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
&-back {
|
||||
left: 3em;
|
||||
}
|
||||
&-actions {
|
||||
right: 3em;
|
||||
gap: 0.35em;
|
||||
}
|
||||
&-info {
|
||||
margin-top: auto;
|
||||
}
|
||||
&-controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -17,19 +17,23 @@ import QueueButton from "@/components/buttons/queueButton";
|
||||
import BubbleSlider from "@/components/playback/videoPlayer/bubbleSlider";
|
||||
import { secToTicks, ticksToSec } from "@/utils/date/time";
|
||||
import { buildPlayDeepLink } from "@/utils/deepLinks";
|
||||
import { getPlayerVideoElement } from "@/utils/methods/pictureInPicture";
|
||||
import { openSyncPlayDialog } from "@/utils/methods/syncPlay";
|
||||
import { useApiInContext } from "@/utils/store/api";
|
||||
import { useShareStore } from "@/utils/store/share";
|
||||
import { usePlaybackStore } from "@/utils/store/playback";
|
||||
import useSyncPlayback from "@/utils/store/syncPlayback";
|
||||
import type { VideoFitMode } from "@/utils/types/videoFitMode";
|
||||
import CaptionsButton from "./buttons/CaptionsButton";
|
||||
import ChaptersListButton from "./buttons/ChaptersListButton";
|
||||
import ForwardButton from "./buttons/ForwardButton";
|
||||
import FullscreenButton from "./buttons/FullscreenButton";
|
||||
import NextChapterButton from "./buttons/NextChapterButton";
|
||||
import PictureInPictureButton from "./buttons/PictureInPictureButton";
|
||||
import PlayPauseButton from "./buttons/PlayPauseButton";
|
||||
import PrevChapterButton from "./buttons/PrevChapterButton";
|
||||
import RewindButton from "./buttons/RewindButton";
|
||||
import VideoFitButton from "./buttons/VideoFitButton";
|
||||
import EndsAtDisplay from "./EndsAtDisplay";
|
||||
import VideoPlayerSettingsMenu from "./settingsMenu";
|
||||
|
||||
@@ -48,12 +52,16 @@ type VideoPlayerControlsProps = {
|
||||
// isVisible: boolean;
|
||||
onHover?: (event: MouseEvent<HTMLDivElement>) => void;
|
||||
onLeave?: (event: MouseEvent<HTMLDivElement>) => void;
|
||||
fitMode: VideoFitMode;
|
||||
onFitModeChange: (mode: VideoFitMode) => void;
|
||||
};
|
||||
|
||||
const VideoPlayerControls = ({
|
||||
// isVisible,
|
||||
onHover,
|
||||
onLeave,
|
||||
fitMode,
|
||||
onFitModeChange,
|
||||
}: VideoPlayerControlsProps) => {
|
||||
const playerOSDRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -145,6 +153,69 @@ const VideoPlayerControls = ({
|
||||
|
||||
const [settingsMenuRef, setSettingsMenuRef] =
|
||||
useState<HTMLButtonElement | null>(null);
|
||||
const [videoFrame, setVideoFrame] = useState<{
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
} | null>(null);
|
||||
|
||||
// Keep the back button and the top action buttons on one line inside the
|
||||
// visible video area, below any letterbox bars.
|
||||
useEffect(() => {
|
||||
let frame = 0;
|
||||
const update = () => {
|
||||
const video = getPlayerVideoElement();
|
||||
if (!video) return;
|
||||
|
||||
const rect = video.getBoundingClientRect();
|
||||
const ratio =
|
||||
video.videoWidth > 0 && video.videoHeight > 0
|
||||
? video.videoWidth / video.videoHeight
|
||||
: null;
|
||||
const contentWidth = ratio
|
||||
? Math.min(rect.width, rect.height * ratio)
|
||||
: rect.width;
|
||||
const contentHeight = ratio ? contentWidth / ratio : rect.height;
|
||||
const contentLeft = rect.left + (rect.width - contentWidth) / 2;
|
||||
const contentTop = rect.top + (rect.height - contentHeight) / 2;
|
||||
|
||||
setVideoFrame((current) => {
|
||||
const next = {
|
||||
// 14% keeps the controls inside the picture even when the
|
||||
// file has letterbox bars baked into a 16:9 frame.
|
||||
top: Math.round(
|
||||
contentTop + Math.max(28, contentHeight * 0.14),
|
||||
),
|
||||
left: Math.round(contentLeft + 24),
|
||||
right: Math.round(
|
||||
window.innerWidth - contentLeft - contentWidth + 24,
|
||||
),
|
||||
};
|
||||
return current?.top === next.top &&
|
||||
current?.left === next.left &&
|
||||
current?.right === next.right
|
||||
? current
|
||||
: next;
|
||||
});
|
||||
};
|
||||
const schedule = () => {
|
||||
cancelAnimationFrame(frame);
|
||||
frame = requestAnimationFrame(update);
|
||||
};
|
||||
|
||||
schedule();
|
||||
const video = getPlayerVideoElement();
|
||||
video?.addEventListener("loadedmetadata", schedule);
|
||||
window.addEventListener("resize", schedule);
|
||||
const interval = window.setInterval(schedule, 1000);
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(frame);
|
||||
window.clearInterval(interval);
|
||||
video?.removeEventListener("loadedmetadata", schedule);
|
||||
window.removeEventListener("resize", schedule);
|
||||
};
|
||||
}, [playsessionId]);
|
||||
|
||||
// const creditInfo = mediaSegments?.Items?.find(
|
||||
// (segment) => segment.Type === "Outro",
|
||||
@@ -229,14 +300,30 @@ const VideoPlayerControls = ({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="video-player-osd-header flex flex-justify-spaced-between flex-align-center">
|
||||
<div
|
||||
className="video-player-osd-back"
|
||||
style={
|
||||
videoFrame
|
||||
? { top: videoFrame.top, left: videoFrame.left }
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<IconButton
|
||||
onClick={handleExitPlayer}
|
||||
aria-label="Exit player"
|
||||
title="Exit player"
|
||||
aria-label="Выйти из плеера"
|
||||
title="Выйти из плеера"
|
||||
>
|
||||
<span className="material-symbols-rounded">arrow_back</span>
|
||||
</IconButton>
|
||||
</div>
|
||||
<div
|
||||
className="video-player-osd-actions"
|
||||
style={
|
||||
videoFrame
|
||||
? { top: videoFrame.top, right: videoFrame.right }
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<IconButton
|
||||
onClick={() =>
|
||||
useShareStore
|
||||
@@ -246,25 +333,25 @@ const VideoPlayerControls = ({
|
||||
itemId ?? "",
|
||||
currentTime > 0 ? ticksToSec(currentTime) : getCurrentTime(),
|
||||
),
|
||||
"Share this scene",
|
||||
"Поделиться этой сценой",
|
||||
)
|
||||
}
|
||||
aria-label="Share scene"
|
||||
title="Share scene"
|
||||
aria-label="Поделиться сценой"
|
||||
title="Поделиться сценой"
|
||||
>
|
||||
<span className="material-symbols-rounded">share</span>
|
||||
</IconButton>
|
||||
<IconButton
|
||||
onClick={openSyncPlayDialog}
|
||||
aria-label="Watch together"
|
||||
title="Watch together"
|
||||
aria-label="Смотреть вместе"
|
||||
title="Смотреть вместе"
|
||||
>
|
||||
<span className="material-symbols-rounded">groups</span>
|
||||
</IconButton>
|
||||
<IconButton
|
||||
onClick={(e) => setSettingsMenuRef(e.currentTarget)}
|
||||
aria-label="Player settings"
|
||||
title="Player settings"
|
||||
aria-label="Настройки плеера"
|
||||
title="Настройки плеера"
|
||||
>
|
||||
<span className="material-symbols-rounded">settings</span>
|
||||
</IconButton>
|
||||
@@ -372,10 +459,10 @@ const VideoPlayerControls = ({
|
||||
})}
|
||||
/>
|
||||
<Tooltip
|
||||
title={syncThisVideo ? "Stop device sync" : "Sync playback"}
|
||||
title={syncThisVideo ? "Остановить синхронизацию" : "Синхронизация воспроизведения"}
|
||||
>
|
||||
<IconButton
|
||||
aria-label="Sync playback"
|
||||
aria-label="Синхронизация воспроизведения"
|
||||
onClick={toggleSync}
|
||||
sx={
|
||||
syncThisVideo
|
||||
@@ -390,7 +477,9 @@ const VideoPlayerControls = ({
|
||||
|
||||
<ChaptersListButton />
|
||||
|
||||
<VideoFitButton mode={fitMode} onChange={onFitModeChange} />
|
||||
<CaptionsButton />
|
||||
<PictureInPictureButton />
|
||||
<FullscreenButton />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -156,7 +156,7 @@ const VideoPlayerSettingsMenu = ({
|
||||
>
|
||||
<TextField
|
||||
select
|
||||
label="Audio"
|
||||
label="Аудио"
|
||||
variant="outlined"
|
||||
value={mediaSource.audio?.track}
|
||||
onChange={handleAudioTrackChange}
|
||||
@@ -171,7 +171,7 @@ const VideoPlayerSettingsMenu = ({
|
||||
</TextField>
|
||||
<TextField
|
||||
select
|
||||
label="Subtitles"
|
||||
label="Субтитры"
|
||||
variant="outlined"
|
||||
value={mediaSource.subtitle?.track}
|
||||
onChange={handleSubtitleChange}
|
||||
@@ -179,7 +179,7 @@ const VideoPlayerSettingsMenu = ({
|
||||
disabled={mediaSource.subtitle?.track === -2 || subtitleIsChanging}
|
||||
>
|
||||
<MenuItem key={-1} value={-1}>
|
||||
No Subtitle
|
||||
Без субтитров
|
||||
</MenuItem>
|
||||
{mediaSource.subtitle?.allTracks?.map((sub) => (
|
||||
<MenuItem key={sub.Index} value={sub.Index}>
|
||||
@@ -194,7 +194,7 @@ const VideoPlayerSettingsMenu = ({
|
||||
flexGrow: 1,
|
||||
}}
|
||||
>
|
||||
Stats for Nerds
|
||||
Статистика
|
||||
</Typography>
|
||||
<Switch checked={showStatsForNerds} />
|
||||
</MenuItem>
|
||||
@@ -204,7 +204,7 @@ const VideoPlayerSettingsMenu = ({
|
||||
flexGrow: 1,
|
||||
}}
|
||||
>
|
||||
Sync playback
|
||||
Синхронизация воспроизведения
|
||||
</Typography>
|
||||
<Switch
|
||||
checked={syncForThisVideo}
|
||||
@@ -219,7 +219,7 @@ const VideoPlayerSettingsMenu = ({
|
||||
flexGrow: 1,
|
||||
}}
|
||||
>
|
||||
Auto-skip intro & recap
|
||||
Автопропуск заставок, рекапов, рекламы и превью
|
||||
</Typography>
|
||||
<Switch
|
||||
checked={autoSkip}
|
||||
|
||||
@@ -106,7 +106,7 @@ const UpNextFlyout = () => {
|
||||
quality: 90,
|
||||
fillWidth: 320,
|
||||
})}
|
||||
alt="next item thumbnail"
|
||||
alt="Миниатюра следующего элемента"
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
@@ -142,7 +142,7 @@ const UpNextFlyout = () => {
|
||||
letterSpacing: 1.2,
|
||||
}}
|
||||
>
|
||||
UP NEXT
|
||||
ДАЛЕЕ
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="h6"
|
||||
@@ -192,7 +192,7 @@ const UpNextFlyout = () => {
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
Play Now
|
||||
Смотреть
|
||||
</Button>
|
||||
<IconButton
|
||||
onClick={() => setIsHidden(true)}
|
||||
|
||||
@@ -35,7 +35,7 @@ const QRCodeImage = ({
|
||||
return (
|
||||
<img
|
||||
src={src}
|
||||
alt="QR code"
|
||||
alt="QR-код"
|
||||
width={size}
|
||||
height={size}
|
||||
style={{ display: "block", borderRadius: 12 }}
|
||||
|
||||
@@ -14,14 +14,14 @@ export const getQueueItemText = (item: BaseItemDto) => {
|
||||
? `E${item.IndexNumber}-${item.IndexNumberEnd}`
|
||||
: `E${item.IndexNumber}`;
|
||||
return {
|
||||
title: item.Name ?? "Unknown episode",
|
||||
title: item.Name ?? "Неизвестная серия",
|
||||
subtitle: [item.SeriesName, `S${item.ParentIndexNumber}:${episode}`]
|
||||
.filter(Boolean)
|
||||
.join(" · "),
|
||||
};
|
||||
}
|
||||
return {
|
||||
title: item.Name ?? "Unknown track",
|
||||
title: item.Name ?? "Неизвестный трек",
|
||||
subtitle: item.Artists?.join(", ") || item.AlbumArtist || "",
|
||||
};
|
||||
};
|
||||
@@ -122,7 +122,7 @@ export const QueueRow = React.forwardRef<
|
||||
{item.RunTimeTicks ? getRuntimeMusic(item.RunTimeTicks) : ""}
|
||||
</span>
|
||||
{onRemove && (
|
||||
<Tooltip title="Remove from queue">
|
||||
<Tooltip title="Удалить из очереди">
|
||||
<IconButton
|
||||
size="small"
|
||||
className="queue-row-remove"
|
||||
|
||||
@@ -81,7 +81,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
const remove = (item: BaseItemDto, index: number) => {
|
||||
removeFromQueue(index);
|
||||
const { title } = getQueueItemText(item);
|
||||
enqueueSnackbar(`Removed "${title}"`, {
|
||||
enqueueSnackbar(`«${title}» удалён`, {
|
||||
variant: "default",
|
||||
action: (key) => (
|
||||
<Button
|
||||
@@ -92,7 +92,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
closeSnackbar(key);
|
||||
}}
|
||||
>
|
||||
Undo
|
||||
Отменить
|
||||
</Button>
|
||||
),
|
||||
});
|
||||
@@ -101,7 +101,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
const clearAll = () => {
|
||||
const removed = upcoming;
|
||||
clearUpcoming();
|
||||
enqueueSnackbar(`Cleared ${removed.length} tracks from up next`, {
|
||||
enqueueSnackbar(`Очищено треков из очереди: ${removed.length}`, {
|
||||
action: (key) => (
|
||||
<Button
|
||||
color="inherit"
|
||||
@@ -115,7 +115,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
closeSnackbar(key);
|
||||
}}
|
||||
>
|
||||
Undo
|
||||
Отменить
|
||||
</Button>
|
||||
),
|
||||
});
|
||||
@@ -135,35 +135,35 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
const summary =
|
||||
upcoming.length > 0
|
||||
? `${upcoming.length} ${upcoming.length === 1 ? "track" : "tracks"} · ${getRuntimeCompact(upcomingTicks)}`
|
||||
: "Nothing queued";
|
||||
: "Очередь пуста";
|
||||
|
||||
return (
|
||||
<div className={`queue queue-${variant}`}>
|
||||
<header className="queue-header">
|
||||
<div className="queue-header-text">
|
||||
<h2 className="queue-title">
|
||||
{variant === "drawer" ? "Queue" : "Up next"}
|
||||
{variant === "drawer" ? "Очередь" : "Далее"}
|
||||
</h2>
|
||||
<span className="queue-summary">{summary}</span>
|
||||
</div>
|
||||
<div className="queue-header-actions">
|
||||
<Tooltip title="Shuffle up next">
|
||||
<Tooltip title="Перемешать очередь">
|
||||
<span>
|
||||
<IconButton
|
||||
onClick={shuffleUpcoming}
|
||||
disabled={upcoming.length < 2}
|
||||
aria-label="Shuffle up next"
|
||||
aria-label="Перемешать очередь"
|
||||
>
|
||||
<span className="material-symbols-rounded">shuffle</span>
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip title="Clear up next">
|
||||
<Tooltip title="Очистить очередь">
|
||||
<span>
|
||||
<IconButton
|
||||
onClick={clearAll}
|
||||
disabled={upcoming.length === 0}
|
||||
aria-label="Clear up next"
|
||||
aria-label="Очистить очередь"
|
||||
>
|
||||
<span className="material-symbols-rounded">
|
||||
playlist_remove
|
||||
@@ -172,7 +172,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
</span>
|
||||
</Tooltip>
|
||||
{onClose && (
|
||||
<IconButton onClick={onClose} aria-label="Close queue">
|
||||
<IconButton onClick={onClose} aria-label="Закрыть очередь">
|
||||
<span className="material-symbols-rounded">close</span>
|
||||
</IconButton>
|
||||
)}
|
||||
@@ -182,14 +182,14 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
<div className="queue-body">
|
||||
{variant === "drawer" && current && (
|
||||
<section className="queue-section">
|
||||
<h3 className="queue-section-label">Now playing</h3>
|
||||
<h3 className="queue-section-label">Сейчас играет</h3>
|
||||
<QueueRow item={current} variant="current" />
|
||||
</section>
|
||||
)}
|
||||
|
||||
<section className="queue-section">
|
||||
{variant === "drawer" && (
|
||||
<h3 className="queue-section-label">Up next</h3>
|
||||
<h3 className="queue-section-label">Далее</h3>
|
||||
)}
|
||||
{upcoming.length > 0 ? (
|
||||
<>
|
||||
@@ -219,7 +219,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
</SortableContext>
|
||||
</DndContext>
|
||||
<p className="queue-hint">
|
||||
Click a track to play it now · drag to reorder
|
||||
Нажмите на трек, чтобы включить его, перетащите для сортировки
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
@@ -227,9 +227,9 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
<span className="material-symbols-rounded queue-empty-icon">
|
||||
queue_music
|
||||
</span>
|
||||
<span className="queue-empty-title">Nothing up next</span>
|
||||
<span className="queue-empty-title">Очередь пуста</span>
|
||||
<span className="queue-empty-text">
|
||||
Play an album, playlist or artist to fill the queue.
|
||||
Включите альбом, плейлист или исполнителя, чтобы заполнить очередь.
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -244,7 +244,7 @@ const QueueView = ({ variant, onClose }: QueueViewProps) => {
|
||||
aria-expanded={showHistory}
|
||||
>
|
||||
<span className="queue-section-label">
|
||||
Previously played · {history.length}
|
||||
Ранее играло · {history.length}
|
||||
</span>
|
||||
<span className="material-symbols-rounded">
|
||||
{showHistory ? "expand_less" : "expand_more"}
|
||||
|
||||
@@ -41,12 +41,12 @@ const QuickConnectApprovalDialog = () => {
|
||||
|
||||
const approve = async () => {
|
||||
if (!api || !user?.Id) {
|
||||
setError("Sign in before approving another device");
|
||||
setError("Войдите, чтобы подтвердить другое устройство");
|
||||
return;
|
||||
}
|
||||
const trimmed = code.trim().toUpperCase();
|
||||
if (!trimmed) {
|
||||
setError("Enter the code shown on the other device");
|
||||
setError("Введите код, показанный на другом устройстве");
|
||||
return;
|
||||
}
|
||||
setBusy(true);
|
||||
@@ -59,14 +59,14 @@ const QuickConnectApprovalDialog = () => {
|
||||
if (result.data) {
|
||||
setApproved(true);
|
||||
setStoreCode("");
|
||||
enqueueSnackbar("Device approved", { variant: "success" });
|
||||
enqueueSnackbar("Устройство подтверждено", { variant: "success" });
|
||||
setTimeout(close, 1200);
|
||||
} else {
|
||||
setError("This code is invalid or has expired");
|
||||
setError("Код недействителен или истёк");
|
||||
}
|
||||
} catch (reason) {
|
||||
console.error("Quick Connect approval failed", reason);
|
||||
setError("This code is invalid or has expired");
|
||||
setError("Код недействителен или истёк");
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
@@ -82,18 +82,18 @@ const QuickConnectApprovalDialog = () => {
|
||||
paper: { className: "glass", sx: { borderRadius: "22px" } },
|
||||
}}
|
||||
>
|
||||
<DialogTitle>Approve TV login</DialogTitle>
|
||||
<DialogTitle>Подтвердить вход на ТВ</DialogTitle>
|
||||
<DialogContent>
|
||||
<Stack spacing={2}>
|
||||
<Typography variant="body2" sx={{ opacity: 0.75 }}>
|
||||
Enter the Quick Connect code shown on the TV or another device. This
|
||||
signs that device in as {user?.Name ?? "your account"} without
|
||||
typing a password on it.
|
||||
Введите код Quick Connect, показанный на ТВ или другом устройстве. Это
|
||||
выполнит вход в аккаунт {user?.Name ?? "ваш аккаунт"} без ввода пароля
|
||||
на этом устройстве.
|
||||
</Typography>
|
||||
<TextField
|
||||
autoFocus
|
||||
fullWidth
|
||||
label="Quick Connect code"
|
||||
label="Код Quick Connect"
|
||||
value={code}
|
||||
onChange={(event) =>
|
||||
setCode(event.target.value.replace(/\s/g, "").toUpperCase())
|
||||
@@ -113,17 +113,17 @@ const QuickConnectApprovalDialog = () => {
|
||||
}}
|
||||
/>
|
||||
{error && <Alert severity="error">{error}</Alert>}
|
||||
{approved && <Alert severity="success">Device approved</Alert>}
|
||||
{approved && <Alert severity="success">Устройство подтверждено</Alert>}
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={close}>Cancel</Button>
|
||||
<Button onClick={close}>Отмена</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={approve}
|
||||
disabled={busy || approved || !code.trim()}
|
||||
>
|
||||
{busy ? "Approving…" : "Approve"}
|
||||
{busy ? "Подтверждение…" : "Подтвердить"}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
@@ -215,7 +215,7 @@ const RealtimeBridge = () => {
|
||||
case GeneralCommandType.DisplayMessage:
|
||||
enqueueSnackbar(
|
||||
[args?.Header, args?.Text].filter(Boolean).join(": ") ||
|
||||
"Message from the server",
|
||||
"Сообщение с сервера",
|
||||
{
|
||||
variant: "info",
|
||||
autoHideDuration: Number(args?.TimeoutMs) || 5000,
|
||||
@@ -266,7 +266,7 @@ const RealtimeBridge = () => {
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Remote play failed", error);
|
||||
enqueueSnackbar("Could not start remote playback", {
|
||||
enqueueSnackbar("Не удалось запустить удалённое воспроизведение", {
|
||||
variant: "error",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ const formatTime = (ticks: number | null | undefined) => {
|
||||
};
|
||||
|
||||
const sessionLabel = (session: SessionInfoDto) =>
|
||||
session.DeviceName || session.Client || session.DeviceId || "Unknown device";
|
||||
session.DeviceName || session.Client || session.DeviceId || "Неизвестное устройство";
|
||||
|
||||
const RemoteControlDialog = () => {
|
||||
const { open, transfer, closeDialog } = useRemoteControlStore();
|
||||
@@ -87,7 +87,7 @@ const RemoteControlDialog = () => {
|
||||
});
|
||||
},
|
||||
onError: () =>
|
||||
enqueueSnackbar("Command failed", { variant: "error" }),
|
||||
enqueueSnackbar("Команда не выполнена", { variant: "error" }),
|
||||
onSettled: () => sessions.refetch(),
|
||||
});
|
||||
|
||||
@@ -105,8 +105,8 @@ const RemoteControlDialog = () => {
|
||||
onSuccess: async (_data, session) => {
|
||||
enqueueSnackbar(
|
||||
transfer?.kind === "audio" || transfer?.kind === "video"
|
||||
? `Playback transferred to ${sessionLabel(session)}`
|
||||
: `Playing on ${sessionLabel(session)}`,
|
||||
? `Воспроизведение перенесено на ${sessionLabel(session)}`
|
||||
: `Воспроизведение на ${sessionLabel(session)}`,
|
||||
{ variant: "success" },
|
||||
);
|
||||
if (transfer?.kind === "audio") {
|
||||
@@ -144,7 +144,7 @@ const RemoteControlDialog = () => {
|
||||
closeDialog();
|
||||
},
|
||||
onError: () =>
|
||||
enqueueSnackbar("Could not start playback on the device", {
|
||||
enqueueSnackbar("Не удалось запустить воспроизведение на устройстве", {
|
||||
variant: "error",
|
||||
}),
|
||||
});
|
||||
@@ -184,16 +184,16 @@ const RemoteControlDialog = () => {
|
||||
<DialogTitle sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
||||
<span className="material-symbols-rounded">cast</span>
|
||||
<span style={{ flex: 1 }}>
|
||||
{item ? `Play "${item.Name}" on…` : "Remote control"}
|
||||
{item ? `Воспроизвести «${item.Name}» на…` : "Удалённое управление"}
|
||||
</span>
|
||||
<IconButton onClick={closeDialog} aria-label="Close">
|
||||
<IconButton onClick={closeDialog} aria-label="Закрыть">
|
||||
<span className="material-symbols-rounded">close</span>
|
||||
</IconButton>
|
||||
</DialogTitle>
|
||||
<DialogContent sx={{ pb: 2 }}>
|
||||
{item && (
|
||||
<Typography variant="body2" sx={{ opacity: 0.7, mb: 1 }}>
|
||||
Choose a device to start playback on it.
|
||||
Выберите устройство для запуска воспроизведения.
|
||||
</Typography>
|
||||
)}
|
||||
{sessions.isPending ? (
|
||||
@@ -202,8 +202,8 @@ const RemoteControlDialog = () => {
|
||||
</div>
|
||||
) : remoteSessions.length === 0 ? (
|
||||
<Typography sx={{ opacity: 0.7, py: 2 }}>
|
||||
No other controllable devices are online. Open a Jellyfin client
|
||||
(e.g. on your TV) and make sure remote control is allowed.
|
||||
Нет доступных устройств. Откройте клиент Jellyfin (например, на ТВ)
|
||||
и разрешите удалённое управление.
|
||||
</Typography>
|
||||
) : (
|
||||
<List disablePadding>
|
||||
@@ -252,8 +252,8 @@ const RemoteControlDialog = () => {
|
||||
color="warning.main"
|
||||
sx={{ display: "block" }}
|
||||
>
|
||||
No active control channel (WebSocket) — check the
|
||||
reverse proxy.
|
||||
Нет канала управления (WebSocket) — проверьте
|
||||
обратный прокси.
|
||||
</Typography>
|
||||
)}
|
||||
</div>
|
||||
@@ -264,7 +264,7 @@ const RemoteControlDialog = () => {
|
||||
disabled={playOn.isPending || !item.Id}
|
||||
onClick={() => playOn.mutate(session)}
|
||||
>
|
||||
Play here
|
||||
Смотреть здесь
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
@@ -300,10 +300,10 @@ const RemoteControlDialog = () => {
|
||||
>
|
||||
<Typography variant="caption" sx={{ opacity: 0.6 }}>
|
||||
{formatTime(position)} / {formatTime(duration)}
|
||||
{playState?.IsPaused ? " · paused" : ""}
|
||||
{playState?.IsPaused ? " · пауза" : ""}
|
||||
</Typography>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Tooltip title="Back 10s">
|
||||
<Tooltip title="Назад на 10 с">
|
||||
<span>
|
||||
<IconButton
|
||||
size="small"
|
||||
@@ -316,7 +316,7 @@ const RemoteControlDialog = () => {
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip title="Previous">
|
||||
<Tooltip title="Предыдущий">
|
||||
<span>
|
||||
<IconButton
|
||||
size="small"
|
||||
@@ -335,7 +335,7 @@ const RemoteControlDialog = () => {
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
title={playState?.IsPaused ? "Play" : "Pause"}
|
||||
title={playState?.IsPaused ? "Смотреть" : "Пауза"}
|
||||
>
|
||||
<span>
|
||||
<IconButton
|
||||
@@ -356,7 +356,7 @@ const RemoteControlDialog = () => {
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip title="Next">
|
||||
<Tooltip title="Следующий">
|
||||
<span>
|
||||
<IconButton
|
||||
size="small"
|
||||
@@ -374,7 +374,7 @@ const RemoteControlDialog = () => {
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip title="Forward 10s">
|
||||
<Tooltip title="Вперёд на 10 с">
|
||||
<span>
|
||||
<IconButton
|
||||
size="small"
|
||||
@@ -387,7 +387,7 @@ const RemoteControlDialog = () => {
|
||||
</IconButton>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<Tooltip title="Stop">
|
||||
<Tooltip title="Остановить">
|
||||
<span>
|
||||
<IconButton
|
||||
size="small"
|
||||
@@ -410,7 +410,7 @@ const RemoteControlDialog = () => {
|
||||
</>
|
||||
) : (
|
||||
<Typography variant="caption" sx={{ opacity: 0.6 }}>
|
||||
Idle
|
||||
Свободно
|
||||
</Typography>
|
||||
)}
|
||||
</ListItem>
|
||||
|
||||
@@ -193,7 +193,7 @@ const Search = () => {
|
||||
</span>
|
||||
<InputBase
|
||||
inputRef={inputRef}
|
||||
placeholder="Search movies, shows, and more..."
|
||||
placeholder="Поиск фильмов, сериалов и другого..."
|
||||
onChange={handleSearchChange}
|
||||
value={searchTerm}
|
||||
fullWidth
|
||||
@@ -291,13 +291,13 @@ const Search = () => {
|
||||
display: "block",
|
||||
}}
|
||||
>
|
||||
Results
|
||||
Результаты
|
||||
</Typography>
|
||||
<Stack spacing={0.5} sx={{ px: 1 }}>
|
||||
{searchResults.data.SearchHints.map((item) => (
|
||||
<SearchItem
|
||||
key={item.Id}
|
||||
itemName={item.Name || "Untitled"}
|
||||
itemName={item.Name || "Без названия"}
|
||||
imageUrl={
|
||||
api &&
|
||||
item.PrimaryImageTag &&
|
||||
@@ -334,13 +334,13 @@ const Search = () => {
|
||||
display: "block",
|
||||
}}
|
||||
>
|
||||
Suggestions
|
||||
Подсказки
|
||||
</Typography>
|
||||
<Stack spacing={0.5} sx={{ px: 1 }}>
|
||||
{suggestions.data?.Items?.map((item) => (
|
||||
<SearchItem
|
||||
key={item.Id}
|
||||
itemName={item.Name || "Untitled"}
|
||||
itemName={item.Name || "Без названия"}
|
||||
imageUrl={
|
||||
api &&
|
||||
item.ImageTags?.Primary &&
|
||||
@@ -381,7 +381,7 @@ const Search = () => {
|
||||
search_off
|
||||
</span>
|
||||
<Typography variant="body1">
|
||||
No results found for "{debouncedSearchTerm}"
|
||||
Ничего не найдено по запросу «{debouncedSearchTerm}»
|
||||
</Typography>
|
||||
</Stack>
|
||||
)}
|
||||
@@ -420,7 +420,7 @@ const Search = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
Advanced Search
|
||||
Расширенный поиск
|
||||
</Button>
|
||||
</Stack>
|
||||
</Dialog>
|
||||
|
||||
@@ -15,6 +15,23 @@ type SearchItemProps = {
|
||||
itemId: string;
|
||||
};
|
||||
|
||||
const typeLabels: Record<string, string> = {
|
||||
Movie: "Фильм",
|
||||
Series: "Сериал",
|
||||
Episode: "Серия",
|
||||
Audio: "Трек",
|
||||
AudioBook: "Аудиокнига",
|
||||
MusicAlbum: "Альбом",
|
||||
MusicArtist: "Исполнитель",
|
||||
Person: "Человек",
|
||||
Book: "Книга",
|
||||
Photo: "Фото",
|
||||
PhotoAlbum: "Фотоальбом",
|
||||
Playlist: "Плейлист",
|
||||
Video: "Видео",
|
||||
BoxSet: "Коллекция",
|
||||
};
|
||||
|
||||
const SearchItem = (props: SearchItemProps) => {
|
||||
const { itemName, imageUrl, itemYear, itemType, itemId } = props;
|
||||
const toggleSearchDialog = useSearchStore(
|
||||
@@ -123,7 +140,7 @@ const SearchItem = (props: SearchItemProps) => {
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
{itemType}
|
||||
{typeLabels[itemType] ?? itemType}
|
||||
</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
|
||||
@@ -25,7 +25,7 @@ const SettingOptionSelect = ({
|
||||
control={
|
||||
<TextField select onChange={(e) => setValue(e.target.value)}>
|
||||
<MenuItem key={"anyLanguage"} value={"anyLanguage"}>
|
||||
Any Language
|
||||
Любой язык
|
||||
</MenuItem>
|
||||
{options.map((option) => (
|
||||
<MenuItem
|
||||
|
||||
@@ -29,7 +29,7 @@ const ShareDialog = () => {
|
||||
|
||||
const copy = async () => {
|
||||
await writeText(link);
|
||||
enqueueSnackbar("Link copied", { variant: "success" });
|
||||
enqueueSnackbar("Ссылка скопирована", { variant: "success" });
|
||||
};
|
||||
|
||||
const openHere = async () => {
|
||||
@@ -38,7 +38,7 @@ const ShareDialog = () => {
|
||||
close();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
enqueueSnackbar("Could not open the link", { variant: "error" });
|
||||
enqueueSnackbar("Не удалось открыть ссылку", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ const ShareDialog = () => {
|
||||
paper: { className: "glass", sx: { borderRadius: "22px" } },
|
||||
}}
|
||||
>
|
||||
<DialogTitle>{title || "Share"}</DialogTitle>
|
||||
<DialogTitle>{title || "Поделиться"}</DialogTitle>
|
||||
<DialogContent>
|
||||
<Box
|
||||
sx={{
|
||||
@@ -69,8 +69,8 @@ const ShareDialog = () => {
|
||||
variant="body2"
|
||||
sx={{ opacity: 0.7, textAlign: "center" }}
|
||||
>
|
||||
Scan with Blink on a phone or TV, or copy the link to open it on
|
||||
another device.
|
||||
Отсканируйте код в Blink на телефоне или ТВ либо скопируйте ссылку,
|
||||
чтобы открыть её на другом устройстве.
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
@@ -90,11 +90,11 @@ const ShareDialog = () => {
|
||||
</Box>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={openHere}>Open here</Button>
|
||||
<Button onClick={openHere}>Открыть здесь</Button>
|
||||
<Button variant="contained" onClick={copy}>
|
||||
Copy link
|
||||
Копировать ссылку
|
||||
</Button>
|
||||
<Button onClick={close}>Close</Button>
|
||||
<Button onClick={close}>Закрыть</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
@@ -62,7 +62,7 @@ const ShowMoreText = ({
|
||||
onClick={() => setDisplayFull((state) => !state)}
|
||||
// key={displayFull}
|
||||
>
|
||||
{displayFull ? "Show less" : "Show more"}
|
||||
{displayFull ? "Свернуть" : "Показать больше"}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -40,13 +40,13 @@ import useSyncPlayStore from "@/utils/store/syncPlay";
|
||||
const stateLabel = (state?: string) => {
|
||||
switch (state) {
|
||||
case "Waiting":
|
||||
return "Waiting for everyone";
|
||||
return "Ожидание устройств";
|
||||
case "Paused":
|
||||
return "Paused";
|
||||
return "Пауза";
|
||||
case "Playing":
|
||||
return "Playing";
|
||||
return "Идёт";
|
||||
default:
|
||||
return "Idle";
|
||||
return "Ожидание";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -149,7 +149,7 @@ const SyncPlayDialog = () => {
|
||||
>
|
||||
<DialogTitle sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
||||
<span className="material-symbols-rounded">groups</span>
|
||||
Watch together
|
||||
Смотреть вместе
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
{error && (
|
||||
@@ -161,7 +161,7 @@ const SyncPlayDialog = () => {
|
||||
<Stack spacing={2}>
|
||||
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
||||
<Typography variant="h6" sx={{ flex: 1 }} noWrap>
|
||||
{group.GroupName || "SyncPlay group"}
|
||||
{group.GroupName || "Группа SyncPlay"}
|
||||
</Typography>
|
||||
<Chip
|
||||
size="small"
|
||||
@@ -175,7 +175,7 @@ const SyncPlayDialog = () => {
|
||||
? `${group.Participants.length} device${
|
||||
group.Participants.length === 1 ? "" : "s"
|
||||
} connected: ${group.Participants.join(", ")}`
|
||||
: "This is the first device in the group."}
|
||||
: "Это первое устройство в группе."}
|
||||
</Typography>
|
||||
<Divider />
|
||||
<Box sx={{ display: "flex", gap: 2, alignItems: "center" }}>
|
||||
@@ -209,20 +209,20 @@ const SyncPlayDialog = () => {
|
||||
)}
|
||||
<Box sx={{ minWidth: 0 }}>
|
||||
<Typography variant="overline" sx={{ opacity: 0.6 }}>
|
||||
Group queue
|
||||
Очередь группы
|
||||
</Typography>
|
||||
<Typography variant="subtitle1" noWrap>
|
||||
{currentItem.data?.Name ??
|
||||
(queueItemIds.length
|
||||
? "Loading item…"
|
||||
: "Nothing queued yet")}
|
||||
? "Загрузка…"
|
||||
: "Очередь пока пуста")}
|
||||
</Typography>
|
||||
<Typography variant="caption" sx={{ opacity: 0.65 }}>
|
||||
{queueItemIds.length
|
||||
? `${queueItemIds.length} item${
|
||||
queueItemIds.length === 1 ? "" : "s"
|
||||
} · item ${currentQueueIndex + 1}`
|
||||
: "Start a queue on the device that should lead."}
|
||||
: "Запустите очередь на устройстве, которое будет ведущим."}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
@@ -234,8 +234,8 @@ const SyncPlayDialog = () => {
|
||||
onClick={() => api && startSyncPlayQueue(api)}
|
||||
>
|
||||
{queueItemIds.length
|
||||
? "Replace with my queue"
|
||||
: "Share my queue"}
|
||||
? "Заменить моей очередью"
|
||||
: "Поделиться моей очередью"}
|
||||
</Button>
|
||||
{queueItemIds.length > 0 && user?.Id && (
|
||||
<Button
|
||||
@@ -247,7 +247,7 @@ const SyncPlayDialog = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
Watch here
|
||||
Смотреть здесь
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
@@ -260,14 +260,14 @@ const SyncPlayDialog = () => {
|
||||
: resumeSyncPlayGroup(api))
|
||||
}
|
||||
>
|
||||
{group.State === "Playing" ? "Pause everyone" : "Play everyone"}
|
||||
{group.State === "Playing" ? "Пауза у всех" : "Воспроизвести у всех"}
|
||||
</Button>
|
||||
<Button
|
||||
color="error"
|
||||
disabled={loading}
|
||||
onClick={() => api && leaveSyncPlayGroup(api)}
|
||||
>
|
||||
Leave group
|
||||
Покинуть группу
|
||||
</Button>
|
||||
</Box>
|
||||
{loading && <CircularProgress size={20} />}
|
||||
@@ -275,16 +275,16 @@ const SyncPlayDialog = () => {
|
||||
) : (
|
||||
<Stack spacing={2}>
|
||||
<Typography variant="body2" sx={{ opacity: 0.75 }}>
|
||||
Create a group and start the current queue, or join a group
|
||||
created on another device. Every device that joins follows the
|
||||
same timeline.
|
||||
Создайте группу и запустите текущую очередь или войдите в
|
||||
группу, созданную на другом устройстве. Все устройства следуют
|
||||
одному таймлайну.
|
||||
</Typography>
|
||||
<Stack direction="row" spacing={1}>
|
||||
<TextField
|
||||
size="small"
|
||||
fullWidth
|
||||
label="Group name"
|
||||
placeholder="Movie night"
|
||||
label="Название группы"
|
||||
placeholder="Киновечер"
|
||||
value={groupName}
|
||||
onChange={(event) => setGroupName(event.target.value)}
|
||||
onKeyDown={(event) => {
|
||||
@@ -297,18 +297,18 @@ const SyncPlayDialog = () => {
|
||||
onClick={handleCreate}
|
||||
sx={{ flex: "0 0 auto" }}
|
||||
>
|
||||
Create
|
||||
Создать
|
||||
</Button>
|
||||
</Stack>
|
||||
<Divider />
|
||||
<Typography variant="overline" sx={{ opacity: 0.65 }}>
|
||||
Available groups
|
||||
Доступные группы
|
||||
</Typography>
|
||||
{groupsQuery.isPending ? (
|
||||
<CircularProgress size={20} />
|
||||
) : groups.length === 0 ? (
|
||||
<Typography variant="body2" sx={{ opacity: 0.6 }}>
|
||||
No groups yet. Create one above.
|
||||
Групп пока нет. Создайте выше.
|
||||
</Typography>
|
||||
) : (
|
||||
<List dense disablePadding>
|
||||
@@ -327,12 +327,12 @@ const SyncPlayDialog = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
Join
|
||||
Войти
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<ListItemText
|
||||
primary={entry.GroupName || "Watch together"}
|
||||
primary={entry.GroupName || "Смотреть вместе"}
|
||||
secondary={`${stateLabel(entry.State)} · ${
|
||||
entry.Participants?.length ?? 0
|
||||
} device${(entry.Participants?.length ?? 0) === 1 ? "" : "s"}`}
|
||||
@@ -345,7 +345,7 @@ const SyncPlayDialog = () => {
|
||||
)}
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={handleClose}>Close</Button>
|
||||
<Button onClick={handleClose}>Закрыть</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
@@ -57,7 +57,7 @@ export default function Updater() {
|
||||
}
|
||||
});
|
||||
enqueueSnackbar(
|
||||
"Update has been installed! You need to relaunch Blink.",
|
||||
"Обновление установлено. Перезапустите Blink.",
|
||||
{
|
||||
variant: "success",
|
||||
},
|
||||
@@ -65,7 +65,7 @@ export default function Updater() {
|
||||
await relaunch();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
enqueueSnackbar(`Failed to update Blink. ${error}`, { variant: "error" });
|
||||
enqueueSnackbar(`Не удалось обновить Blink. ${error}`, { variant: "error" });
|
||||
}
|
||||
setUpdateDialogButton(false);
|
||||
}, [enqueueSnackbar, updateInfo, downloadSize]);
|
||||
@@ -160,7 +160,7 @@ export default function Updater() {
|
||||
color: "transparent",
|
||||
}}
|
||||
>
|
||||
Update Available
|
||||
Доступно обновление
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="body2"
|
||||
@@ -169,7 +169,7 @@ export default function Updater() {
|
||||
maxWidth: "25ch",
|
||||
}}
|
||||
>
|
||||
A new version of Blink is ready for you.
|
||||
Новая версия Blink готова к установке.
|
||||
</Typography>
|
||||
</Stack>
|
||||
|
||||
@@ -193,7 +193,7 @@ export default function Updater() {
|
||||
mb: 0.5,
|
||||
}}
|
||||
>
|
||||
Current
|
||||
Текущая
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
@@ -239,7 +239,7 @@ export default function Updater() {
|
||||
mb: 0.5,
|
||||
}}
|
||||
>
|
||||
New Version
|
||||
Новая версия
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
@@ -280,7 +280,7 @@ export default function Updater() {
|
||||
</span>
|
||||
}
|
||||
>
|
||||
See what's new
|
||||
Что нового
|
||||
</Button>
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
@@ -308,7 +308,7 @@ export default function Updater() {
|
||||
},
|
||||
}}
|
||||
>
|
||||
Later
|
||||
Позже
|
||||
</Button>
|
||||
<Button
|
||||
size="large"
|
||||
@@ -340,7 +340,7 @@ export default function Updater() {
|
||||
},
|
||||
}}
|
||||
>
|
||||
Update
|
||||
Обновить
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
@@ -65,8 +65,8 @@ export const UserAvatarMenu = () => {
|
||||
<IconButton
|
||||
sx={menuButtonSx}
|
||||
onClick={handleMenuOpen}
|
||||
aria-label="Account menu"
|
||||
title="Account menu"
|
||||
aria-label="Меню аккаунта"
|
||||
title="Меню аккаунта"
|
||||
>
|
||||
{!!user?.Id &&
|
||||
(user?.PrimaryImageTag === undefined ? (
|
||||
@@ -104,7 +104,7 @@ export const UserAvatarMenu = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">logout</span>
|
||||
</ListItemIcon>
|
||||
Logout
|
||||
Выйти
|
||||
</MenuItem>
|
||||
<Divider />
|
||||
<MenuItem
|
||||
@@ -118,7 +118,7 @@ export const UserAvatarMenu = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">qr_code_2</span>
|
||||
</ListItemIcon>
|
||||
Approve device login
|
||||
Подтвердить вход на устройство
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
@@ -129,7 +129,7 @@ export const UserAvatarMenu = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">tune</span>
|
||||
</ListItemIcon>
|
||||
Preferences
|
||||
Настройки
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
@@ -140,7 +140,7 @@ export const UserAvatarMenu = () => {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">info</span>
|
||||
</ListItemIcon>
|
||||
About
|
||||
О приложении
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</div>
|
||||
|
||||
@@ -35,16 +35,16 @@ const WindowsControls = () => {
|
||||
<div className="window-controls">
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Minimize"
|
||||
title="Minimize"
|
||||
aria-label="Свернуть"
|
||||
title="Свернуть"
|
||||
onClick={() => getCurrentWindow().minimize()}
|
||||
>
|
||||
<span className="material-symbols-rounded">remove</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={maximized ? "Restore" : "Maximize"}
|
||||
title={maximized ? "Restore" : "Maximize"}
|
||||
aria-label={maximized ? "Восстановить" : "Развернуть"}
|
||||
title={maximized ? "Восстановить" : "Развернуть"}
|
||||
onClick={() => getCurrentWindow().toggleMaximize()}
|
||||
>
|
||||
<span className="material-symbols-rounded">
|
||||
@@ -54,8 +54,8 @@ const WindowsControls = () => {
|
||||
<button
|
||||
type="button"
|
||||
className="window-controls-close"
|
||||
aria-label="Close"
|
||||
title="Close"
|
||||
aria-label="Закрыть"
|
||||
title="Закрыть"
|
||||
onClick={() => getCurrentWindow().close()}
|
||||
>
|
||||
<span className="material-symbols-rounded">close</span>
|
||||
|
||||
Reference in new issue
Block a user