simplify database page headers
This commit is contained in:
parent
0d22746154
commit
83bcecebb5
3 changed files with 6 additions and 30 deletions
|
|
@ -11,16 +11,14 @@
|
|||
import DatabaseGridWithProvider from '$lib/components/database/DatabaseGridWithProvider.svelte'
|
||||
import ElementCell from '$lib/components/database/cells/ElementCell.svelte'
|
||||
import LastUpdatedCell from '$lib/components/database/cells/LastUpdatedCell.svelte'
|
||||
import Button from '$lib/components/ui/Button.svelte'
|
||||
|
||||
// Utilities
|
||||
import { getRarityLabel } from '$lib/utils/rarity'
|
||||
import { goto } from '$app/navigation'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
id: 'granblueId',
|
||||
header: 'Image',
|
||||
header: '',
|
||||
width: 80,
|
||||
cell: CharacterImageCell
|
||||
},
|
||||
|
|
@ -64,13 +62,7 @@
|
|||
<PageMeta title={m.page_title_db_characters()} description={m.page_desc_home()} />
|
||||
|
||||
<div class="page">
|
||||
<DatabaseGridWithProvider resource="characters" {columns} pageSize={20}>
|
||||
{#snippet headerActions()}
|
||||
<Button variant="secondary" size="small" onclick={() => goto('/database/characters/import')}>
|
||||
Batch Import
|
||||
</Button>
|
||||
{/snippet}
|
||||
</DatabaseGridWithProvider>
|
||||
<DatabaseGridWithProvider resource="characters" {columns} pageSize={20} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -9,15 +9,13 @@
|
|||
import ElementCell from '$lib/components/database/cells/ElementCell.svelte'
|
||||
import SummonUncapCell from '$lib/components/database/cells/SummonUncapCell.svelte'
|
||||
import LastUpdatedCell from '$lib/components/database/cells/LastUpdatedCell.svelte'
|
||||
import Button from '$lib/components/ui/Button.svelte'
|
||||
import { getRarityLabel } from '$lib/utils/rarity'
|
||||
import { goto } from '$app/navigation'
|
||||
|
||||
// Column configuration for summons
|
||||
const columns: IColumn[] = [
|
||||
{
|
||||
id: 'granblueId',
|
||||
header: 'Image',
|
||||
header: '',
|
||||
width: 80,
|
||||
cell: SummonImageCell
|
||||
},
|
||||
|
|
@ -67,13 +65,7 @@
|
|||
<PageMeta title={m.page_title_db_summons()} description={m.page_desc_home()} />
|
||||
|
||||
<div class="database-page">
|
||||
<DatabaseGridWithProvider resource="summons" {columns} pageSize={20}>
|
||||
{#snippet headerActions()}
|
||||
<Button variant="secondary" size="small" onclick={() => goto('/database/summons/import')}>
|
||||
Batch Import
|
||||
</Button>
|
||||
{/snippet}
|
||||
</DatabaseGridWithProvider>
|
||||
<DatabaseGridWithProvider resource="summons" {columns} pageSize={20} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -10,15 +10,13 @@
|
|||
import ProficiencyCell from '$lib/components/database/cells/ProficiencyCell.svelte'
|
||||
import WeaponUncapCell from '$lib/components/database/cells/WeaponUncapCell.svelte'
|
||||
import LastUpdatedCell from '$lib/components/database/cells/LastUpdatedCell.svelte'
|
||||
import Button from '$lib/components/ui/Button.svelte'
|
||||
import { getRarityLabel } from '$lib/utils/rarity'
|
||||
import { goto } from '$app/navigation'
|
||||
|
||||
// Column configuration for weapons
|
||||
const columns: IColumn[] = [
|
||||
{
|
||||
id: 'granblueId',
|
||||
header: 'Image',
|
||||
header: '',
|
||||
width: 80,
|
||||
cell: WeaponImageCell
|
||||
},
|
||||
|
|
@ -75,13 +73,7 @@
|
|||
<PageMeta title={m.page_title_db_weapons()} description={m.page_desc_home()} />
|
||||
|
||||
<div class="database-page">
|
||||
<DatabaseGridWithProvider resource="weapons" {columns} pageSize={20}>
|
||||
{#snippet headerActions()}
|
||||
<Button variant="secondary" size="small" onclick={() => goto('/database/weapons/import')}>
|
||||
Batch Import
|
||||
</Button>
|
||||
{/snippet}
|
||||
</DatabaseGridWithProvider>
|
||||
<DatabaseGridWithProvider resource="weapons" {columns} pageSize={20} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in a new issue