switch to mono-ui checkbox
This commit is contained in:
1 parent
d02d8556d5
commit
0c2b39a9e8
8 files changed
+15
-31
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">
|
<script lang="ts">
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
|
||||||
import FileInput from '$lib/components/input/FileInput.svelte'
|
import FileInput from '$lib/components/input/FileInput.svelte'
|
||||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
@@ -9,7 +8,7 @@
|
|||||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
import { getClient, uploadImage } from '$lib/lemmy.js'
|
import { getClient, uploadImage } from '$lib/lemmy.js'
|
||||||
import { addSubscription } from '$lib/lemmy/user.js'
|
import { addSubscription } from '$lib/lemmy/user.js'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Checkbox } from 'mono-svelte'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The community ID to edit.
|
* The community ID to edit.
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
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 Avatar from '$lib/components/ui/Avatar.svelte'
|
||||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||||
import type { Community, Person, PersonView } from 'lemmy-js-client'
|
import type { Community, Person, PersonView } from 'lemmy-js-client'
|
||||||
@@ -8,8 +7,7 @@
|
|||||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
import { Button, Checkbox } from 'mono-svelte'
|
||||||
import { Button } from 'mono-svelte'
|
|
||||||
|
|
||||||
export let open = false
|
export let open = false
|
||||||
let item: Person | undefined
|
let item: Person | undefined
|
||||||
@@ -127,7 +125,14 @@
|
|||||||
: 'banning'} {item.name}?"
|
: 'banning'} {item.name}?"
|
||||||
/>
|
/>
|
||||||
{#if !banned}
|
{#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
|
<TextInput
|
||||||
bind:value={expires}
|
bind:value={expires}
|
||||||
label="Expires (UTC)"
|
label="Expires (UTC)"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
import { isCommentView, isPostView } from '$lib/lemmy/item.js'
|
import { isCommentView, isPostView } from '$lib/lemmy/item.js'
|
||||||
import type { CommentView, PostView } from 'lemmy-js-client'
|
import type { CommentView, PostView } from 'lemmy-js-client'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
|
||||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
import { Fire, Icon, Trash } from 'svelte-hero-icons'
|
import { Fire, Icon, Trash } from 'svelte-hero-icons'
|
||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
import { userSettings } from '$lib/settings.js'
|
import { userSettings } from '$lib/settings.js'
|
||||||
import { fullCommunityName } from '$lib/util.js'
|
import { fullCommunityName } from '$lib/util.js'
|
||||||
import { amMod, isAdmin } from './moderation'
|
import { amMod, isAdmin } from './moderation'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Checkbox } from 'mono-svelte'
|
||||||
|
|
||||||
export let open: boolean
|
export let open: boolean
|
||||||
export let item: PostView | CommentView | undefined = undefined
|
export let item: PostView | CommentView | undefined = undefined
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
import { placeholders } from '$lib/util.js'
|
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 { getSessionStorage, setSessionStorage } from '$lib/session.js'
|
||||||
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
||||||
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
|
import ObjectAutocomplete from '$lib/components/lemmy/ObjectAutocomplete.svelte'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import Checkbox from '$lib/components/input/Checkbox.svelte'
|
|
||||||
import SelectMenu from '$lib/components/input/SelectMenu.svelte'
|
import SelectMenu from '$lib/components/input/SelectMenu.svelte'
|
||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
@@ -8,7 +7,7 @@
|
|||||||
import { getClient } from '$lib/lemmy.js'
|
import { getClient } from '$lib/lemmy.js'
|
||||||
import type { EditSite } from 'lemmy-js-client'
|
import type { EditSite } from 'lemmy-js-client'
|
||||||
import type { PageData } from './$types.js'
|
import type { PageData } from './$types.js'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Checkbox } from 'mono-svelte'
|
||||||
|
|
||||||
export let data: PageData
|
export let data: PageData
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { profile, profileData, setUserID } from '$lib/auth.js'
|
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 FileInput from '$lib/components/input/FileInput.svelte'
|
||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
import { removeToast, toast } from '$lib/components/ui/toasts/toasts.js'
|
import { removeToast, toast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
import { getClient, uploadImage } from '$lib/lemmy.js'
|
import { getClient, uploadImage } from '$lib/lemmy.js'
|
||||||
import type { SaveUserSettings } from 'lemmy-js-client'
|
import type { SaveUserSettings } from 'lemmy-js-client'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Checkbox } from 'mono-svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,12 @@
|
|||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
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 SectionTitle from '$lib/components/ui/SectionTitle.svelte'
|
||||||
import Link from '$lib/components/input/Link.svelte'
|
import Link from '$lib/components/input/Link.svelte'
|
||||||
import { ArrowPath, Icon } from 'svelte-hero-icons'
|
import { ArrowPath, Icon } from 'svelte-hero-icons'
|
||||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Checkbox } from 'mono-svelte'
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
Reference in new issue
Block a user