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
@@ -139,3 +139,28 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.favorite-page {
|
||||
padding: 4.8rem 0 7rem !important;
|
||||
}
|
||||
|
||||
.favorite-page .favorite-header {
|
||||
padding: 0 1rem;
|
||||
|
||||
h1 {
|
||||
font-size: 1.65rem;
|
||||
}
|
||||
}
|
||||
|
||||
.favorite-page .favorite-content .overview-section {
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
.favorite-page .favorite-content .grid-section,
|
||||
.favorite-page .favorite-content .grid-section.grid-landscape {
|
||||
padding: 0.5rem 1rem;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
}
|
||||
@@ -267,7 +267,22 @@ body.has-player-bar .home-sections {
|
||||
}
|
||||
|
||||
.home-header {
|
||||
padding: 1rem 1.1rem;
|
||||
padding: 0.55rem 0.8rem 1rem;
|
||||
|
||||
.home-header-groups,
|
||||
.home-header-cast {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&-logo {
|
||||
font-size: 1.4rem;
|
||||
gap: 0.35rem;
|
||||
|
||||
&-mark {
|
||||
width: 1.7rem;
|
||||
height: 1.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.MuiIconButton-root {
|
||||
width: 34px;
|
||||
@@ -275,6 +290,21 @@ body.has-player-bar .home-sections {
|
||||
}
|
||||
}
|
||||
|
||||
.cinema-trending {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.cinema-trending-head {
|
||||
h3 {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cinema-dots {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.home-sections {
|
||||
padding: 2rem 1.1rem 8rem;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
|
||||
<div className="home-header-right">
|
||||
<IconButton
|
||||
className="home-header-groups"
|
||||
aria-label="Смотреть вместе"
|
||||
title="Смотреть вместе"
|
||||
onClick={openSyncPlayDialog}
|
||||
@@ -113,7 +114,9 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
<IconButton aria-label="Поиск" onClick={toggleSearchDialog}>
|
||||
<span className="material-symbols-rounded">search</span>
|
||||
</IconButton>
|
||||
<CastButton />
|
||||
<span className="home-header-cast">
|
||||
<CastButton />
|
||||
</span>
|
||||
<IconButton
|
||||
aria-label="Избранное"
|
||||
onClick={() => navigate({ to: "/favorite" })}
|
||||
|
||||
@@ -267,7 +267,8 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
||||
</div>
|
||||
}
|
||||
>
|
||||
{upNextItems.isSuccess && upNextItems.data?.TotalRecordCount && (
|
||||
{upNextItems.isSuccess &&
|
||||
(upNextItems.data?.TotalRecordCount ?? 0) > 0 && (
|
||||
<CardScroller displayCards={4} title="Далее">
|
||||
{upNextItems.data?.Items?.map((item) => {
|
||||
return (
|
||||
|
||||
@@ -214,3 +214,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.library.padded-top {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.library-items {
|
||||
padding-top: 8.4em !important;
|
||||
}
|
||||
}
|
||||
@@ -574,6 +574,10 @@ html.is-macos .remote-topbar-right .remote-topbar-divider {
|
||||
}
|
||||
|
||||
@media (max-width: 820px) {
|
||||
.remote-page {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.remote-topbar {
|
||||
height: 52px;
|
||||
padding: 0 16px;
|
||||
@@ -583,19 +587,80 @@ html.is-macos .remote-topbar-right .remote-topbar-divider {
|
||||
padding-left: 76px;
|
||||
}
|
||||
|
||||
.remote-body {
|
||||
flex: 0 0 auto;
|
||||
flex-direction: column;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.remote-devices {
|
||||
flex: 0 0 auto;
|
||||
width: 100%;
|
||||
padding: 0.5rem 1rem 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.remote-devices-title {
|
||||
margin: 0 0 0.4em 0.2em;
|
||||
}
|
||||
|
||||
.remote-device-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 0.4em;
|
||||
overflow: visible;
|
||||
padding-bottom: 0.25em;
|
||||
}
|
||||
|
||||
.remote-device {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.remote-hero {
|
||||
flex: 0 0 auto;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
overflow: visible;
|
||||
padding: 0.5rem 1rem 0;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.remote-poster {
|
||||
height: auto;
|
||||
width: min(56vw, 210px);
|
||||
max-height: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.remote-details {
|
||||
width: 100%;
|
||||
padding-top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.remote-title {
|
||||
font-size: 1.55rem;
|
||||
}
|
||||
|
||||
.remote-subtitle {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.remote-transport {
|
||||
justify-content: center;
|
||||
gap: 0.55rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.remote-round {
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.remote-round.remote-round-primary {
|
||||
width: 66px;
|
||||
height: 66px;
|
||||
}
|
||||
|
||||
.remote-chips {
|
||||
@@ -605,17 +670,36 @@ html.is-macos .remote-topbar-right .remote-topbar-divider {
|
||||
.remote-overview {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.remote-timeline {
|
||||
padding: 0.5rem 1rem 0;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.remote-time {
|
||||
font-size: 0.85rem;
|
||||
min-width: 3.6em;
|
||||
}
|
||||
|
||||
.remote-bottombar {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
justify-content: flex-start;
|
||||
gap: 0.35rem;
|
||||
height: auto;
|
||||
padding: 12px 16px;
|
||||
padding: 0.5rem 1rem 1rem;
|
||||
}
|
||||
|
||||
.remote-bottom-item {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.remote-bottom-volume {
|
||||
flex-basis: 200px;
|
||||
flex-basis: auto;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,12 +108,7 @@ function SearchPage() {
|
||||
handleClearCategories={() => setSelectedCategories([])}
|
||||
/>
|
||||
|
||||
<div
|
||||
className="search-page-content"
|
||||
style={{
|
||||
paddingTop: "4.4em",
|
||||
}}
|
||||
>
|
||||
<div className="search-page-content">
|
||||
{debouncedSearchTerm ? (
|
||||
<SearchResultsList
|
||||
categories={activeCategories}
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
width: 100%;
|
||||
align-self: center;
|
||||
z-index: 1;
|
||||
padding-top: 4.4em;
|
||||
}
|
||||
|
||||
// Input Container adapted for the pill header
|
||||
@@ -192,3 +193,56 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.search-page .search-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.25em;
|
||||
|
||||
html.is-macos & {
|
||||
left: 76px !important;
|
||||
right: 0.5em !important;
|
||||
width: auto !important;
|
||||
/* The window traffic lights are already cleared by the offset. */
|
||||
padding-left: 0.5em !important;
|
||||
}
|
||||
|
||||
.library-header-center {
|
||||
order: 3;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search-input-container {
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
.search-category-select {
|
||||
display: none;
|
||||
}
|
||||
|
||||
> .flex.flex-row:last-child [aria-label="Избранное"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.search-page-content {
|
||||
padding: 8.4em 1rem 8rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 701px) and (max-width: 900px) {
|
||||
.search-page .search-header {
|
||||
.search-category-select {
|
||||
display: block;
|
||||
}
|
||||
|
||||
> .flex.flex-row:last-child [aria-label="Избранное"] {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,4 +177,166 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.settings-page-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.settings-sidebar {
|
||||
flex: 0 0 auto;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.25em;
|
||||
width: 100%;
|
||||
padding: 0.4rem 0.6rem;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid rgb(255 255 255 / 0.06);
|
||||
overflow-x: auto;
|
||||
box-sizing: border-box;
|
||||
|
||||
html.is-macos & {
|
||||
padding-top: 0.4rem;
|
||||
padding-left: 76px;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.settings-sidebar-controls {
|
||||
padding-bottom: 0;
|
||||
gap: 0.15em;
|
||||
}
|
||||
|
||||
.settings-sidebar-list {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.2em;
|
||||
overflow-x: auto;
|
||||
|
||||
.MuiTypography-overline {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-sidebar-list-item .MuiButtonBase-root {
|
||||
white-space: nowrap;
|
||||
padding: 0.5em 0.75em !important;
|
||||
}
|
||||
|
||||
.settings-page-scrollY {
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
padding: 1rem !important;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.settings-form {
|
||||
margin-top: 1rem;
|
||||
|
||||
.MuiTextField-root {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
button[type="submit"] {
|
||||
width: 100%;
|
||||
align-self: stretch;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-option {
|
||||
align-items: flex-start !important;
|
||||
|
||||
.MuiFormControlLabel-label {
|
||||
width: calc(100% - 60px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.settings-sidebar {
|
||||
flex-wrap: wrap;
|
||||
overflow: visible;
|
||||
row-gap: 0.25em;
|
||||
}
|
||||
|
||||
.settings-sidebar-list {
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.settings-sidebar-list-item {
|
||||
width: auto !important;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.settings-sidebar-list-item .MuiButtonBase-root {
|
||||
width: auto;
|
||||
padding: 0.4em 0.6em !important;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.settings-sidebar-controls {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
|
||||
[aria-label="Главная"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-page-scrollY {
|
||||
padding: 0.75rem 1rem 7.5rem !important;
|
||||
}
|
||||
|
||||
.settings-form {
|
||||
gap: 1.1em;
|
||||
|
||||
.MuiFormControlLabel-root:not(.settings-option) {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.45em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.MuiFormControlLabel-label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.MuiTextField-root {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-option {
|
||||
align-items: flex-start !important;
|
||||
gap: 0.75em;
|
||||
|
||||
.MuiFormControlLabel-label {
|
||||
width: auto;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.settings-form .settings-option:has(.MuiTextField-root) {
|
||||
flex-direction: column;
|
||||
align-items: stretch !important;
|
||||
gap: 0.45em;
|
||||
|
||||
.MuiFormControlLabel-label {
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.MuiTextField-root {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
import { createFileRoute, Outlet, useNavigate } from "@tanstack/react-router";
|
||||
import {
|
||||
createFileRoute,
|
||||
Outlet,
|
||||
useLocation,
|
||||
useNavigate,
|
||||
} from "@tanstack/react-router";
|
||||
import React, { useCallback, useEffect } from "react";
|
||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||
|
||||
@@ -22,9 +27,17 @@ function SettingsRoute() {
|
||||
setBackdrop("");
|
||||
});
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const handleNavigateHome = useCallback(() => {
|
||||
navigate({ to: "/home" });
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const active = document.querySelector(
|
||||
".settings-sidebar-list [data-status='active']",
|
||||
) as HTMLElement | null;
|
||||
active?.scrollIntoView({ block: "nearest", inline: "center" });
|
||||
}, [location.pathname]);
|
||||
return (
|
||||
<div className="settings-page-container" data-tauri-drag-region>
|
||||
<div className="settings-sidebar">
|
||||
|
||||
@@ -53,4 +53,26 @@
|
||||
|
||||
body.has-player-bar .settings-about-container .MuiFab-root {
|
||||
bottom: calc(2em + 104px);
|
||||
}
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.settings-about {
|
||||
&-logo {
|
||||
width: min(220px, 70%);
|
||||
}
|
||||
|
||||
&-table,
|
||||
&-links {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
&-table-row {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.15em;
|
||||
}
|
||||
|
||||
&-container {
|
||||
padding-bottom: 5.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,7 @@ function ServerList() {
|
||||
<div className="server-list flex flex-column flex-center centered">
|
||||
<AppBarBackOnly />
|
||||
<Paper
|
||||
className="server-list-container"
|
||||
sx={{
|
||||
p: 4,
|
||||
width: "100%",
|
||||
|
||||
@@ -19,3 +19,34 @@
|
||||
border-radius: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.serverContainer {
|
||||
width: 100%;
|
||||
max-width: 40em;
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
.MuiPaper-root {
|
||||
padding: 1.25rem !important;
|
||||
}
|
||||
|
||||
.MuiStack-root {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 140px !important;
|
||||
}
|
||||
|
||||
.MuiTypography-body1 {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
> .MuiStack-root:last-child {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,3 +53,29 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.server-list {
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
&-container {
|
||||
width: 100%;
|
||||
max-height: 72vh;
|
||||
}
|
||||
|
||||
.server-list-container {
|
||||
padding: 1.25rem !important;
|
||||
}
|
||||
|
||||
.MuiTypography-h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
&-item {
|
||||
padding: 0.75rem !important;
|
||||
gap: 0.75rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user