mirror of
https://github.com/artiemis/artie.moe.git
synced 2026-02-14 09:01:55 +00:00
mobile player placement
This commit is contained in:
parent
333e226ba4
commit
aa2ad05dfd
@ -77,7 +77,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handlePressDown() {
|
function handlePressDown() {
|
||||||
console.log("handlePressDown");
|
|
||||||
model.motion("Tap");
|
model.motion("Tap");
|
||||||
|
|
||||||
holdTimeout = window.setTimeout(() => {
|
holdTimeout = window.setTimeout(() => {
|
||||||
@ -88,7 +87,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handlePressUp() {
|
function handlePressUp() {
|
||||||
console.log("handlePressUp");
|
|
||||||
clearTimeout(holdTimeout);
|
clearTimeout(holdTimeout);
|
||||||
holdTimeout = undefined;
|
holdTimeout = undefined;
|
||||||
}
|
}
|
||||||
@ -168,24 +166,40 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#snippet player(mobile = false)}
|
||||||
|
{#snippet label()}
|
||||||
|
{#if volumeLabel}
|
||||||
|
<div transition:fade={{ duration: 100 }} class="text-purple-300">
|
||||||
|
{volumeLabel}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/snippet}
|
||||||
|
{#if audio}
|
||||||
|
{#if !mobile}
|
||||||
|
{@render label()}
|
||||||
|
{/if}
|
||||||
|
<input
|
||||||
|
bind:value={volume}
|
||||||
|
oninput={showVolumeLabel}
|
||||||
|
transition:fade={{ duration: 100 }}
|
||||||
|
type="range"
|
||||||
|
class="lg:w-48 lg:h-2 w-32 h-2 rounded-xl appearance-none bg-purple-300 accent-purple-400 cursor-pointer"
|
||||||
|
/>
|
||||||
|
{#if mobile}
|
||||||
|
{@render label()}
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
{/snippet}
|
||||||
|
|
||||||
<svelte:window onkeydown={handleKeyDown} />
|
<svelte:window onkeydown={handleKeyDown} />
|
||||||
|
|
||||||
|
<div class="lg:hidden fixed top-4 right-6 z-10">
|
||||||
|
{@render player(true)}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid fixed left-0 bottom-0 z-10 {gap}">
|
<div class="grid fixed left-0 bottom-0 z-10 {gap}">
|
||||||
<div class="mx-auto">
|
<div class="mx-auto hidden lg:block">
|
||||||
{#if audio}
|
{@render player()}
|
||||||
{#if volumeLabel}
|
|
||||||
<div transition:fade={{ duration: 100 }} class="text-purple-300">
|
|
||||||
{volumeLabel}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
<input
|
|
||||||
bind:value={volume}
|
|
||||||
oninput={showVolumeLabel}
|
|
||||||
transition:fade={{ duration: 100 }}
|
|
||||||
type="range"
|
|
||||||
class="lg:w-48 lg:h-2 w-32 h-2 rounded-xl appearance-none bg-purple-300 accent-purple-400 cursor-pointer"
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<canvas
|
<canvas
|
||||||
bind:this={canvas}
|
bind:this={canvas}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user