feat(mobile): adapt every page to phone widths
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Compact headers and dialogs, two-column grids, responsive item heroes, player controls, settings tabs, login and server setup screens.
This commit is contained in:
1 parent
d80db29a02
commit
2e099ecafa
29 files changed
+996
-27
No files matched your search
@@ -191,3 +191,76 @@
|
||||
.appLoading {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.appBar {
|
||||
padding: 0.55rem 0.6rem !important;
|
||||
|
||||
html.is-macos & {
|
||||
padding-left: 76px !important;
|
||||
}
|
||||
|
||||
.appBar-groups,
|
||||
.appBar-cast,
|
||||
.appBar-favorite,
|
||||
[aria-label="Главная"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
&-title {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.library-drawer.MuiDrawer-paper {
|
||||
width: min(84vw, 320px);
|
||||
margin: 8px;
|
||||
height: calc(100% - 16px) !important;
|
||||
border-radius: 20px;
|
||||
background: rgb(18 18 24 / 0.98) !important;
|
||||
backdrop-filter: blur(24px) saturate(160%);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.back-only-bar {
|
||||
html.is-macos & {
|
||||
padding-left: 76px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.qc-label-short {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.qc-label-full {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.qc-label-short {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.back-only-bar .MuiButton-root {
|
||||
height: 38px;
|
||||
min-height: 38px;
|
||||
padding: 0 0.85rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.72rem;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.appBar-title {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@@ -133,13 +133,16 @@ const AppBarContent = () => {
|
||||
>
|
||||
<Tooltip title="Смотреть вместе">
|
||||
<IconButton
|
||||
className="appBar-groups"
|
||||
onClick={openSyncPlayDialog}
|
||||
aria-label="Смотреть вместе"
|
||||
>
|
||||
<span className="material-symbols-rounded">groups</span>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
<CastButton />
|
||||
<span className="appBar-cast">
|
||||
<CastButton />
|
||||
</span>
|
||||
<Tooltip title="Поиск">
|
||||
<IconButton onClick={toggleSearchDialog} aria-label="Поиск">
|
||||
<span className="material-symbols-rounded">search</span>
|
||||
@@ -155,6 +158,7 @@ const AppBarContent = () => {
|
||||
</Tooltip>
|
||||
<Tooltip title="Избранное">
|
||||
<IconButton
|
||||
className="appBar-favorite"
|
||||
onClick={handleNavigateToFavorite}
|
||||
aria-label="Избранное"
|
||||
>
|
||||
|
||||
@@ -16,7 +16,12 @@ export default function AppBarBackOnly() {
|
||||
const hideQuickConnect = location.pathname === "/setup/server/list";
|
||||
|
||||
return (
|
||||
<AppBar elevation={0} color="transparent" position="fixed">
|
||||
<AppBar
|
||||
className="back-only-bar"
|
||||
elevation={0}
|
||||
color="transparent"
|
||||
position="fixed"
|
||||
>
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
size="large"
|
||||
|
||||
@@ -5,10 +5,12 @@ import {
|
||||
List,
|
||||
ListItem,
|
||||
ListItemButton,
|
||||
ListItemText,
|
||||
Typography,
|
||||
} from "@mui/material";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import React, { useEffect, useMemo } from "react";
|
||||
import { openSyncPlayDialog } from "@/utils/methods/syncPlay";
|
||||
import { useApiInContext } from "@/utils/store/api";
|
||||
import { useCentralStore } from "@/utils/store/central";
|
||||
import ListItemLink from "../listItemLink";
|
||||
@@ -104,6 +106,17 @@ export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||
primary="Избранное"
|
||||
onClick={onClose}
|
||||
/>
|
||||
<ListItem className="library-drawer-item">
|
||||
<ListItemButton
|
||||
onClick={() => {
|
||||
onClose();
|
||||
openSyncPlayDialog();
|
||||
}}
|
||||
>
|
||||
<span className="material-symbols-rounded">groups</span>
|
||||
<ListItemText primary="Смотреть вместе" />
|
||||
</ListItemButton>
|
||||
</ListItem>
|
||||
{libraries.isSuccess &&
|
||||
libraries.data?.Items?.map((library) => (
|
||||
<ListItemLink
|
||||
|
||||
@@ -181,9 +181,16 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
||||
variant={props.variant ?? "contained"}
|
||||
onClick={() => initQuickConnect.mutate()}
|
||||
>
|
||||
{quickConnectEnabled.data?.data
|
||||
? "Войти через Quick Connect"
|
||||
: "Quick Connect недоступен"}
|
||||
<span className="qc-label-full">
|
||||
{quickConnectEnabled.data?.data
|
||||
? "Войти через Quick Connect"
|
||||
: "Quick Connect недоступен"}
|
||||
</span>
|
||||
<span className="qc-label-short">
|
||||
{quickConnectEnabled.data?.data
|
||||
? "Quick Connect"
|
||||
: "QC недоступен"}
|
||||
</span>
|
||||
</LoadingButton>
|
||||
<Dialog
|
||||
open={Boolean(quickConnectCode)}
|
||||
|
||||
@@ -111,9 +111,9 @@ export default function CardScroller({
|
||||
},
|
||||
smallScreen: {
|
||||
breakpoint: { max: 424, min: 0 },
|
||||
items: 1,
|
||||
slidesToSlide: 1,
|
||||
partialVisibilityGutter: 10,
|
||||
items: 2,
|
||||
slidesToSlide: 2,
|
||||
partialVisibilityGutter: 12,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -502,6 +502,10 @@ body.has-player-bar .cinema-hero .hero-carousel-overview {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cinema-trending-head .cinema-dots {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cinema-trending-card {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
@@ -239,3 +239,74 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.item-detail-page.item {
|
||||
padding: 0.75rem 1rem 7.5rem !important;
|
||||
|
||||
.item-detail {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1.5em;
|
||||
justify-items: stretch;
|
||||
}
|
||||
|
||||
.item-detail-cast-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 0.6em;
|
||||
}
|
||||
|
||||
.item-detail-cast-card {
|
||||
grid-template-columns: 4em 1fr;
|
||||
}
|
||||
|
||||
.item-detail-cast-card-image,
|
||||
.item-detail-cast-card-icon {
|
||||
width: 4em;
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
.item-detail-episode {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.75em;
|
||||
padding: 0.75em 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.item-detail-episode-info {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.item-detail-episode-image-container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.item-detail-person-cards.col-7,
|
||||
.item-detail-person-cards.col-4 {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.fullWidth {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item-detail-external-links {
|
||||
align-self: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 701px) and (max-width: 1000px) {
|
||||
.item-detail-page.item {
|
||||
.item-detail {
|
||||
grid-template-columns: 1fr 32%;
|
||||
gap: 2em;
|
||||
}
|
||||
|
||||
.item-detail-cast-grid {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,3 +93,99 @@ $cardWidth: 18%;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.item-hero {
|
||||
height: auto;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 1rem;
|
||||
padding: 5.5rem 1rem 7.5rem;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
|
||||
&-image-container {
|
||||
width: min(46vw, 190px);
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
&-logo {
|
||||
max-width: 82vw;
|
||||
max-height: 5.5rem;
|
||||
margin: 0 auto 0.4em;
|
||||
object-position: center bottom;
|
||||
}
|
||||
|
||||
&-detail {
|
||||
align-items: center;
|
||||
gap: 0.6em;
|
||||
|
||||
.MuiStack-root {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 0.6em 1em !important;
|
||||
}
|
||||
|
||||
.MuiTypography-h4 {
|
||||
margin-bottom: 0.5em !important;
|
||||
font-size: 1.35rem;
|
||||
}
|
||||
}
|
||||
|
||||
&-mediaInfo {
|
||||
height: 0.95em;
|
||||
}
|
||||
|
||||
&-buttons-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.9em;
|
||||
|
||||
> .flex {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
&-backdrop-container {
|
||||
height: 70vh;
|
||||
}
|
||||
|
||||
.play-button {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 701px) and (max-width: 1000px) {
|
||||
.item-hero {
|
||||
height: auto;
|
||||
min-height: 75vh;
|
||||
grid-template-columns: 24% 1fr;
|
||||
padding-top: 4.5rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
&-logo {
|
||||
max-height: 8rem;
|
||||
}
|
||||
|
||||
&-detail {
|
||||
.MuiStack-root {
|
||||
flex-wrap: wrap;
|
||||
gap: 0.6em 1.2em !important;
|
||||
}
|
||||
|
||||
.MuiTypography-h4 {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
&-buttons-container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,3 +68,63 @@
|
||||
padding: 6px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.library-header {
|
||||
inset: 0.5em 0.5em auto 0.5em !important;
|
||||
width: auto !important;
|
||||
flex-wrap: wrap;
|
||||
border-radius: 22px;
|
||||
padding: 0.3em 0.5em !important;
|
||||
row-gap: 0.2em;
|
||||
|
||||
html.is-macos & {
|
||||
left: 76px !important;
|
||||
right: 0.5em !important;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
> .flex.flex-row:first-child {
|
||||
[aria-label="Главная"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.library-header-center {
|
||||
order: 3;
|
||||
width: 100%;
|
||||
padding-top: 0.35em;
|
||||
border-top: 1px solid rgb(255 255 255 / 0.08);
|
||||
gap: 0.4em !important;
|
||||
|
||||
.library-title-count {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.MuiTextField-root {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.MuiInputBase-root {
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
[aria-label="Изменить порядок сортировки"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.library-header-actions {
|
||||
gap: 0.15em !important;
|
||||
}
|
||||
}
|
||||
|
||||
.library-items {
|
||||
padding: 7.8em 0.75rem 7.5em !important;
|
||||
}
|
||||
|
||||
.alpha-selector {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,8 @@ const LibraryItemsGrid = () => {
|
||||
if (Math.abs(width - lastWidth) < 1) return;
|
||||
lastWidth = width;
|
||||
setContainerWidth(width);
|
||||
setColumns(Math.max(1, Math.floor(width / 180)));
|
||||
const minCardWidth = width < 700 ? 140 : 180;
|
||||
setColumns(Math.max(1, Math.floor(width / minCardWidth)));
|
||||
// Read offsetTop after the browser has applied the new columns.
|
||||
frame = requestAnimationFrame(() => {
|
||||
frame = 0;
|
||||
|
||||
@@ -276,3 +276,19 @@
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.login-shell {
|
||||
padding: 4.5rem 1rem 2rem;
|
||||
}
|
||||
|
||||
.profile-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 160px));
|
||||
}
|
||||
|
||||
.profile-name {
|
||||
white-space: normal;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
@@ -432,3 +432,68 @@ $art-size: 48px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.audio-player {
|
||||
width: calc(100% - 1rem);
|
||||
height: 66px;
|
||||
bottom: 0.5rem;
|
||||
padding: 0 0.55rem;
|
||||
gap: 0.5rem;
|
||||
border-radius: 14px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.media-bar-left {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
flex: 1 1 auto;
|
||||
gap: 0.55rem;
|
||||
}
|
||||
|
||||
.media-bar-cover {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
flex: 0 0 44px;
|
||||
}
|
||||
|
||||
.media-bar-more {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.media-bar-center {
|
||||
flex: 0 0 auto;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.media-bar-controls {
|
||||
gap: 0;
|
||||
|
||||
> :first-child,
|
||||
> :last-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.MuiIconButton-root {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.media-bar-play {
|
||||
width: 40px !important;
|
||||
height: 40px !important;
|
||||
margin: 0 0.1rem;
|
||||
}
|
||||
|
||||
.media-bar-progress,
|
||||
.media-bar-right {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.media-bar-title {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,4 +145,63 @@ html.is-macos .video-player-titlebar.is-fullscreen {
|
||||
// then catch clicks in the top corners while invisible.
|
||||
.video-player-osd:not(.hovering) .video-player-titlebar {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.video-player-osd {
|
||||
padding: 0.75em 1em;
|
||||
}
|
||||
|
||||
.video-player-osd-info {
|
||||
> div:first-child {
|
||||
.MuiTypography-h4 {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 0.4em !important;
|
||||
}
|
||||
|
||||
.MuiTypography-h6 {
|
||||
font-size: 0.9rem;
|
||||
margin-top: 0.15em !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.video-player-osd-controls {
|
||||
gap: 0.6em;
|
||||
|
||||
> .flex.flex-row {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
> .flex.flex-row > .video-player-osd-controls-buttons:last-child {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.video-player-osd-controls-buttons {
|
||||
gap: 0.25em;
|
||||
|
||||
/* Keep previous, play/pause and next; drop the rest. */
|
||||
> :nth-child(2),
|
||||
> :nth-child(3),
|
||||
> :nth-child(5),
|
||||
> :nth-child(6),
|
||||
> :nth-child(8) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.MuiIconButton-root {
|
||||
padding: 0.55em;
|
||||
}
|
||||
|
||||
> :nth-child(4) .MuiIconButton-root {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
background: rgb(255 255 255 / 0.1);
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.video-player-osd-controls-timeline-text {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user