use mono-ui modal
This commit is contained in:
1 parent
0c2b39a9e8
commit
79d85cec9e
16 files changed
+20
-110
No files matched your search
+1
-1
@@ -42,7 +42,7 @@
|
||||
"@dicebear/initials": "^6.0.4",
|
||||
"lemmy-js-client": "^0.18.0-rc.2",
|
||||
"markdown-it": "^13.0.1",
|
||||
"mono-svelte": "^0.1.3"
|
||||
"mono-svelte": "^0.1.4"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -1,22 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import StickyCard from '$lib/components/ui/StickyCard.svelte'
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||
import { fly } from 'svelte/transition'
|
||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||
import { ArchiveBox, Icon, Plus } from 'svelte-hero-icons'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||
import { searchParam } from '$lib/util.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import PostFeed from '$lib/components/lemmy/post/PostFeed.svelte'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
|
||||
export let data
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
|
||||
import Card from '$lib/components/ui/Card.svelte'
|
||||
@@ -8,6 +7,7 @@
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import type { RegistrationApplicationView } from 'lemmy-js-client'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Check, Icon, XMark } from 'svelte-hero-icons'
|
||||
|
||||
export let application: RegistrationApplicationView
|
||||
@@ -85,7 +85,7 @@
|
||||
loading={denying}
|
||||
disabled={approving || denying}
|
||||
>
|
||||
<Icon src={XMark} mini size="16" slot="icon" />
|
||||
<Icon src={XMark} mini size="16" slot="prefix" />
|
||||
</Button>
|
||||
<Button
|
||||
size="square-md"
|
||||
@@ -98,7 +98,7 @@
|
||||
loading={approving}
|
||||
disabled={approving || denying}
|
||||
>
|
||||
<Icon src={Check} mini size="16" slot="icon" />
|
||||
<Icon src={Check} mini size="16" slot="prefix" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||
@@ -9,7 +8,7 @@
|
||||
import { onMount } from 'svelte'
|
||||
import { setSessionStorage } from '$lib/session.js'
|
||||
import PostFeed from '$lib/components/lemmy/post/PostFeed.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
|
||||
export let data
|
||||
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import Card from '$lib/components/ui/Card.svelte'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import { removeToast, toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { getClient, uploadImage } from '$lib/lemmy.js'
|
||||
import type { SaveUserSettings } from 'lemmy-js-client'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
import { Button, Checkbox, Modal } from 'mono-svelte'
|
||||
|
||||
export let data
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
import { isBlocked } from '$lib/lemmy/user.js'
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
@@ -34,7 +33,7 @@
|
||||
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
||||
import { searchParam } from '$lib/util.js'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
|
||||
export let data
|
||||
|
||||
|
||||
@@ -2977,10 +2977,10 @@ mlly@^1.2.0, mlly@^1.4.0:
|
||||
pkg-types "^1.0.3"
|
||||
ufo "^1.1.2"
|
||||
|
||||
mono-svelte@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/mono-svelte/-/mono-svelte-0.1.3.tgz#96546fb257b0c8235644ba64db4ede60ec646174"
|
||||
integrity sha512-DF+p+R7+IgTFPWGf4r67Kbo4hBzkyYiwU+ogYq63cZ2UoObBWnsh1vhJ2yyRKKDlh2SDCZAC4cJjrQjk/Rr0Fw==
|
||||
mono-svelte@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/mono-svelte/-/mono-svelte-0.1.4.tgz#bdb124a4869ed049acdea628ce51fdf7503a1a3f"
|
||||
integrity sha512-rm9sKw/QFH0pUhBNYPAa8i2F2rQwxsss9Fz9IdCcXfoCIVZVk3Yki9857OtyY8wq8VV3iD8KBBQQsRnqQU8dSA==
|
||||
|
||||
mri@^1.1.0:
|
||||
version "1.2.0"
|
||||
|
||||
Reference in new issue
Block a user