fix: use pageheader where needed
This commit is contained in:
1 parent
7c66fea335
commit
1ab3f404cc
28 files changed
+132
-135
No files matched your search
@@ -1,8 +1,7 @@
|
||||
<script>
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { notifications, profile } from '$lib/auth'
|
||||
import MultiSelect from '$lib/components/input/Switch.svelte'
|
||||
import { notifications } from '$lib/auth'
|
||||
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
|
||||
import { contentPadding } from '$lib/components/ui/layout/Shell.svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import { Badge } from 'mono-svelte'
|
||||
</script>
|
||||
@@ -16,25 +15,34 @@
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col gap-4 h-full">
|
||||
<MultiSelect
|
||||
options={[
|
||||
'/admin/config',
|
||||
'/admin/applications',
|
||||
'/admin/taglines',
|
||||
'/admin/team',
|
||||
'/admin/federation',
|
||||
]}
|
||||
optionNames={[
|
||||
$t('routes.admin.config.title'),
|
||||
$t('routes.admin.applications.title'),
|
||||
$t('routes.admin.taglines.title'),
|
||||
$t('routes.admin.team.title'),
|
||||
$t('routes.admin.federation.title'),
|
||||
]}
|
||||
selected={$page.url.pathname}
|
||||
on:select={(e) => {
|
||||
goto(e.detail)
|
||||
}}
|
||||
/>
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2"
|
||||
style="top: max(1.5rem, {$contentPadding.top}px);"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/admin/config',
|
||||
name: $t('routes.admin.config.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/applications',
|
||||
name: $t('routes.admin.applications.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/taglines',
|
||||
name: $t('routes.admin.taglines.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/team',
|
||||
name: $t('routes.admin.team.title'),
|
||||
},
|
||||
{
|
||||
href: '/admin/federation',
|
||||
name: $t('routes.admin.federation.title'),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -12,7 +12,7 @@
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<Header>{$t('routes.admin.applications.title')}</Header>
|
||||
<Header pageHeader>{$t('routes.admin.applications.title')}</Header>
|
||||
<MultiSelect
|
||||
options={[false, true]}
|
||||
selected={data.unreadOnly ?? true}
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</svelte:head>
|
||||
|
||||
<form class="flex flex-col gap-4" on:submit|preventDefault={save}>
|
||||
<Header>{$t('routes.admin.config.title')}</Header>
|
||||
<Header pageHeader>{$t('routes.admin.config.title')}</Header>
|
||||
{#if formData}
|
||||
<TextInput bind:value={formData.name} label={$t('form.name')} />
|
||||
<TextInput
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { profile } from '$lib/auth.js'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import EditableList from '$lib/components/ui/list/EditableList.svelte'
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
@@ -170,12 +171,12 @@
|
||||
<title>{$t('routes.admin.federation.title')}</title>
|
||||
</svelte:head>
|
||||
|
||||
<h1 class="font-bold text-2xl flex items-center justify-between">
|
||||
<Header pageHeader class="font-bold text-2xl flex items-center justify-between">
|
||||
{$t('routes.admin.federation.title')}
|
||||
<Button color="primary" on:click={save} loading={saving} disabled={saving}>
|
||||
{$t('common.save')}
|
||||
</Button>
|
||||
</h1>
|
||||
</Header>
|
||||
{#if data.site && data.federated_instances?.federated_instances?.blocked}
|
||||
<FileInput preview={false} bind:files={csv}>
|
||||
<Button class="w-max" slot="button">
|
||||
|
||||
@@ -44,9 +44,8 @@
|
||||
</script>
|
||||
|
||||
{#if taglines.length > 0}
|
||||
<div class="flex flex-row justify-between items-center">
|
||||
<Header>{$t('routes.admin.taglines.title')}</Header>
|
||||
<Button
|
||||
<Header pageHeader class="justify-between">
|
||||
{$t('routes.admin.taglines.title')}<Button
|
||||
color="primary"
|
||||
on:click={save}
|
||||
loading={saving}
|
||||
@@ -56,7 +55,8 @@
|
||||
>
|
||||
{$t('common.save')}
|
||||
</Button>
|
||||
</div>
|
||||
</Header>
|
||||
|
||||
<EditableList
|
||||
let:action
|
||||
on:action={(e) => {
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Header>{$t('routes.admin.team.title')}</Header>
|
||||
<Header pageHeader>{$t('routes.admin.team.title')}</Header>
|
||||
{#if data.site}
|
||||
<EditableList let:action on:action={(e) => removeAdmin(e.detail, false)}>
|
||||
{#if data.site.admins.length <= 0}
|
||||
|
||||
Reference in new issue
Block a user