feat(mobile): add dev phone preview and system-bar safe areas
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
This commit is contained in:
1 parent
c15742ff2a
commit
7fb3d6cfa4
30 files changed
+304
-81
No files matched your search
@@ -24,8 +24,9 @@
|
||||
z-index: 6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 46px;
|
||||
padding: 4px 8px;
|
||||
min-height: calc(46px + var(--safe-top));
|
||||
padding: calc(4px + var(--safe-top)) 8px 4px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&-end {
|
||||
margin-left: auto;
|
||||
@@ -34,7 +35,7 @@
|
||||
|
||||
&-collapse {
|
||||
position: absolute;
|
||||
top: 58px;
|
||||
top: calc(58px + var(--safe-top));
|
||||
right: 22px;
|
||||
z-index: 6;
|
||||
display: grid;
|
||||
@@ -68,7 +69,7 @@
|
||||
|
||||
&-stage {
|
||||
position: absolute;
|
||||
inset: 46px 0 96px;
|
||||
inset: calc(46px + var(--safe-top)) 0 calc(96px + var(--safe-bottom));
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -209,8 +210,8 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
height: 96px;
|
||||
padding: 0 clamp(1.25rem, 3vw, 3rem);
|
||||
height: calc(96px + var(--safe-bottom));
|
||||
padding: 0 clamp(1.25rem, 3vw, 3rem) var(--safe-bottom);
|
||||
box-sizing: border-box;
|
||||
|
||||
.MuiIconButton-root {
|
||||
@@ -561,12 +562,29 @@
|
||||
position: static;
|
||||
}
|
||||
|
||||
&-main {
|
||||
transition:
|
||||
transform 0.32s cubic-bezier(0.2, 0, 0, 1),
|
||||
opacity 0.25s ease;
|
||||
}
|
||||
|
||||
&.has-panel &-main {
|
||||
transform: translateX(-120%);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&-panel {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
bottom: 0;
|
||||
width: min(84vw, 520px);
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgb(12 10 20 / 0.97),
|
||||
rgb(12 10 20 / 0.93)
|
||||
);
|
||||
backdrop-filter: blur(24px) saturate(150%);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,8 +457,8 @@ function AudioPlayerRoute() {
|
||||
</span>
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label="Показать очередь"
|
||||
onClick={() => setPanelTab("queue")}
|
||||
aria-label="Закрыть"
|
||||
onClick={() => setPanelOpen(false)}
|
||||
>
|
||||
<span className="material-symbols-rounded">close</span>
|
||||
</IconButton>
|
||||
@@ -479,31 +479,43 @@ function AudioPlayerRoute() {
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div className="music-player-panel-body">
|
||||
{upcoming.length === 0 ? (
|
||||
<p className="music-player-panel-empty">
|
||||
Очередь пуста. Запустите альбом или плейлист,
|
||||
чтобы она наполнилась.
|
||||
</p>
|
||||
) : (
|
||||
<div className="music-player-queue-list">
|
||||
{upcoming.map((track, offset) => (
|
||||
<QueueRow
|
||||
key={track.Id}
|
||||
item={track}
|
||||
index={currentTrack + 1 + offset}
|
||||
isCurrent={false}
|
||||
coverUrl={coverFor(track)}
|
||||
onPlay={(index) =>
|
||||
playItemFromQueue(index, user?.Id, api)
|
||||
}
|
||||
queryKey={["queue-upcoming"]}
|
||||
userId={user?.Id}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<>
|
||||
<div className="music-player-panel-head">
|
||||
<span className="music-player-panel-source">Очередь</span>
|
||||
<IconButton
|
||||
size="small"
|
||||
aria-label="Закрыть"
|
||||
onClick={() => setPanelOpen(false)}
|
||||
>
|
||||
<span className="material-symbols-rounded">close</span>
|
||||
</IconButton>
|
||||
</div>
|
||||
<div className="music-player-panel-body">
|
||||
{upcoming.length === 0 ? (
|
||||
<p className="music-player-panel-empty">
|
||||
Очередь пуста. Запустите альбом или плейлист,
|
||||
чтобы она наполнилась.
|
||||
</p>
|
||||
) : (
|
||||
<div className="music-player-queue-list">
|
||||
{upcoming.map((track, offset) => (
|
||||
<QueueRow
|
||||
key={track.Id}
|
||||
item={track}
|
||||
index={currentTrack + 1 + offset}
|
||||
isCurrent={false}
|
||||
coverUrl={coverFor(track)}
|
||||
onPlay={(index) =>
|
||||
playItemFromQueue(index, user?.Id, api)
|
||||
}
|
||||
queryKey={["queue-upcoming"]}
|
||||
userId={user?.Id}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</motion.aside>
|
||||
|
||||
@@ -305,8 +305,13 @@ export function VideoPlayer() {
|
||||
if (videoElement) videoElement.currentTime = target;
|
||||
}
|
||||
|
||||
if (navigator.mediaSession && mediaSource) {
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
if (
|
||||
navigator.mediaSession &&
|
||||
typeof navigator.mediaSession.setActionHandler === "function" &&
|
||||
mediaSource
|
||||
) {
|
||||
if (typeof MediaMetadata !== "undefined") {
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: isEpisode
|
||||
? `${itemName} - ${episodeTitle}`
|
||||
: (itemName ?? "Blink"),
|
||||
@@ -325,6 +330,7 @@ export function VideoPlayer() {
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
navigator.mediaSession.setActionHandler("play", () => {
|
||||
toggleIsPlaying();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user