fix(playground): resolve mobile layout overlap and missing console input
- Lock viewport and relative navbar in +layout.svelte on both mobile and desktop - Remove static min-height and overflow-y overrides on mobile in +page.svelte - Auto-collapse file tree and compact code toolbar on mobile - Add safe-area padding and 200px mobile height in ConsolePanel.svelte - Bump APP_VERSION to 32
This commit is contained in:
parent
c1cb60be1e
commit
0decd6ce86
|
|
@ -3,4 +3,4 @@
|
||||||
* Both Footer.svelte and service-worker.ts import from here.
|
* Both Footer.svelte and service-worker.ts import from here.
|
||||||
* Bump this number after every feature/bugfix release.
|
* Bump this number after every feature/bugfix release.
|
||||||
*/
|
*/
|
||||||
export const APP_VERSION = 31;
|
export const APP_VERSION = 32;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
{#if isPlayground}
|
{#if isPlayground}
|
||||||
<style>
|
<style>
|
||||||
@media (min-width: 769px) {
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 100dvh !important;
|
height: 100dvh !important;
|
||||||
|
|
@ -37,7 +36,6 @@
|
||||||
flex-shrink: 0 !important;
|
flex-shrink: 0 !important;
|
||||||
top: auto !important;
|
top: auto !important;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,9 @@
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
window.addEventListener('message', handleMessage);
|
window.addEventListener('message', handleMessage);
|
||||||
|
if (window.innerWidth <= 768 && $playgroundStore.fileTreeVisible) {
|
||||||
|
playgroundStore.toggleFileTree();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
|
|
@ -758,21 +761,24 @@
|
||||||
|
|
||||||
/* ── Mobile ── */
|
/* ── Mobile ── */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.playground-page {
|
|
||||||
overflow-y: auto;
|
|
||||||
height: auto;
|
|
||||||
min-height: 100dvh;
|
|
||||||
}
|
|
||||||
.pg-content {
|
|
||||||
min-height: 400px;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
.pg-iframe {
|
|
||||||
min-height: 400px;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
.pg-file-tree-shell {
|
.pg-file-tree-shell {
|
||||||
width: 180px;
|
width: 150px;
|
||||||
|
}
|
||||||
|
.pg-code-toolbar {
|
||||||
|
gap: 0.35rem;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
}
|
||||||
|
.pg-file-name {
|
||||||
|
max-width: 90px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
.pg-mode-btn {
|
||||||
|
padding: 0.15rem 0.35rem;
|
||||||
|
font-size: 0.68rem;
|
||||||
|
}
|
||||||
|
.pg-run-btn {
|
||||||
|
padding: 0.25rem 0.6rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
padding: 0.4rem 0.75rem;
|
padding: 0.4rem 0.75rem max(0.4rem, env(safe-area-inset-bottom, 0px));
|
||||||
border-top: 1px solid var(--color-border);
|
border-top: 1px solid var(--color-border);
|
||||||
background: var(--color-bg-secondary);
|
background: var(--color-bg-secondary);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
@ -327,4 +327,13 @@
|
||||||
background: var(--color-border);
|
background: var(--color-border);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.console-panel {
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.console-panel.collapsed {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue