impr: use common components for admin pages
This commit is contained in:
10 files changed
+54
-48
No files matched your search
@@ -3,7 +3,7 @@
|
||||
import { t } from '$lib/app/i18n'
|
||||
import { searchParam } from '$lib/app/util.svelte'
|
||||
import Placeholder from '$lib/ui/info/Placeholder.svelte'
|
||||
import { Header, Pageination } from '$lib/ui/layout'
|
||||
import { CommonList, Header, Pageination } from '$lib/ui/layout'
|
||||
import { Option, Select } from 'mono-svelte'
|
||||
import { ClipboardDocumentCheck, Funnel, Icon } from 'svelte-hero-icons/dist'
|
||||
import Application from './Application.svelte'
|
||||
@@ -32,11 +32,17 @@
|
||||
</Select>
|
||||
</form>
|
||||
{#if data.applications?.value && data.applications?.value.length > 0}
|
||||
<div class="flex flex-col gap-4">
|
||||
<CommonList>
|
||||
{#each data.applications?.value as application (application.registration_application.id)}
|
||||
<Application {application} />
|
||||
<li
|
||||
class={application.creator_local_user.accepted_application
|
||||
? 'material-success'
|
||||
: 'material-error'}
|
||||
>
|
||||
<Application {application} />
|
||||
</li>
|
||||
{/each}
|
||||
</div>
|
||||
</CommonList>
|
||||
{#if data.applications?.value.length >= 40}
|
||||
<div class="mt-auto">
|
||||
<Pageination page={data.page} href={(page) => `?page=${page}`} />
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
user={application.creator}
|
||||
/>
|
||||
{/if}
|
||||
<Material color="uniform" rounding="xl" class="flex flex-col gap-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<span class="text-slate-600 dark:text-zinc-400 text-xs">
|
||||
<RelativeDate
|
||||
@@ -184,4 +184,4 @@
|
||||
></Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</Material>
|
||||
</div>
|
||||
@@ -29,7 +29,6 @@
|
||||
import {
|
||||
ArrowLeft,
|
||||
ArrowPath,
|
||||
ExclamationCircle,
|
||||
ExclamationTriangle,
|
||||
Icon,
|
||||
Plus,
|
||||
@@ -211,17 +210,7 @@
|
||||
/>
|
||||
</div>
|
||||
{#if data.site_view.local_site.registration_mode == 'RequireApplication'}
|
||||
<Material
|
||||
rounding="2xl"
|
||||
color="none"
|
||||
class="bg-yellow-200/10 border border-yellow-500/30 text-yellow-900 dark:text-yellow-50"
|
||||
>
|
||||
<Icon
|
||||
src={ExclamationTriangle}
|
||||
size="32"
|
||||
mini
|
||||
class="inline-block rounded-lg bg-yellow-500 p-1 text-white clear-both float-left mr-2"
|
||||
/>
|
||||
<Material rounding="2xl" color="warning" icon={ExclamationTriangle}>
|
||||
{$t('form.signup.application.info')}
|
||||
</Material>
|
||||
{#if data.site_view.local_site.application_question}
|
||||
@@ -256,13 +245,7 @@
|
||||
</Material>
|
||||
{/if}
|
||||
{:catch err}
|
||||
<Material
|
||||
padding="sm"
|
||||
class="flex gap-2 dark:text-yellow-200 text-yellow-800 bg-yellow-500/20"
|
||||
>
|
||||
<Icon src={ExclamationCircle} mini size="24" />
|
||||
{err}
|
||||
</Material>
|
||||
<ErrorContainer message={errorMessage(err)} />
|
||||
{/await}
|
||||
<Button onclick={() => getCaptcha()} size="square-md">
|
||||
<Icon src={ArrowPath} size="16" mini />
|
||||
|
||||
Reference in new issue
Block a user