Hide mobile viewer chrome on fullscreen tap and restore it on page tap.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-19 18:29:00 +03:30
co-authored by Cursor
parent d25841aa16
commit 06bcba125f
2 changed files with 24 additions and 15 deletions
+11 -10
View File
@@ -107,9 +107,12 @@ function togglePlay() {
}
}
function onFab() {
function onTapExit() {
hideChrome.value = false;
if (playing.value) togglePlay();
waiting.value = false;
if (!playing.value) return;
playing.value = false;
stopLoop();
}
function onKey(ev: KeyboardEvent) {
@@ -132,7 +135,8 @@ function fullscreenElement() {
async function toggleFullscreen() {
if (singlePage.value) {
hideChrome.value = !hideChrome.value;
hideChrome.value = true;
waiting.value = false;
return;
}
const el = stage.value as
@@ -227,14 +231,11 @@ watch(
</div>
</div>
<button
<div
v-if="immersive"
class="fab-pause"
type="button"
@click="onFab"
>
{{ playing ? "توقف" : "منو" }}
</button>
class="tap-exit"
@click.prevent="onTapExit"
></div>
<div v-if="waiting && playing" class="auto-hint">
<span>تا لحظه‌ای دیگر خودبه‌خود ورق می‌خورد</span>
+13 -5
View File
@@ -410,15 +410,23 @@ a {
.stage-page.immersive > .page-chrome,
.viewer-wrap.immersive > .page-chrome,
.viewer-wrap.immersive .thumbs,
.viewer-wrap.immersive .auto-hint {
display: none;
.viewer-wrap.immersive .auto-hint,
.viewer-wrap.immersive .fab-pause {
display: none !important;
}
.stage-page.immersive .viewer-wrap {
padding: 0;
padding: 0 !important;
border-radius: 0;
}
.tap-exit {
position: absolute;
inset: 0;
z-index: 15;
touch-action: manipulation;
}
@media (max-width: 900px) {
.stage-bar {
gap: 8px;
@@ -442,7 +450,7 @@ a {
display: inline;
}
.viewer-wrap.cinematic > .stage-bar {
.viewer-wrap.cinematic:not(.immersive) > .stage-bar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
@@ -459,7 +467,7 @@ a {
margin-inline-start: 0;
}
.viewer-wrap {
.viewer-wrap:not(.immersive) {
padding: 10px 8px 16px;
}
}