use mono-ui modal
This commit is contained in:
1 parent
0c2b39a9e8
commit
79d85cec9e
16 files changed
+20
-110
No files matched your search
@@ -14,12 +14,10 @@
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
import CommentActions from '$lib/components/lemmy/comment/CommentActions.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { slide } from 'svelte/transition'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
|
||||
export let node: CommentNodeI
|
||||
export let postId: number
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { profile } from '$lib/auth.js'
|
||||
import FileInput from '$lib/components/input/FileInput.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { uploadImage } from '$lib/lemmy.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let open: boolean
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<script lang="ts">
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import type { Community, Person, PersonView } from 'lemmy-js-client'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
import { Button, Checkbox, Modal } from 'mono-svelte'
|
||||
|
||||
export let open = false
|
||||
let item: Person | undefined
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { isCommentView, isPostView } from '$lib/lemmy/item.js'
|
||||
@@ -15,7 +14,7 @@
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { fullCommunityName } from '$lib/util.js'
|
||||
import { amMod, isAdmin } from './moderation'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
import { Button, Checkbox, Modal } from 'mono-svelte'
|
||||
|
||||
export let open: boolean
|
||||
export let item: PostView | CommentView | undefined = undefined
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import type { CommentView, PostView } from 'lemmy-js-client'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
|
||||
export let open: boolean
|
||||
export let item: PostView | CommentView | undefined = undefined
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
import Menu from '$lib/components/ui/menu/Menu.svelte'
|
||||
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import {
|
||||
amMod,
|
||||
isAdmin,
|
||||
@@ -36,7 +35,7 @@
|
||||
import { setSessionStorage } from '$lib/session.js'
|
||||
import { goto } from '$app/navigation'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
|
||||
export let post: PostView
|
||||
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { uploadImage } from '$lib/lemmy.js'
|
||||
import type { Community, Person } from 'lemmy-js-client'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import {
|
||||
CodeBracket,
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
<script lang="ts">
|
||||
import Card from '$lib/components/ui/Card.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { Icon, XMark } from 'svelte-hero-icons'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { fade, scale } from 'svelte/transition'
|
||||
|
||||
export let action: string | undefined = undefined
|
||||
export let open = false
|
||||
|
||||
const dispatcher = createEventDispatcher()
|
||||
</script>
|
||||
|
||||
{#if open}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="overflow-hidden fixed top-0 left-0 w-screen h-screen z-50
|
||||
flex flex-col items-center justify-center bg-black/50 backdrop-blur-sm box-border p-4"
|
||||
transition:fade={{ duration: 200 }}
|
||||
on:click={() => (open = false)}
|
||||
>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
transition:scale={{ start: 0.9, easing: expoOut }}
|
||||
class="overflow-y-auto {$$props.class} rounded-xl max-w-full box-border w-full overscroll-contain"
|
||||
>
|
||||
<div
|
||||
class="w-full dark:!bg-zinc-950 rounded-xl max-w-xl box-border mx-auto overscroll-contain"
|
||||
on:click={() => {}}
|
||||
>
|
||||
<div
|
||||
on:click|stopPropagation={() => {}}
|
||||
class="p-6 rounded-xl flex flex-col gap-4 w-full dark:bg-zinc-950
|
||||
bg-white border border-slate-200 dark:border-zinc-800"
|
||||
class:rounded-b-none={action}
|
||||
class:border-b-0={action}
|
||||
>
|
||||
<div class="flex flex-row max-w-full">
|
||||
<h1 class="font-bold text-2xl w-max max-w-full">
|
||||
<slot name="title" />
|
||||
</h1>
|
||||
<Button
|
||||
size="square-md"
|
||||
class="ml-auto"
|
||||
on:click={() => (open = false)}
|
||||
>
|
||||
<Icon src={XMark} mini size="16" />
|
||||
</Button>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
{#if action}
|
||||
<div
|
||||
class="border-x border-b bg-slate-100 dark:bg-zinc-900 dark:border-zinc-800 p-3 py-2 flex justify-end rounded-b-xl"
|
||||
>
|
||||
<slot name="action">
|
||||
<Button
|
||||
on:click={(e) => dispatcher('action', e)}
|
||||
color="primary"
|
||||
size="lg"
|
||||
>
|
||||
{action}
|
||||
</Button>
|
||||
</slot>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import DebugTree from '$lib/components/util/debug/DebugTree.svelte'
|
||||
import { Modal } from 'mono-svelte'
|
||||
|
||||
export let object: any
|
||||
export let open: boolean = false
|
||||
|
||||
Reference in new issue
Block a user