update dependencies
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { IconOutline } from 'svelte-heros-v2';
|
||||
import { ArrowLeftOnRectangle, Flag, UserGroup, Users } from 'svelte-heros-v2';
|
||||
import { buttonTriggeredRequest } from '$lib/components/utils';
|
||||
import { goto } from '$app/navigation';
|
||||
import type { LayoutData } from './$types';
|
||||
@ -26,21 +26,21 @@
|
||||
let tabs = [
|
||||
{
|
||||
path: `${env.PUBLIC_BASE_PATH}/admin/users`,
|
||||
icon: 'user-group-outline',
|
||||
icon: UserGroup,
|
||||
name: 'Registrierte Nutzer',
|
||||
badge: data.userCount,
|
||||
enabled: data.userCount != null
|
||||
},
|
||||
{
|
||||
path: `${env.PUBLIC_BASE_PATH}/admin/reports`,
|
||||
icon: 'flag-outline',
|
||||
icon: Flag,
|
||||
name: 'Reports',
|
||||
badge: $reportCount,
|
||||
enabled: data.reportCount != null
|
||||
},
|
||||
{
|
||||
path: `${env.PUBLIC_BASE_PATH}/admin/admin`,
|
||||
icon: 'users-outline',
|
||||
icon: Users,
|
||||
name: 'Website Admins',
|
||||
badge: $adminCount,
|
||||
enabled: data.adminCount != null
|
||||
@ -55,7 +55,7 @@
|
||||
{#if tab.enabled}
|
||||
<li>
|
||||
<a href={tab.path}>
|
||||
<IconOutline name={tab.icon} />
|
||||
<svelte:component this={tab.icon} />
|
||||
<span class="mr-1" class:underline={$page.url.pathname === tab.path}>{tab.name}</span>
|
||||
<div class="badge">{tab.badge}</div>
|
||||
</a>
|
||||
@ -67,7 +67,7 @@
|
||||
<ul class="menu menu-vertical">
|
||||
<li>
|
||||
<button on:click={(e) => buttonTriggeredRequest(e, logout())}>
|
||||
<IconOutline name="arrow-left-on-rectangle-outline" />
|
||||
<ArrowLeftOnRectangle />
|
||||
<span>Ausloggen</span>
|
||||
</button>
|
||||
</li>
|
||||
|
@ -1,26 +1,26 @@
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { IconOutline } from 'svelte-heros-v2';
|
||||
import { Flag, UserGroup, Users } from 'svelte-heros-v2';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
let tabs = [
|
||||
{
|
||||
path: `${env.PUBLIC_BASE_PATH}/admin/users`,
|
||||
icon: 'user-group-outline',
|
||||
icon: UserGroup,
|
||||
name: 'Registrierte Nutzer',
|
||||
enabled: data.userCount != null
|
||||
},
|
||||
{
|
||||
path: `${env.PUBLIC_BASE_PATH}/admin/reports`,
|
||||
icon: 'flag-outline',
|
||||
icon: Flag,
|
||||
name: 'Reports',
|
||||
enabled: data.reportCount != null
|
||||
},
|
||||
{
|
||||
path: `${env.PUBLIC_BASE_PATH}/admin/admin`,
|
||||
icon: 'users-outline',
|
||||
icon: Users,
|
||||
name: 'Website Admins',
|
||||
enabled: data.adminCount != null
|
||||
}
|
||||
@ -36,7 +36,7 @@
|
||||
href={tab.path}
|
||||
title={tab.name}
|
||||
>
|
||||
<IconOutline width="5rem" height="5rem" name={tab.icon} />
|
||||
<svelte:component this={tab.icon} width="5rem" height="5rem" />
|
||||
</a>
|
||||
<span>{tab.name}</span>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import Badges from '$lib/components/Input/Badges.svelte';
|
||||
import { IconOutline } from 'svelte-heros-v2';
|
||||
import { Check, NoSymbol, PencilSquare, Trash, UserPlus } from 'svelte-heros-v2';
|
||||
import Input from '$lib/components/Input/Input.svelte';
|
||||
import { Permissions } from '$lib/permissions';
|
||||
import { env } from '$env/dynamic/public';
|
||||
@ -155,7 +155,7 @@
|
||||
admin.edit = false;
|
||||
}}
|
||||
>
|
||||
<IconOutline name="check-outline" width="18" height="18" />
|
||||
<Check size="18" />
|
||||
</button>
|
||||
</span>
|
||||
<span class="w-min" class:cursor-not-allowed={!permissions.adminWrite()}>
|
||||
@ -167,7 +167,7 @@
|
||||
admin = admin.before;
|
||||
}}
|
||||
>
|
||||
<IconOutline name="no-symbol-outline" width="18" height="18" />
|
||||
<NoSymbol size="18" />
|
||||
</button>
|
||||
</span>
|
||||
{:else}
|
||||
@ -180,7 +180,7 @@
|
||||
admin.before = structuredClone(admin);
|
||||
}}
|
||||
>
|
||||
<IconOutline name="pencil-square-outline" width="18" height="18" />
|
||||
<PencilSquare size="18" />
|
||||
</button>
|
||||
</span>
|
||||
<span class="w-min" class:cursor-not-allowed={!permissions.adminWrite()}>
|
||||
@ -189,7 +189,7 @@
|
||||
disabled={!permissions.adminWrite()}
|
||||
on:click={(e) => buttonTriggeredRequest(e, deleteAdmin(admin.id))}
|
||||
>
|
||||
<IconOutline name="trash-outline" width="18" height="18" />
|
||||
<Trash size="18" />
|
||||
</button>
|
||||
</span>
|
||||
{/if}
|
||||
@ -228,7 +228,7 @@
|
||||
newAdminPermissions = [];
|
||||
}}
|
||||
>
|
||||
<IconOutline name="user-plus-outline" width="18" height="18" />
|
||||
<UserPlus size="18" />
|
||||
</button>
|
||||
</span>
|
||||
</td>
|
||||
|
@ -9,7 +9,7 @@
|
||||
import Textarea from '$lib/components/Input/Textarea.svelte';
|
||||
import { reportCount } from '$lib/stores';
|
||||
import HeaderBar from './HeaderBar.svelte';
|
||||
import { IconOutline } from 'svelte-heros-v2';
|
||||
import { MagnifyingGlass, Plus, Share } from 'svelte-heros-v2';
|
||||
import NewReportModal from './NewReportModal.svelte';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
@ -139,7 +139,7 @@
|
||||
title="Nach Ersteller filtern"
|
||||
on:click|stopPropagation={() => (reportFilter.reporter = report.reporter.username)}
|
||||
>
|
||||
<IconOutline name="magnifying-glass-outline" width="14" height="14" />
|
||||
<MagnifyingGlass size="14" />
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
@ -151,7 +151,7 @@
|
||||
on:click|stopPropagation={() =>
|
||||
(reportFilter.reported = report.reported.username)}
|
||||
>
|
||||
<IconOutline name="magnifying-glass-outline" width="14" height="14" />
|
||||
<MagnifyingGlass size="14" />
|
||||
</button>
|
||||
{/if}
|
||||
</td>
|
||||
@ -168,10 +168,10 @@
|
||||
{report.status === 'none'
|
||||
? 'Unbearbeitet'
|
||||
: report.status === 'review'
|
||||
? 'In Bearbeitung'
|
||||
: report.status === 'reviewed'
|
||||
? 'Bearbeitet'
|
||||
: ''}
|
||||
? 'In Bearbeitung'
|
||||
: report.status === 'reviewed'
|
||||
? 'Bearbeitet'
|
||||
: ''}
|
||||
</td>
|
||||
<td>{report.draft ? 'Entwurf' : 'Erstellt'}</td>
|
||||
</tr>
|
||||
@ -180,7 +180,7 @@
|
||||
<td colspan="100">
|
||||
<div class="flex justify-center items-center">
|
||||
<button class="btn btn-sm" on:click={() => newReportModal.show()}>
|
||||
<IconOutline name="plus-outline" />
|
||||
<Plus />
|
||||
<span>Neuer Report</span>
|
||||
</button>
|
||||
</div>
|
||||
@ -198,7 +198,7 @@
|
||||
<form class="dropdown dropdown-end">
|
||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex a11y-label-has-associated-control -->
|
||||
<label tabindex="0" class="btn btn-sm btn-circle btn-ghost text-center">
|
||||
<IconOutline name="share-outline" height="1rem" width="auto" />
|
||||
<Share size="1rem" />
|
||||
</label>
|
||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
||||
<ul
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
import { IconOutline } from 'svelte-heros-v2';
|
||||
import { Check, NoSymbol, PencilSquare, Trash } from 'svelte-heros-v2';
|
||||
import Input from '$lib/components/Input/Input.svelte';
|
||||
import Select from '$lib/components/Input/Select.svelte';
|
||||
import { env } from '$env/dynamic/public';
|
||||
@ -172,7 +172,7 @@
|
||||
user.edit = false;
|
||||
}}
|
||||
>
|
||||
<IconOutline name="check-outline" width="18" height="18" />
|
||||
<Check size="18" />
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm btn-square"
|
||||
@ -181,7 +181,7 @@
|
||||
user = user.before;
|
||||
}}
|
||||
>
|
||||
<IconOutline name="no-symbol-outline" width="18" height="18" />
|
||||
<NoSymbol size="18" />
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
@ -191,13 +191,13 @@
|
||||
user.edit = true;
|
||||
}}
|
||||
>
|
||||
<IconOutline name="pencil-square-outline" width="18" height="18" />
|
||||
<PencilSquare size="18" />
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm btn-square"
|
||||
on:click={(e) => buttonTriggeredRequest(e, deleteUser(user.id))}
|
||||
>
|
||||
<IconOutline name="trash-outline" width="18" height="18" />
|
||||
<Trash size="18" />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user