generated from League-of-Foundry-Developers/FoundryVTT-Module-Template
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
260 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/applications/merchant-app/MerchantItemListHeader.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script> | ||
import CategoryHeader from "./CategoryHeader.svelte"; | ||
export let data; | ||
let store = data.store; | ||
let columns = data.columns; | ||
let category = data.category; | ||
let first = data.first; | ||
const sortTypeStore = store.sortType; | ||
const inverseSortStore = store.inverseSort; | ||
const editPrices = store.editPrices; | ||
</script> | ||
|
||
<div class="item-piles-item-list-header"> | ||
{#each columns as column, columnIndex} | ||
{#if columnIndex === 0 && category} | ||
<CategoryHeader {store} {category}/> | ||
{:else if column.label && (columnIndex > 0 || !category) && first && !$editPrices} | ||
<div class="item-piles-small-text"> | ||
<a on:click={() => { | ||
$inverseSortStore = $sortTypeStore === columnIndex+1 ? !$inverseSortStore : false; | ||
$sortTypeStore = columnIndex+1; | ||
}}> | ||
{column.label} | ||
<i class="fas" | ||
class:fa-chevron-down={!$inverseSortStore && $sortTypeStore === columnIndex+1} | ||
class:fa-chevron-up={$inverseSortStore && $sortTypeStore === columnIndex+1} | ||
></i> | ||
</a> | ||
</div> | ||
{:else if !$editPrices} | ||
<div></div> | ||
{/if} | ||
{/each} | ||
</div> | ||
|
||
<style lang="scss"> | ||
.item-piles-item-list-header { | ||
display: contents; | ||
& > * { | ||
height: 1.5rem; | ||
margin-top: 10px; | ||
margin-bottom: 5px; | ||
border-bottom: 1px solid rgba(0, 0, 0, 0.2); | ||
padding: 0 5px; | ||
display: flex; | ||
align-items: center; | ||
&:not(:first-child) { | ||
justify-content: center; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.