feat: add and close #169
This commit is contained in:
1 parent
ea594e0061
commit
108169f5a9
9 files changed
+89
-44
No files matched your search
@@ -1,9 +1,19 @@
|
||||
<script>
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { profile } from '$lib/auth'
|
||||
import MultiSelect from '$lib/components/input/Switch.svelte'
|
||||
import { Badge } from 'mono-svelte'
|
||||
</script>
|
||||
|
||||
{#if $profile?.user?.notifications.applications ?? 0 > 0}
|
||||
<span class="flex flex-row text-red-500 gap-2">
|
||||
<Badge color="red-subtle" class="w-max">
|
||||
{$profile?.user?.notifications.applications}
|
||||
</Badge> unread applications
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col gap-4 h-full">
|
||||
<MultiSelect
|
||||
headless
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
import type { RegistrationApplicationView } from 'lemmy-js-client'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Check, Icon, XMark } from 'svelte-hero-icons'
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte';
|
||||
import { publishedToDate } from '$lib/components/util/date';
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date'
|
||||
|
||||
export let application: RegistrationApplicationView
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
})
|
||||
application.creator_local_user.accepted_application = approve
|
||||
application.admin = $profile.user!.local_user_view.person
|
||||
|
||||
$profile.user!.notifications.applications -= 1
|
||||
} catch (err) {
|
||||
toast({
|
||||
content: err as any,
|
||||
@@ -52,7 +54,9 @@
|
||||
<Material class="flex flex-col gap-2">
|
||||
<div class="flex flex-col gap-1">
|
||||
<span class="text-slate-600 dark:text-zinc-400">
|
||||
<RelativeDate date={publishedToDate(application.registration_application.published)} />
|
||||
<RelativeDate
|
||||
date={publishedToDate(application.registration_application.published)}
|
||||
/>
|
||||
</span>
|
||||
|
||||
<SectionTitle>User</SectionTitle>
|
||||
@@ -79,8 +83,8 @@
|
||||
<div class="ml-auto">
|
||||
<Button
|
||||
size="square-md"
|
||||
class="hover:bg-slate-200 {!application.creator_local_user
|
||||
.accepted_application
|
||||
class="hover:bg-slate-200 {application.creator_local_user
|
||||
.accepted_application === false && application.admin
|
||||
? '!text-red-500'
|
||||
: ''}"
|
||||
aria-label="Deny"
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
Captcha enabled
|
||||
</Checkbox>
|
||||
{#if formData.captcha_enabled}
|
||||
{console.log(formData.captcha_difficulty)}
|
||||
<Select bind:value={formData.captcha_difficulty} />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user