feat: make windows movable
This commit is contained in:
parent
e1fd76a9c3
commit
b92a335e50
@ -40,6 +40,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atproto/api": "^0.13.12",
|
"@atproto/api": "^0.13.12",
|
||||||
|
"@neodrag/svelte": "^2.0.6",
|
||||||
"@std/toml": "npm:@jsr/std__toml",
|
"@std/toml": "npm:@jsr/std__toml",
|
||||||
"base64url": "^3.0.1",
|
"base64url": "^3.0.1",
|
||||||
"nanoid": "^5.0.8",
|
"nanoid": "^5.0.8",
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { draggable } from '@neodrag/svelte';
|
||||||
|
|
||||||
export let title: string | undefined = undefined;
|
export let title: string | undefined = undefined;
|
||||||
export let iconUri: string = '';
|
export let iconUri: string = '';
|
||||||
export let id: string = '';
|
export let id: string = '';
|
||||||
@ -22,6 +24,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
use:draggable={{applyUserSelectHack: true, handle: '.window-titlebar'}}
|
||||||
class="
|
class="
|
||||||
flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""}
|
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]
|
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}
|
{#if title !== undefined}
|
||||||
<div
|
<div
|
||||||
class="
|
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%
|
bg-gradient-to-l from-ralsei-pink-neon to-ralsei-black to-75%
|
||||||
|
cursor-move
|
||||||
"
|
"
|
||||||
style="border-style: hidden hidden ridge hidden;"
|
style="border-style: hidden hidden ridge hidden;"
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user