feat: make windows movable

This commit is contained in:
dusk 2024-11-01 16:19:11 +03:00
parent e1fd76a9c3
commit b92a335e50
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw
3 changed files with 6 additions and 1 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -40,6 +40,7 @@
"type": "module",
"dependencies": {
"@atproto/api": "^0.13.12",
"@neodrag/svelte": "^2.0.6",
"@std/toml": "npm:@jsr/std__toml",
"base64url": "^3.0.1",
"nanoid": "^5.0.8",

View File

@ -1,4 +1,6 @@
<script lang="ts">
import { draggable } from '@neodrag/svelte';
export let title: string | undefined = undefined;
export let iconUri: string = '';
export let id: string = '';
@ -22,6 +24,7 @@
</script>
<div
use:draggable={{applyUserSelectHack: true, handle: '.window-titlebar'}}
class="
flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""}
max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl min-w-[30ch] lg:min-w-[40ch] w-full md:w-fit [height:fit-content]
@ -33,8 +36,9 @@
{#if title !== undefined}
<div
class="
p-1 border-ralsei-white border-8
window-titlebar p-1 border-ralsei-white border-8
bg-gradient-to-l from-ralsei-pink-neon to-ralsei-black to-75%
cursor-move
"
style="border-style: hidden hidden ridge hidden;"
>