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
@@ -152,7 +152,7 @@ function FavoritePage() {
|
||||
const sections = [
|
||||
{
|
||||
id: "movies",
|
||||
title: "Movies",
|
||||
title: "Фильмы",
|
||||
query: movies,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -169,7 +169,7 @@ function FavoritePage() {
|
||||
},
|
||||
{
|
||||
id: "series",
|
||||
title: "TV Shows",
|
||||
title: "Сериалы",
|
||||
query: series,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -177,7 +177,7 @@ function FavoritePage() {
|
||||
item={item}
|
||||
cardTitle={item.Name}
|
||||
imageType={"Primary"}
|
||||
cardCaption={`${item.ProductionYear} - ${item.EndDate ? new Date(item.EndDate).getFullYear() : "Present"}`}
|
||||
cardCaption={`${item.ProductionYear} - ${item.EndDate ? new Date(item.EndDate).getFullYear() : "н.в."}`}
|
||||
cardType="portrait"
|
||||
queryKey={["favorite", "series"]}
|
||||
userId={user?.Id}
|
||||
@@ -186,7 +186,7 @@ function FavoritePage() {
|
||||
},
|
||||
{
|
||||
id: "albums",
|
||||
title: "Albums",
|
||||
title: "Альбомы",
|
||||
query: musicAlbum,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -204,7 +204,7 @@ function FavoritePage() {
|
||||
},
|
||||
{
|
||||
id: "artists",
|
||||
title: "Artists",
|
||||
title: "Исполнители",
|
||||
query: musicArtists,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -221,7 +221,7 @@ function FavoritePage() {
|
||||
},
|
||||
{
|
||||
id: "audio",
|
||||
title: "Songs",
|
||||
title: "Песни",
|
||||
query: audio,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -238,7 +238,7 @@ function FavoritePage() {
|
||||
},
|
||||
{
|
||||
id: "books",
|
||||
title: "Books",
|
||||
title: "Книги",
|
||||
query: book,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -256,7 +256,7 @@ function FavoritePage() {
|
||||
},
|
||||
{
|
||||
id: "person",
|
||||
title: "People",
|
||||
title: "Люди",
|
||||
query: person,
|
||||
renderCard: (item: BaseItemDto) => (
|
||||
<Card
|
||||
@@ -282,7 +282,7 @@ function FavoritePage() {
|
||||
<div className="favorite-header">
|
||||
<div className="header-content">
|
||||
<Typography variant="h1" component="h1">
|
||||
Your Favorites
|
||||
Ваше избранное
|
||||
</Typography>
|
||||
</div>
|
||||
<Tabs
|
||||
@@ -290,9 +290,9 @@ function FavoritePage() {
|
||||
onChange={handleTabChange}
|
||||
variant="scrollable"
|
||||
scrollButtons="auto"
|
||||
aria-label="favorite sections"
|
||||
aria-label="разделы избранного"
|
||||
>
|
||||
<Tab label="Overview" value="overview" />
|
||||
<Tab label="Обзор" value="overview" />
|
||||
{availableSections.map((section) => (
|
||||
<Tab key={section.id} label={section.title} value={section.id} />
|
||||
))}
|
||||
@@ -315,9 +315,9 @@ function FavoritePage() {
|
||||
))}
|
||||
{availableSections.length === 0 && (
|
||||
<div className="empty-state">
|
||||
<Typography variant="h5">No favorites yet</Typography>
|
||||
<Typography variant="h5">В избранном пока пусто</Typography>
|
||||
<Typography variant="body1">
|
||||
Mark items as favorite to see them here.
|
||||
Добавляйте элементы в избранное, чтобы видеть их здесь.
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -50,8 +50,10 @@ body.has-player-bar .home-cinema {
|
||||
}
|
||||
|
||||
// Keep the menu clear of the macOS traffic lights now that the frame
|
||||
// reaches the window edges.
|
||||
// reaches the window edges, and align it vertically with them.
|
||||
html.is-macos & {
|
||||
padding-top: 0.6rem;
|
||||
|
||||
&-left {
|
||||
padding-left: 64px;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
<header className="home-header" data-tauri-drag-region>
|
||||
<div className="home-header-left" data-tauri-drag-region>
|
||||
<IconButton
|
||||
aria-label="Open navigation"
|
||||
aria-label="Открыть меню"
|
||||
onClick={() => setDrawerOpen(true)}
|
||||
>
|
||||
<span className="material-symbols-rounded">menu</span>
|
||||
@@ -53,7 +53,7 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
className="home-nav-link"
|
||||
onClick={openMovies}
|
||||
>
|
||||
Movies
|
||||
Фильмы
|
||||
</button>
|
||||
)}
|
||||
{showsLibrary?.Id && (
|
||||
@@ -62,7 +62,7 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
className="home-nav-link"
|
||||
onClick={openShows}
|
||||
>
|
||||
Shows
|
||||
Сериалы
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
@@ -70,7 +70,7 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
className="home-nav-link"
|
||||
onClick={onNewAndPopular}
|
||||
>
|
||||
New & Popular
|
||||
Новинки
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -104,18 +104,18 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
|
||||
<div className="home-header-right">
|
||||
<IconButton
|
||||
aria-label="Watch together"
|
||||
title="Watch together"
|
||||
aria-label="Смотреть вместе"
|
||||
title="Смотреть вместе"
|
||||
onClick={openSyncPlayDialog}
|
||||
>
|
||||
<span className="material-symbols-rounded">groups</span>
|
||||
</IconButton>
|
||||
<IconButton aria-label="Search" onClick={toggleSearchDialog}>
|
||||
<IconButton aria-label="Поиск" onClick={toggleSearchDialog}>
|
||||
<span className="material-symbols-rounded">search</span>
|
||||
</IconButton>
|
||||
<CastButton />
|
||||
<IconButton
|
||||
aria-label="Favorites"
|
||||
aria-label="Избранное"
|
||||
onClick={() => navigate({ to: "/favorite" })}
|
||||
>
|
||||
<span className="material-symbols-rounded">favorite</span>
|
||||
|
||||
@@ -195,7 +195,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
<section
|
||||
className="home-skeleton"
|
||||
aria-busy="true"
|
||||
aria-label="Loading home"
|
||||
aria-label="Загрузка главной"
|
||||
>
|
||||
<div className="home-skeleton-copy">
|
||||
<span className="home-skeleton-pill" />
|
||||
@@ -235,11 +235,11 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with Carousel</Typography>
|
||||
<Typography>Ошибка карусели</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<CardScroller displayCards={4} title="Libraries">
|
||||
<CardScroller displayCards={4} title="Библиотеки">
|
||||
{libraries.data?.Items?.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
@@ -263,12 +263,12 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with Libraries</Typography>
|
||||
<Typography>Ошибка библиотек</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{upNextItems.isSuccess && upNextItems.data?.TotalRecordCount && (
|
||||
<CardScroller displayCards={4} title="Up Next">
|
||||
<CardScroller displayCards={4} title="Далее">
|
||||
{upNextItems.data?.Items?.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
@@ -296,10 +296,10 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
: 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
|
||||
}
|
||||
@@ -315,7 +315,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with resumeItemsVideo</Typography>
|
||||
<Typography>Ошибка продолжения просмотра</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
@@ -323,7 +323,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
!resumeItemsVideo.data?.TotalRecordCount ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Continue Watching">
|
||||
<CardScroller displayCards={4} title="Продолжить просмотр">
|
||||
{resumeItemsVideo.data?.Items?.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
@@ -347,10 +347,10 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
: 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
|
||||
}
|
||||
@@ -366,7 +366,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with resumeItemsAudio</Typography>
|
||||
<Typography>Ошибка продолжения прослушивания</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
@@ -374,7 +374,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
!resumeItemsAudio.data?.TotalRecordCount ? (
|
||||
<></>
|
||||
) : (
|
||||
<CardScroller displayCards={4} title="Continue Listening">
|
||||
<CardScroller displayCards={4} title="Продолжить прослушивание">
|
||||
{resumeItemsAudio.data?.Items?.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
@@ -395,7 +395,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
<ErrorBoundary
|
||||
fallback={
|
||||
<div className="error">
|
||||
<Typography>Error with LatestMediaSections</Typography>
|
||||
<Typography>Ошибка новых материалов</Typography>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -87,7 +87,7 @@ function Library() {
|
||||
);
|
||||
// Derive top app title from Zustand slice (library name)
|
||||
useEffect(() => {
|
||||
const title = storeLibraryName ?? "Library";
|
||||
const title = storeLibraryName ?? "Библиотека";
|
||||
setPageTitle(title);
|
||||
return () => setPageTitle(null);
|
||||
}, [storeLibraryName, setPageTitle]);
|
||||
|
||||
@@ -46,10 +46,10 @@ function LoginUser() {
|
||||
const handleLogin = useMutation({
|
||||
mutationKey: ["login", "authenticate"],
|
||||
mutationFn: async () => {
|
||||
if (!api) throw new Error("API not initialized");
|
||||
if (!api) throw new Error("API не инициализировано");
|
||||
const authenticate = await api.authenticateUserByName(userName, password);
|
||||
if (!authenticate.data.AccessToken) {
|
||||
throw new Error("No access token received");
|
||||
throw new Error("Не удалось получить токен доступа");
|
||||
}
|
||||
createApi(api.basePath, authenticate.data.AccessToken);
|
||||
if (authenticate.data.SessionInfo?.UserId && rememberMe) {
|
||||
@@ -69,8 +69,8 @@ function LoginUser() {
|
||||
console.error(err);
|
||||
setError(
|
||||
needsPassword
|
||||
? "Incorrect password. Please try again."
|
||||
: "Couldn't sign in. Please try again.",
|
||||
? "Неверный пароль. Попробуйте ещё раз."
|
||||
: "Не удалось войти. Попробуйте ещё раз.",
|
||||
);
|
||||
setPassword("");
|
||||
},
|
||||
@@ -84,16 +84,16 @@ function LoginUser() {
|
||||
|
||||
return (
|
||||
<LoginShell
|
||||
title={`Welcome back, ${userName}`}
|
||||
title={`С возвращением, ${userName}`}
|
||||
subtitle={
|
||||
needsPassword
|
||||
? "Enter your password to continue"
|
||||
: "This profile doesn't need a password"
|
||||
? "Введите пароль, чтобы продолжить"
|
||||
: "Этот профиль не требует пароля"
|
||||
}
|
||||
footer={
|
||||
<Link to="/login/list" className="login-link">
|
||||
<span className="material-symbols-rounded">switch_account</span>
|
||||
Not you? Switch user
|
||||
Не вы? Сменить пользователя
|
||||
</Link>
|
||||
}
|
||||
>
|
||||
@@ -110,7 +110,7 @@ function LoginUser() {
|
||||
<TextField
|
||||
fullWidth
|
||||
autoFocus
|
||||
label="Password"
|
||||
label="Пароль"
|
||||
variant="outlined"
|
||||
type={showPassword ? "text" : "password"}
|
||||
autoComplete="current-password"
|
||||
@@ -129,7 +129,7 @@ function LoginUser() {
|
||||
onClick={() => setShowPassword((show) => !show)}
|
||||
edge="end"
|
||||
aria-label={
|
||||
showPassword ? "Hide password" : "Show password"
|
||||
showPassword ? "Скрыть пароль" : "Показать пароль"
|
||||
}
|
||||
>
|
||||
<span className="material-symbols-rounded">
|
||||
@@ -156,7 +156,7 @@ function LoginUser() {
|
||||
onChange={(_, checked) => setRememberMe(checked)}
|
||||
/>
|
||||
}
|
||||
label="Keep me signed in"
|
||||
label="Запомнить меня"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -168,7 +168,7 @@ function LoginUser() {
|
||||
fullWidth
|
||||
loading={handleLogin.isPending || handleLogin.isSuccess}
|
||||
>
|
||||
Sign in
|
||||
Войти
|
||||
</Button>
|
||||
</form>
|
||||
</LoginShell>
|
||||
|
||||
@@ -21,8 +21,8 @@ function LoginPublicUsersList() {
|
||||
return (
|
||||
<LoginShell
|
||||
width="wide"
|
||||
title="Who's watching?"
|
||||
subtitle="Choose your profile to sign in"
|
||||
title="Кто смотрит?"
|
||||
subtitle="Выберите профиль для входа"
|
||||
>
|
||||
<div className="profile-grid">
|
||||
{users.isPending &&
|
||||
@@ -39,7 +39,7 @@ function LoginPublicUsersList() {
|
||||
className="profile"
|
||||
to="/login/$userId/$userName"
|
||||
params={{ userId: user.Id ?? "", userName: user.Name ?? "" }}
|
||||
aria-label={`Sign in as ${user.Name}`}
|
||||
aria-label={`Войти как ${user.Name}`}
|
||||
>
|
||||
<ProfileAvatar
|
||||
userId={user.Id ?? ""}
|
||||
@@ -55,20 +55,20 @@ function LoginPublicUsersList() {
|
||||
<Link
|
||||
className="profile"
|
||||
to="/login/manual"
|
||||
aria-label="Sign in with a username"
|
||||
aria-label="Войти по имени пользователя"
|
||||
>
|
||||
<span className="profile-avatar profile-avatar-add">
|
||||
<span className="material-symbols-rounded">person_add</span>
|
||||
</span>
|
||||
<span className="profile-name">Other user</span>
|
||||
<span className="profile-name">Другой пользователь</span>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{users.isError && (
|
||||
<p className="login-shell-subtitle" style={{ textAlign: "center" }}>
|
||||
Couldn't load profiles from this server. Use "Other user" to sign in
|
||||
with your username.
|
||||
Не удалось загрузить профили с этого сервера. Используйте «Другой
|
||||
пользователь», чтобы войти по имени и паролю.
|
||||
</p>
|
||||
)}
|
||||
</LoginShell>
|
||||
|
||||
@@ -39,13 +39,13 @@ function UserLoginManual() {
|
||||
const handleLogin = useMutation({
|
||||
mutationKey: ["login", "authenticate"],
|
||||
mutationFn: async () => {
|
||||
if (!api) throw new Error("Api is not available");
|
||||
if (!api) throw new Error("API недоступно");
|
||||
const authenticate = await api.authenticateUserByName(
|
||||
username.trim(),
|
||||
password,
|
||||
);
|
||||
if (!authenticate.data?.AccessToken) {
|
||||
throw new Error("Access token not available");
|
||||
throw new Error("Не удалось получить токен доступа");
|
||||
}
|
||||
createApi(api.basePath, authenticate.data.AccessToken);
|
||||
if (rememberMe) {
|
||||
@@ -63,7 +63,7 @@ function UserLoginManual() {
|
||||
},
|
||||
onError: (err) => {
|
||||
console.error(err);
|
||||
setError("Incorrect username or password.");
|
||||
setError("Неверное имя пользователя или пароль.");
|
||||
setPassword("");
|
||||
},
|
||||
});
|
||||
@@ -71,7 +71,7 @@ function UserLoginManual() {
|
||||
const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
if (!username.trim()) {
|
||||
setError("Enter your username.");
|
||||
setError("Введите имя пользователя.");
|
||||
return;
|
||||
}
|
||||
setError(null);
|
||||
@@ -80,12 +80,12 @@ function UserLoginManual() {
|
||||
|
||||
return (
|
||||
<LoginShell
|
||||
title="Sign in"
|
||||
subtitle="Use your username and password"
|
||||
title="Войти"
|
||||
subtitle="Введите имя пользователя и пароль"
|
||||
footer={
|
||||
<Link to="/login/list" className="login-link">
|
||||
<span className="material-symbols-rounded">group</span>
|
||||
Choose a profile instead
|
||||
Выбрать профиль
|
||||
</Link>
|
||||
}
|
||||
>
|
||||
@@ -93,7 +93,7 @@ function UserLoginManual() {
|
||||
<TextField
|
||||
fullWidth
|
||||
autoFocus
|
||||
label="Username"
|
||||
label="Имя пользователя"
|
||||
variant="outlined"
|
||||
autoComplete="username"
|
||||
value={username}
|
||||
@@ -105,7 +105,7 @@ function UserLoginManual() {
|
||||
/>
|
||||
<TextField
|
||||
fullWidth
|
||||
label="Password"
|
||||
label="Пароль"
|
||||
variant="outlined"
|
||||
type={showPassword ? "text" : "password"}
|
||||
autoComplete="current-password"
|
||||
@@ -115,7 +115,7 @@ function UserLoginManual() {
|
||||
setError(null);
|
||||
}}
|
||||
error={Boolean(error) && Boolean(username.trim())}
|
||||
helperText={error ?? "Leave blank if your account has no password"}
|
||||
helperText={error ?? "Оставьте пустым, если у аккаунта нет пароля"}
|
||||
slotProps={{
|
||||
input: {
|
||||
endAdornment: (
|
||||
@@ -124,7 +124,7 @@ function UserLoginManual() {
|
||||
onClick={() => setShowPassword((show) => !show)}
|
||||
edge="end"
|
||||
aria-label={
|
||||
showPassword ? "Hide password" : "Show password"
|
||||
showPassword ? "Скрыть пароль" : "Показать пароль"
|
||||
}
|
||||
>
|
||||
<span className="material-symbols-rounded">
|
||||
@@ -145,7 +145,7 @@ function UserLoginManual() {
|
||||
onChange={(_, checked) => setRememberMe(checked)}
|
||||
/>
|
||||
}
|
||||
label="Keep me signed in"
|
||||
label="Запомнить меня"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -157,7 +157,7 @@ function UserLoginManual() {
|
||||
fullWidth
|
||||
loading={handleLogin.isPending || handleLogin.isSuccess}
|
||||
>
|
||||
Sign in
|
||||
Войти
|
||||
</Button>
|
||||
</form>
|
||||
</LoginShell>
|
||||
|
||||
@@ -173,8 +173,8 @@ function MusicAlbumTitlePage() {
|
||||
</Typography>
|
||||
<Typography className="opacity-07">
|
||||
{(musicTracks.data?.TotalRecordCount ?? 0) > 1
|
||||
? `${musicTracks.data?.TotalRecordCount} songs`
|
||||
: "Single"}
|
||||
? `${musicTracks.data?.TotalRecordCount} песен`
|
||||
: "Сингл"}
|
||||
</Typography>
|
||||
<Typography className="opacity-07">
|
||||
{getRuntimeCompact(item.data.CumulativeRunTimeTicks ?? 0)}
|
||||
@@ -210,12 +210,12 @@ function MusicAlbumTitlePage() {
|
||||
>
|
||||
album
|
||||
</span>
|
||||
<Typography variant="h5">Disc {disc}</Typography>
|
||||
<Typography variant="h5">Диск {disc}</Typography>
|
||||
</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>
|
||||
{musicTracks.data?.Items?.map(
|
||||
(track, index) =>
|
||||
@@ -234,8 +234,8 @@ function MusicAlbumTitlePage() {
|
||||
<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>
|
||||
{musicTracks.data?.Items?.map((track, index) => (
|
||||
<AlbumMusicTrack
|
||||
@@ -293,7 +293,7 @@ function MusicAlbumTitlePage() {
|
||||
)}
|
||||
{(similarItems.data?.TotalRecordCount ?? 0) > 0 && (
|
||||
<CardScroller
|
||||
title="You might also like"
|
||||
title="Вам может понравиться"
|
||||
displayCards={5}
|
||||
disableDecoration
|
||||
>
|
||||
@@ -315,10 +315,10 @@ function MusicAlbumTitlePage() {
|
||||
: similar.Type === BaseItemKind.Series
|
||||
? `${similar.ProductionYear} - ${
|
||||
similar.EndDate
|
||||
? new Date(similar.EndDate).toLocaleString([], {
|
||||
? new Date(similar.EndDate).toLocaleString("ru-RU", {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
: "н.в."
|
||||
}`
|
||||
: similar.ProductionYear
|
||||
}
|
||||
|
||||
@@ -158,9 +158,9 @@ function ArtistTitlePage() {
|
||||
});
|
||||
|
||||
const artistTabs = [
|
||||
{ title: "Discography", data: artistDiscography },
|
||||
{ title: "Songs", data: artistSongs },
|
||||
{ title: "Appearances", data: artistAppearances },
|
||||
{ title: "Дискография", data: artistDiscography },
|
||||
{ title: "Песни", data: artistSongs },
|
||||
{ title: "Участие", data: artistAppearances },
|
||||
];
|
||||
const [activeArtistTab, setActiveArtistTab] = useState(0);
|
||||
|
||||
@@ -260,10 +260,10 @@ function ArtistTitlePage() {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||
<Tooltip title="Shuffle">
|
||||
<Tooltip title="Перемешать">
|
||||
<span>
|
||||
<IconButton
|
||||
aria-label="Shuffle"
|
||||
aria-label="Перемешать"
|
||||
disabled={!artistSongs.data?.Items?.length}
|
||||
onClick={() =>
|
||||
shuffleAndPlay(
|
||||
@@ -323,9 +323,9 @@ function ArtistTitlePage() {
|
||||
>
|
||||
{item.data.PremiereDate && (
|
||||
<div>
|
||||
<Typography variant="h5">Born</Typography>
|
||||
<Typography variant="h5">Дата рождения</Typography>
|
||||
<Typography sx={{ opacity: 0.8 }}>
|
||||
{new Date(item.data.PremiereDate).toDateString()}
|
||||
{new Date(item.data.PremiereDate).toLocaleDateString("ru-RU")}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
@@ -337,10 +337,10 @@ function ArtistTitlePage() {
|
||||
mt: 2,
|
||||
}}
|
||||
>
|
||||
Death
|
||||
Дата смерти
|
||||
</Typography>
|
||||
<Typography sx={{ opacity: 0.8 }}>
|
||||
{new Date(item.data.EndDate).toDateString()}
|
||||
{new Date(item.data.EndDate).toLocaleDateString("ru-RU")}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -117,8 +117,8 @@ function PlaylistTitlePage() {
|
||||
<div className="flex flex-align-center item-info-playlist-info">
|
||||
<Typography className="opacity-07">
|
||||
{(musicTracks.data?.TotalRecordCount ?? 0) > 1
|
||||
? `${musicTracks.data?.TotalRecordCount} songs`
|
||||
: "Single"}
|
||||
? `${musicTracks.data?.TotalRecordCount} песен`
|
||||
: "Сингл"}
|
||||
</Typography>
|
||||
<Typography className="opacity-07">
|
||||
{getRuntimeCompact(item.data.CumulativeRunTimeTicks ?? 0)}
|
||||
@@ -143,8 +143,8 @@ function PlaylistTitlePage() {
|
||||
<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>
|
||||
{musicTracks.data?.Items?.map((track, index) => (
|
||||
<AlbumMusicTrack
|
||||
@@ -201,7 +201,7 @@ function PlaylistTitlePage() {
|
||||
)}
|
||||
{(similarItems.data?.TotalRecordCount ?? 0) > 0 && (
|
||||
<CardScroller
|
||||
title="You might also like"
|
||||
title="Вам может понравиться"
|
||||
displayCards={5}
|
||||
disableDecoration
|
||||
>
|
||||
@@ -223,10 +223,10 @@ function PlaylistTitlePage() {
|
||||
: similar.Type === BaseItemKind.Series
|
||||
? `${similar.ProductionYear} - ${
|
||||
similar.EndDate
|
||||
? new Date(similar.EndDate).toLocaleString([], {
|
||||
? new Date(similar.EndDate).toLocaleString("ru-RU", {
|
||||
year: "numeric",
|
||||
})
|
||||
: "Present"
|
||||
: "н.в."
|
||||
}`
|
||||
: similar.ProductionYear
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ export const Route = createFileRoute("/_api/player/audio")({
|
||||
});
|
||||
|
||||
const repeatLabels: Record<RepeatMode, string> = {
|
||||
off: "Repeat off",
|
||||
all: "Repeat all",
|
||||
one: "Repeat one",
|
||||
off: "Повтор выкл.",
|
||||
all: "Повтор всех",
|
||||
one: "Повтор одного",
|
||||
};
|
||||
|
||||
/** Artists (linked) and album (linked) for the current track. */
|
||||
@@ -186,7 +186,7 @@ function AudioPlayerRoute() {
|
||||
<section className="audio-now-playing" key={item?.Id}>
|
||||
<div className="audio-now-playing-art">
|
||||
{imageUrl ? (
|
||||
<img alt={item?.Name ?? "Album art"} src={imageUrl} />
|
||||
<img alt={item?.Name ?? "Обложка"} src={imageUrl} />
|
||||
) : (
|
||||
<span className="material-symbols-rounded">music_note</span>
|
||||
)}
|
||||
@@ -234,12 +234,12 @@ function AudioPlayerRoute() {
|
||||
/>
|
||||
|
||||
<div className="audio-now-playing-transport">
|
||||
<Tooltip title="Shuffle upcoming">
|
||||
<Tooltip title="Перемешать следующие">
|
||||
<span>
|
||||
<IconButton
|
||||
onClick={shuffleUpcoming}
|
||||
disabled={!hasUpcoming}
|
||||
aria-label="Shuffle upcoming"
|
||||
aria-label="Перемешать следующие"
|
||||
>
|
||||
<span className="material-symbols-rounded">shuffle</span>
|
||||
</IconButton>
|
||||
@@ -274,7 +274,7 @@ function AudioPlayerRoute() {
|
||||
</div>
|
||||
<IconButton
|
||||
onClick={(e) => setMenuAnchor(e.currentTarget)}
|
||||
aria-label="More options"
|
||||
aria-label="Ещё"
|
||||
>
|
||||
<span className="material-symbols-rounded">more_horiz</span>
|
||||
</IconButton>
|
||||
@@ -300,7 +300,7 @@ function AudioPlayerRoute() {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">album</span>
|
||||
</ListItemIcon>
|
||||
Go to album
|
||||
Перейти к альбому
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
disabled={!artistId}
|
||||
@@ -317,7 +317,7 @@ function AudioPlayerRoute() {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">person</span>
|
||||
</ListItemIcon>
|
||||
Go to artist
|
||||
Перейти к исполнителю
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
onClick={() => {
|
||||
@@ -328,7 +328,7 @@ function AudioPlayerRoute() {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">query_stats</span>
|
||||
</ListItemIcon>
|
||||
Stats for nerds
|
||||
Статистика
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</div>
|
||||
@@ -336,7 +336,7 @@ function AudioPlayerRoute() {
|
||||
|
||||
<aside
|
||||
className={`audio-side ${hasLyrics ? "has-lyrics" : ""}`}
|
||||
aria-label="Lyrics and queue"
|
||||
aria-label="Текст и очередь"
|
||||
>
|
||||
{hasLyrics && (
|
||||
<div className="audio-side-lyrics">
|
||||
@@ -360,7 +360,7 @@ function AudioPlayerRoute() {
|
||||
maxWidth="sm"
|
||||
fullWidth
|
||||
>
|
||||
<DialogTitle>Stats for nerds</DialogTitle>
|
||||
<DialogTitle>Статистика</DialogTitle>
|
||||
<DialogContent>
|
||||
<StatsPanel item={item} audioRef={audioPlayerRef} />
|
||||
</DialogContent>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import React, { useCallback, useEffect, useRef } from "react";
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ReactPlayer from "react-player";
|
||||
import { secToTicks, ticksToSec } from "@/utils/date/time";
|
||||
import { playItemFromQueue, usePlaybackStore } from "@/utils/store/playback";
|
||||
@@ -27,7 +27,12 @@ import StatsForNerds from "@/components/playback/videoPlayer/StatsForNerds";
|
||||
import UpNextFlyout from "@/components/playback/videoPlayer/upNextFlyout";
|
||||
import VolumeChangeOverlay from "@/components/playback/videoPlayer/VolumeChangeOverlay";
|
||||
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
||||
import { getAutoSkipSegments } from "@/utils/storage/player";
|
||||
import {
|
||||
getAutoSkipSegments,
|
||||
getVideoFitMode,
|
||||
setVideoFitMode,
|
||||
} from "@/utils/storage/player";
|
||||
import type { VideoFitMode } from "@/utils/types/videoFitMode";
|
||||
import { useApiInContext } from "@/utils/store/api";
|
||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||
import {
|
||||
@@ -71,7 +76,7 @@ function addSubtitleTrackToReactPlayer(
|
||||
track.src = `${baseUrl}${subtitleTracks.url}${urlParams}`;
|
||||
track.kind = "subtitles";
|
||||
track.srclang = reqSubTrack.Language ?? "en";
|
||||
track.label = reqSubTrack.DisplayTitle ?? "Subtitle";
|
||||
track.label = reqSubTrack.DisplayTitle ?? "Субтитры";
|
||||
track.default = true;
|
||||
track.id = subtitleTracks.url;
|
||||
|
||||
@@ -184,8 +189,31 @@ export function VideoPlayer() {
|
||||
]);
|
||||
|
||||
const [error, setError] = React.useState<any>(null);
|
||||
const [fitMode, setFitMode] = useState<VideoFitMode>("fit");
|
||||
const autoSkippedSegmentRef = useRef<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
getVideoFitMode().then(setFitMode);
|
||||
}, []);
|
||||
|
||||
const handleFitModeChange = useCallback((mode: VideoFitMode) => {
|
||||
setFitMode(mode);
|
||||
void setVideoFitMode(mode);
|
||||
}, []);
|
||||
|
||||
const cycleFitMode = useCallback(() => {
|
||||
setFitMode((current) => {
|
||||
const next =
|
||||
current === "fit"
|
||||
? "fill"
|
||||
: current === "fill"
|
||||
? "stretch"
|
||||
: "fit";
|
||||
void setVideoFitMode(next);
|
||||
return next;
|
||||
});
|
||||
}, []);
|
||||
|
||||
// Deep links, transfers and resume all set a start position. Do not rely
|
||||
// on a single `onReady` callback (HLS wrappers can fire it late or reset
|
||||
// the media afterwards), keep enforcing it until the player settles.
|
||||
@@ -537,6 +565,10 @@ export function VideoPlayer() {
|
||||
case "m":
|
||||
toggleIsPlayerMuted();
|
||||
break;
|
||||
case "Z":
|
||||
case "z":
|
||||
cycleFitMode();
|
||||
break;
|
||||
case "F7":
|
||||
playItemFromQueue("previous", user?.Id, api);
|
||||
break;
|
||||
@@ -547,7 +579,7 @@ export function VideoPlayer() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
}, [cycleFitMode]);
|
||||
|
||||
useEffect(() => {
|
||||
// attach the event listener
|
||||
@@ -732,10 +764,11 @@ export function VideoPlayer() {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="video-player"
|
||||
className={`video-player video-fit-${fitMode}`}
|
||||
onMouseMove={handleMouseMove}
|
||||
onMouseLeave={handleMouseLeave}
|
||||
>
|
||||
<div className="video-player-drag-region" data-tauri-drag-region />
|
||||
<LoadingIndicator />
|
||||
<ErrorDisplay
|
||||
error={error}
|
||||
@@ -755,6 +788,8 @@ export function VideoPlayer() {
|
||||
// isVisible={areControlsVisible}
|
||||
onHover={handleMouseMove}
|
||||
onLeave={handleMouseLeave}
|
||||
fitMode={fitMode}
|
||||
onFitModeChange={handleFitModeChange}
|
||||
/>
|
||||
<SkipSegmentButton />
|
||||
<VolumeChangeOverlay />
|
||||
|
||||
@@ -63,7 +63,7 @@ function PhotosPlayer() {
|
||||
height: "100%",
|
||||
borderRadius: "2px",
|
||||
}}
|
||||
alt="Item"
|
||||
alt="Изображение"
|
||||
/>
|
||||
</div>
|
||||
)),
|
||||
@@ -108,7 +108,7 @@ function PhotosPlayer() {
|
||||
`${api?.basePath}/Items/${currentPhoto?.Id}/Download?ApiKey=${api?.accessToken}`,
|
||||
pathToSave,
|
||||
);
|
||||
enqueueSnackbar("Image download queued.", { variant: "info" });
|
||||
enqueueSnackbar("Загрузка изображения добавлена в очередь.", { variant: "info" });
|
||||
}
|
||||
}, [currentIndex]);
|
||||
|
||||
@@ -125,7 +125,7 @@ function PhotosPlayer() {
|
||||
? `${api?.basePath}/Items/${currentPhoto.Id}/Download?ApiKey=${api?.accessToken}`
|
||||
: brokenImage
|
||||
}
|
||||
alt="Item"
|
||||
alt="Изображение"
|
||||
transition={{ duration: 0.1 }}
|
||||
className="photos-currentPhoto"
|
||||
/>
|
||||
@@ -152,7 +152,7 @@ function PhotosPlayer() {
|
||||
<ListItemIcon>
|
||||
<span className="material-symbols-rounded">download</span>
|
||||
</ListItemIcon>
|
||||
<ListItemText>Download</ListItemText>
|
||||
<ListItemText>Скачать</ListItemText>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<div className="photos-overlay">
|
||||
|
||||
@@ -41,13 +41,13 @@ export const Route = createFileRoute("/_api/search/")({
|
||||
});
|
||||
|
||||
const CATEGORIES = [
|
||||
{ label: "Movies", value: "Movie", kind: BaseItemKind.Movie },
|
||||
{ label: "TV Shows", value: "Series", kind: BaseItemKind.Series },
|
||||
{ label: "Episodes", value: "Episode", kind: "Episode" },
|
||||
{ label: "Music", value: "MusicAlbum", kind: BaseItemKind.MusicAlbum },
|
||||
{ label: "Artists", value: "MusicArtist", kind: BaseItemKind.MusicArtist },
|
||||
{ label: "People", value: "Person", kind: "Person" },
|
||||
{ label: "Books", value: "Book", kind: BaseItemKind.Book },
|
||||
{ label: "Фильмы", value: "Movie", kind: BaseItemKind.Movie },
|
||||
{ label: "Сериалы", value: "Series", kind: BaseItemKind.Series },
|
||||
{ label: "Серии", value: "Episode", kind: "Episode" },
|
||||
{ label: "Музыка", value: "MusicAlbum", kind: BaseItemKind.MusicAlbum },
|
||||
{ label: "Исполнители", value: "MusicArtist", kind: BaseItemKind.MusicArtist },
|
||||
{ label: "Люди", value: "Person", kind: "Person" },
|
||||
{ label: "Книги", value: "Book", kind: BaseItemKind.Book },
|
||||
];
|
||||
|
||||
function SearchPage() {
|
||||
@@ -137,10 +137,10 @@ function SearchPage() {
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Explore your library
|
||||
Исследуйте библиотеку
|
||||
</Typography>
|
||||
<Typography variant="body1" sx={{ opacity: 0.6, maxWidth: 400 }}>
|
||||
Search for movies, tv shows, music, people and more.
|
||||
Ищите фильмы, сериалы, музыку, людей и многое другое.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Fade>
|
||||
@@ -199,16 +199,16 @@ function SearchAppBar({
|
||||
<div className="flex flex-row" style={{ gap: "0.6em" }}>
|
||||
<IconButton
|
||||
onClick={() => setShowDrawer(true)}
|
||||
aria-label="Open navigation"
|
||||
title="Open navigation"
|
||||
aria-label="Открыть меню"
|
||||
title="Открыть меню"
|
||||
>
|
||||
<div className="material-symbols-rounded">menu</div>
|
||||
</IconButton>
|
||||
<BackButton />
|
||||
<IconButton
|
||||
onClick={handleNavigateToHome}
|
||||
aria-label="Home"
|
||||
title="Home"
|
||||
aria-label="Главная"
|
||||
title="Главная"
|
||||
>
|
||||
<div
|
||||
className={
|
||||
@@ -229,7 +229,7 @@ function SearchAppBar({
|
||||
<span className="material-symbols-rounded search-icon">search</span>
|
||||
<InputBase
|
||||
className="search-input"
|
||||
placeholder="Search library..."
|
||||
placeholder="Поиск в библиотеке..."
|
||||
fullWidth
|
||||
autoFocus
|
||||
value={searchTerm}
|
||||
@@ -301,7 +301,7 @@ function SearchAppBar({
|
||||
color="textSecondary"
|
||||
sx={{ opacity: 0.7 }}
|
||||
>
|
||||
Types
|
||||
Типы
|
||||
</Typography>
|
||||
);
|
||||
return (
|
||||
@@ -340,7 +340,7 @@ function SearchAppBar({
|
||||
>
|
||||
<MenuItem disabled value="">
|
||||
<Typography variant="overline" color="textSecondary">
|
||||
Filter by Type
|
||||
Фильтр по типу
|
||||
</Typography>
|
||||
</MenuItem>
|
||||
{CATEGORIES.map((cat) => (
|
||||
@@ -355,8 +355,8 @@ function SearchAppBar({
|
||||
<div className="flex flex-row" style={{ gap: "0.6em" }}>
|
||||
<IconButton
|
||||
onClick={handleNavigateToFavorite}
|
||||
aria-label="Favorites"
|
||||
title="Favorites"
|
||||
aria-label="Избранное"
|
||||
title="Избранное"
|
||||
>
|
||||
<div className="material-symbols-rounded">favorite</div>
|
||||
</IconButton>
|
||||
@@ -436,9 +436,9 @@ function NoResultsDetector({ categories, resultsStatus }: any) {
|
||||
return (
|
||||
<Fade in>
|
||||
<Box className="search-no-results">
|
||||
<Typography variant="h6">No results found</Typography>
|
||||
<Typography variant="h6">Ничего не найдено</Typography>
|
||||
<Typography variant="body2" sx={{ opacity: 0.6 }}>
|
||||
Try adjusting your search or filters.
|
||||
Попробуйте изменить запрос или фильтры.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Fade>
|
||||
|
||||
@@ -32,8 +32,8 @@ function SettingsRoute() {
|
||||
<BackButton />
|
||||
<IconButton
|
||||
onClick={handleNavigateHome}
|
||||
aria-label="Home"
|
||||
title="Home"
|
||||
aria-label="Главная"
|
||||
title="Главная"
|
||||
sx={{
|
||||
background: "rgba(255, 255, 255, 0.05)",
|
||||
"&:hover": { background: "rgba(255, 255, 255, 0.1)" },
|
||||
@@ -47,7 +47,7 @@ function SettingsRoute() {
|
||||
<img
|
||||
className="settings-sidebar-header-image"
|
||||
src={`${api?.basePath}/Users/${user?.Id}/Images/Primary`}
|
||||
alt="user"
|
||||
alt="Пользователь"
|
||||
/>
|
||||
<div className="flex flex-column">
|
||||
<Typography
|
||||
@@ -59,14 +59,14 @@ function SettingsRoute() {
|
||||
{user?.Name}
|
||||
</Typography>
|
||||
<Typography variant="body2" sx={{ opacity: 0.5 }}>
|
||||
{user?.Policy?.IsAdministrator ? "Administrator" : "User"}
|
||||
{user?.Policy?.IsAdministrator ? "Администратор" : "Пользователь"}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<List
|
||||
component="nav"
|
||||
aria-label="settings navigation"
|
||||
aria-label="навигация по настройкам"
|
||||
className="settings-sidebar-list"
|
||||
sx={{
|
||||
width: "100%",
|
||||
@@ -83,18 +83,18 @@ function SettingsRoute() {
|
||||
letterSpacing: "0.1em",
|
||||
}}
|
||||
>
|
||||
General
|
||||
Общие
|
||||
</Typography>
|
||||
<ListItemLink
|
||||
to="/settings/preferences"
|
||||
icon="tune"
|
||||
primary="Preferences"
|
||||
primary="Настройки"
|
||||
className="settings-sidebar-list-item"
|
||||
/>
|
||||
<ListItemLink
|
||||
to="/settings/changeServer"
|
||||
icon="dns"
|
||||
primary="Servers"
|
||||
primary="Серверы"
|
||||
className="settings-sidebar-list-item"
|
||||
/>
|
||||
|
||||
@@ -109,12 +109,12 @@ function SettingsRoute() {
|
||||
letterSpacing: "0.1em",
|
||||
}}
|
||||
>
|
||||
System
|
||||
Система
|
||||
</Typography>
|
||||
<ListItemLink
|
||||
to="/settings/about"
|
||||
icon="info"
|
||||
primary="About"
|
||||
primary="О приложении"
|
||||
className="settings-sidebar-list-item"
|
||||
/>
|
||||
</List>
|
||||
|
||||
@@ -35,27 +35,27 @@ function RouteComponent() {
|
||||
</div>
|
||||
<div className="settings-about-table">
|
||||
<div className="settings-about-table-row">
|
||||
<Typography variant="subtitle1">Server Name</Typography>
|
||||
<Typography variant="subtitle1">Имя сервера</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{systemInfo.data.ServerName}
|
||||
</Typography>
|
||||
</div>
|
||||
<div className="settings-about-table-row">
|
||||
<Typography variant="subtitle1">Jellyfin Version</Typography>
|
||||
<Typography variant="subtitle1">Версия Jellyfin</Typography>
|
||||
<Typography variant="subtitle1">{systemInfo.data.Version}</Typography>
|
||||
</div>
|
||||
<div className="settings-about-table-row">
|
||||
<Typography variant="subtitle1">Update</Typography>
|
||||
<Typography variant="subtitle1">Обновление</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{updateInfo.data
|
||||
? `v${updateInfo.data.version}`
|
||||
: "No update available."}
|
||||
: "Обновлений нет."}
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
<div className="settings-about-links">
|
||||
<Typography variant="h6" style={{ marginBottom: "0.5em" }}>
|
||||
Links
|
||||
Ссылки
|
||||
</Typography>
|
||||
<Link href="https://github.com/prayag17/Blink">
|
||||
https://github.com/prayag17/Blink
|
||||
@@ -82,7 +82,7 @@ function RouteComponent() {
|
||||
>
|
||||
volunteer_activism
|
||||
</span>
|
||||
Support
|
||||
Поддержать
|
||||
</Fab>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -62,8 +62,8 @@ function ChangeServerRoute() {
|
||||
// Reload the page to reset API context and states
|
||||
window.location.href = "/";
|
||||
} catch (error) {
|
||||
console.error("Failed to switch server", error);
|
||||
enqueueSnackbar("Failed to switch server", { variant: "error" });
|
||||
console.error("Не удалось сменить сервер", error);
|
||||
enqueueSnackbar("Не удалось сменить сервер", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -71,10 +71,10 @@ function ChangeServerRoute() {
|
||||
try {
|
||||
await delServer(serverId);
|
||||
queryClient.invalidateQueries({ queryKey: ["servers"] });
|
||||
enqueueSnackbar("Server removed", { variant: "success" });
|
||||
enqueueSnackbar("Сервер удалён", { variant: "success" });
|
||||
} catch (error) {
|
||||
console.error("Failed to delete server", error);
|
||||
enqueueSnackbar("Failed to delete server", { variant: "error" });
|
||||
console.error("Не удалось удалить сервер", error);
|
||||
enqueueSnackbar("Не удалось удалить сервер", { variant: "error" });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -89,7 +89,7 @@ function ChangeServerRoute() {
|
||||
marginBottom: "2em",
|
||||
}}
|
||||
>
|
||||
<Typography variant="h4">Servers</Typography>
|
||||
<Typography variant="h4">Серверы</Typography>
|
||||
</div>
|
||||
|
||||
<Grid container spacing={3}>
|
||||
@@ -142,7 +142,7 @@ function ChangeServerRoute() {
|
||||
}}
|
||||
>
|
||||
<img
|
||||
alt={server.systemInfo?.ServerName || "Unknown Server"}
|
||||
alt={server.systemInfo?.ServerName || "Неизвестный сервер"}
|
||||
src={spalshUrl}
|
||||
style={{
|
||||
height: "100%",
|
||||
@@ -154,7 +154,7 @@ function ChangeServerRoute() {
|
||||
|
||||
{isActive && (
|
||||
<Chip
|
||||
label="Active"
|
||||
label="Активный"
|
||||
size="small"
|
||||
color="primary"
|
||||
sx={{
|
||||
@@ -214,14 +214,14 @@ function ChangeServerRoute() {
|
||||
variant="h5"
|
||||
component="div"
|
||||
noWrap
|
||||
title={server.systemInfo?.ServerName || "Unknown Server"}
|
||||
title={server.systemInfo?.ServerName || "Неизвестный сервер"}
|
||||
sx={{
|
||||
fontWeight: "bold",
|
||||
mb: 0.5,
|
||||
letterSpacing: "-0.02em",
|
||||
}}
|
||||
>
|
||||
{server.systemInfo?.ServerName || "Unknown Server"}
|
||||
{server.systemInfo?.ServerName || "Неизвестный сервер"}
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="body2"
|
||||
@@ -279,7 +279,7 @@ function ChangeServerRoute() {
|
||||
px: 3,
|
||||
}}
|
||||
>
|
||||
Connect
|
||||
Подключиться
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
@@ -298,7 +298,7 @@ function ChangeServerRoute() {
|
||||
},
|
||||
}}
|
||||
>
|
||||
Connected
|
||||
Подключено
|
||||
</Button>
|
||||
)}
|
||||
</CardActions>
|
||||
@@ -363,7 +363,7 @@ function ChangeServerRoute() {
|
||||
fontWeight: "bold",
|
||||
}}
|
||||
>
|
||||
Add Server
|
||||
Добавить сервер
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="body2"
|
||||
@@ -372,7 +372,7 @@ function ChangeServerRoute() {
|
||||
mt: 1,
|
||||
}}
|
||||
>
|
||||
Connect to a new Jellyfin server
|
||||
Подключиться к новому серверу Jellyfin
|
||||
</Typography>
|
||||
</Card>
|
||||
</Grid>
|
||||
|
||||
@@ -72,7 +72,7 @@ function RouteComponent() {
|
||||
// },
|
||||
// },
|
||||
// });
|
||||
enqueueSnackbar("Settings saved", {
|
||||
enqueueSnackbar("Настройки сохранены", {
|
||||
variant: "success",
|
||||
});
|
||||
},
|
||||
@@ -80,7 +80,7 @@ function RouteComponent() {
|
||||
|
||||
return (
|
||||
<div className="settings-page-scrollY">
|
||||
<Typography variant="h4">Preferences</Typography>
|
||||
<Typography variant="h4">Настройки</Typography>
|
||||
{/* <form.Pro */}
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
@@ -89,7 +89,7 @@ function RouteComponent() {
|
||||
form.handleSubmit();
|
||||
}}
|
||||
onError={() =>
|
||||
enqueueSnackbar("Error saving settings", { variant: "error" })
|
||||
enqueueSnackbar("Не удалось сохранить настройки", { variant: "error" })
|
||||
}
|
||||
className="settings-form"
|
||||
>
|
||||
@@ -113,7 +113,7 @@ function RouteComponent() {
|
||||
}}
|
||||
>
|
||||
<MenuItem key={"anyLanguage"} value={"anyLanguage"}>
|
||||
Any Language
|
||||
Любой язык
|
||||
</MenuItem>
|
||||
{cultures.data?.map((option) => (
|
||||
<MenuItem
|
||||
@@ -133,13 +133,13 @@ function RouteComponent() {
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
Preferred Audio Language
|
||||
Предпочитаемый язык аудио
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="caption"
|
||||
className="settings-option-info-caption"
|
||||
>
|
||||
Choose your preferred audio language.
|
||||
Выберите предпочитаемый язык аудио.
|
||||
</Typography>
|
||||
</div>
|
||||
}
|
||||
@@ -171,14 +171,14 @@ function RouteComponent() {
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
Play default audio track regardless of language
|
||||
Воспроизводить аудиодорожку по умолчанию независимо от языка
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="caption"
|
||||
className="settings-option-info-caption"
|
||||
>
|
||||
Play the default audio track of the media item, even if it
|
||||
does not match your preferred audio language.
|
||||
Воспроизводить аудиодорожку по умолчанию, даже если она
|
||||
не совпадает с предпочитаемым языком.
|
||||
</Typography>
|
||||
</div>
|
||||
}
|
||||
@@ -208,7 +208,7 @@ function RouteComponent() {
|
||||
}}
|
||||
>
|
||||
<MenuItem key={"anyLanguage"} value={"anyLanguage"}>
|
||||
Any Language
|
||||
Любой язык
|
||||
</MenuItem>
|
||||
{cultures.data?.map((option) => (
|
||||
<MenuItem
|
||||
@@ -228,13 +228,13 @@ function RouteComponent() {
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
Preferred Subtitle Language
|
||||
Предпочитаемый язык субтитров
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="caption"
|
||||
className="settings-option-info-caption"
|
||||
>
|
||||
Choose your preferred subtitle language.
|
||||
Выберите предпочитаемый язык субтитров.
|
||||
</Typography>
|
||||
</div>
|
||||
}
|
||||
@@ -266,14 +266,14 @@ function RouteComponent() {
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
Set subtitle track based on previous item
|
||||
Выбирать субтитры по предыдущему элементу
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="caption"
|
||||
className="settings-option-info-caption"
|
||||
>
|
||||
Try to set the subtitle track to the closest match to the
|
||||
last video.
|
||||
Пытаться выбрать субтитры, наиболее подходящие к
|
||||
предыдущему видео.
|
||||
</Typography>
|
||||
</div>
|
||||
}
|
||||
@@ -284,7 +284,7 @@ function RouteComponent() {
|
||||
}}
|
||||
</form.Field>
|
||||
<Button type="submit" size="large" variant="contained">
|
||||
Save
|
||||
Сохранить
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -28,10 +28,10 @@ function ErrorRoute() {
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Error connecting server.
|
||||
Не удалось подключиться к серверу.
|
||||
</Typography>
|
||||
<Typography variant="subtitle2" style={{ opacity: 0.6 }}>
|
||||
Check your internet connection or contact your server administrator
|
||||
Проверьте подключение к интернету или обратитесь к администратору сервера
|
||||
</Typography>
|
||||
<div
|
||||
className="flex flex-center"
|
||||
@@ -42,16 +42,16 @@ function ErrorRoute() {
|
||||
to="/setup/server/list"
|
||||
variant="contained"
|
||||
>
|
||||
Change Server
|
||||
Сменить сервер
|
||||
</Button>
|
||||
<Button variant="contained" onClick={async () => await relaunch()}>
|
||||
Restart Blink
|
||||
Перезапустить Blink
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
default:
|
||||
return <div>Error</div>;
|
||||
return <div>Ошибка</div>;
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ function ServerSetup() {
|
||||
setDefaultServer(bestServer.systemInfo?.Id);
|
||||
setServer(bestServer.systemInfo?.Id, bestServer);
|
||||
|
||||
enqueueSnackbar("Client added successfully", {
|
||||
enqueueSnackbar("Сервер добавлен", {
|
||||
variant: "success",
|
||||
});
|
||||
|
||||
@@ -51,12 +51,12 @@ function ServerSetup() {
|
||||
onError: (err) => {
|
||||
console.error(err);
|
||||
enqueueSnackbar(`${JSON.stringify(err)}`, { variant: "error" });
|
||||
enqueueSnackbar("Something went wrong", { variant: "error" });
|
||||
enqueueSnackbar("Что-то пошло не так", { variant: "error" });
|
||||
},
|
||||
onSettled: (bestServer) => {
|
||||
console.log(bestServer);
|
||||
if (!bestServer) {
|
||||
enqueueSnackbar("Provided server address is not a Jellyfin server.", {
|
||||
enqueueSnackbar("Указанный адрес не является сервером Jellyfin.", {
|
||||
variant: "error",
|
||||
});
|
||||
}
|
||||
@@ -106,7 +106,7 @@ function ServerSetup() {
|
||||
lineHeight: 1.5,
|
||||
}}
|
||||
>
|
||||
Enter your Jellyfin server address to get started
|
||||
Введите адрес сервера Jellyfin, чтобы начать
|
||||
</Typography>
|
||||
|
||||
<form
|
||||
@@ -143,7 +143,7 @@ function ServerSetup() {
|
||||
loading={checkServer.isPending}
|
||||
type="submit"
|
||||
>
|
||||
Connect
|
||||
Подключиться
|
||||
</LoadingButton>
|
||||
</form>
|
||||
</Stack>
|
||||
@@ -166,7 +166,7 @@ function ServerSetup() {
|
||||
info
|
||||
</span>
|
||||
<Typography variant="subtitle1">
|
||||
Example: https://demo.jellyfin.org/stable
|
||||
Пример: https://demo.jellyfin.org/stable
|
||||
</Typography>
|
||||
</Stack>
|
||||
</div>
|
||||
|
||||
@@ -13,20 +13,20 @@ export const Route = createFileRoute("/setup/server/error")({
|
||||
<span className="material-symbols-rounded fill gradient-text">
|
||||
report
|
||||
</span>
|
||||
<Typography variant="h4">Unable to connect to server!</Typography>
|
||||
<Typography variant="h4">Не удалось подключиться к серверу!</Typography>
|
||||
<div className="flex flex-align-center" style={{ gap: "1em" }}>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => navigate({ to: "/setup/server/list" })}
|
||||
>
|
||||
Change Server
|
||||
Сменить сервер
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
onClick={async () => await relaunch()}
|
||||
>
|
||||
Restart Blink
|
||||
Перезапустить Blink
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@ function ServerList() {
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error(error);
|
||||
enqueueSnackbar("Error changing the server", {
|
||||
enqueueSnackbar("Не удалось сменить сервер", {
|
||||
variant: "error",
|
||||
});
|
||||
},
|
||||
@@ -87,7 +87,7 @@ function ServerList() {
|
||||
queryClient.removeQueries();
|
||||
navigate({ to: "/" });
|
||||
}
|
||||
enqueueSnackbar("Server deleted successfully!", { variant: "success" });
|
||||
enqueueSnackbar("Сервер удалён.", { variant: "success" });
|
||||
|
||||
await servers.refetch();
|
||||
await defaultServer.refetch();
|
||||
@@ -137,7 +137,7 @@ function ServerList() {
|
||||
fontWeight: "bold",
|
||||
}}
|
||||
>
|
||||
Servers
|
||||
Серверы
|
||||
</Typography>
|
||||
<IconButton
|
||||
onClick={() => setAddServerDialog(true)}
|
||||
@@ -185,7 +185,7 @@ function ServerList() {
|
||||
{server.systemInfo?.ServerName}
|
||||
{server.id === defaultServer.data && (
|
||||
<Chip
|
||||
label="Current"
|
||||
label="Текущий"
|
||||
color="primary"
|
||||
size="small"
|
||||
sx={{ height: 20, fontSize: "0.7rem", fontWeight: 700 }}
|
||||
|
||||
Reference in new issue
Block a user