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