switch to mono-ui checkbox
This commit is contained in:
1 parent
d02d8556d5
commit
0c2b39a9e8
8 files changed
+16
-32
No files matched your search
@@ -1,16 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let defaultValue: boolean = false
|
||||
export let checked: boolean | undefined = defaultValue
|
||||
const dispatcher = createEventDispatcher<{ change: boolean }>()
|
||||
</script>
|
||||
|
||||
<label class="flex flex-row gap-2 cursor-pointer text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked
|
||||
on:change={() => dispatcher('change', !checked)}
|
||||
/>
|
||||
<slot />
|
||||
</label>
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import FileInput from '$lib/components/input/FileInput.svelte'
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
@@ -9,7 +8,7 @@
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { getClient, uploadImage } from '$lib/lemmy.js'
|
||||
import { addSubscription } from '$lib/lemmy/user.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
|
||||
/**
|
||||
* The community ID to edit.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import UserItem from '$lib/components/lemmy/user/UserItem.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'
|
||||
@@ -8,8 +7,7 @@
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
|
||||
export let open = false
|
||||
let item: Person | undefined
|
||||
@@ -127,7 +125,14 @@
|
||||
: 'banning'} {item.name}?"
|
||||
/>
|
||||
{#if !banned}
|
||||
<Checkbox bind:checked={deleteData}>Delete data</Checkbox>
|
||||
<Checkbox bind:checked={deleteData}>
|
||||
Delete data
|
||||
<svelte:fragment slot="description">
|
||||
This will delete ALL of this user's posts and comments on this {community
|
||||
? 'community'
|
||||
: 'site'}.
|
||||
</svelte:fragment>
|
||||
</Checkbox>
|
||||
<TextInput
|
||||
bind:value={expires}
|
||||
label="Expires (UTC)"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
import { isCommentView, isPostView } from '$lib/lemmy/item.js'
|
||||
import type { CommentView, PostView } from 'lemmy-js-client'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import { Fire, Icon, Trash } from 'svelte-hero-icons'
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
@@ -16,7 +15,7 @@
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { fullCommunityName } from '$lib/util.js'
|
||||
import { amMod, isAdmin } from './moderation'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
|
||||
export let open: boolean
|
||||
export let item: PostView | CommentView | undefined = undefined
|
||||
@@ -202,7 +201,7 @@
|
||||
bind:value={reason}
|
||||
/>
|
||||
|
||||
{#if !removed && $profile?.user && ( amMod($profile.user, item.community) || (isAdmin($profile.user) && item.community.local))}
|
||||
{#if !removed && $profile?.user && (amMod($profile.user, item.community) || (isAdmin($profile.user) && item.community.local))}
|
||||
<Checkbox bind:checked={commentReason}>Reply with reason</Checkbox>
|
||||
|
||||
{#if commentReason}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import { profile } from '$lib/auth.js'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import { placeholders } from '$lib/util.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import { Checkbox } from 'mono-svelte'
|
||||
import { getSessionStorage, setSessionStorage } from '$lib/session.js'
|
||||
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
||||
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import SelectMenu from '$lib/components/input/SelectMenu.svelte'
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
@@ -8,7 +7,7 @@
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import type { EditSite } from 'lemmy-js-client'
|
||||
import type { PageData } from './$types.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
|
||||
export let data: PageData
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { profile, profileData, setUserID } from '$lib/auth.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import FileInput from '$lib/components/input/FileInput.svelte'
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
@@ -10,7 +9,7 @@
|
||||
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 } from 'mono-svelte'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
|
||||
export let data
|
||||
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
||||
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
|
||||
import Link from '$lib/components/input/Link.svelte'
|
||||
import { ArrowPath, Icon } from 'svelte-hero-icons'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Button, Checkbox } from 'mono-svelte'
|
||||
|
||||
let data = {
|
||||
loading: false,
|
||||
|
||||
Reference in new issue
Block a user