Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Dec 18, 2023
1 parent d0811fd commit d789831
Show file tree
Hide file tree
Showing 27 changed files with 757 additions and 743 deletions.
76 changes: 17 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,29 @@
![](https://img.shields.io/badge/Foundry-v10-informational)
<!--- Downloads @ Latest Badge -->
<!--- replace <user>/<repo> with your username/repository -->
<!--- ![Latest Release Download Count](https://img.shields.io/github/downloads/<user>/<repo>/latest/module.zip) -->
# Item Piles: Auctioneer

<!--- Forge Bazaar Install % Badge -->
<!--- replace <your-module-name> with the `name` in your manifest -->
<!--- ![Forge Installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2F<your-module-name>&colorB=4aa94a) -->
![Latest Release Download Count](https://img.shields.io/github/downloads/fantasycalendar/FoundryVTT-ItemPiles-Auctioneer/latest/module.zip?color=2b82fc&label=DOWNLOADS&style=for-the-badge) [![Forge Installs](https://img.shields.io/badge/dynamic/json?label=Forge%20Installs&query=package.installs&suffix=%25&url=https%3A%2F%2Fforge-vtt.com%2Fapi%2Fbazaar%2Fpackage%2Fitem-piles-auctioneer&colorB=006400&style=for-the-badge)](https://forge-vtt.com/bazaar#package=item-piles-auctioneer) ![Foundry Core Compatible Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fgithub.com%2Ffantasycalendar%2FFoundryVTT-ItemPiles-Auctioneer%2Freleases%2Flatest%2Fdownload%2Fmodule.json&label=Foundry%20Compatible%20Version&query=$.compatibility.minimum&colorB=orange&style=for-the-badge) ![Foundry Core Supported Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fgithub.com%2Ffantasycalendar%2FFoundryVTT-ItemPiles-Auctioneer%2Freleases%2Flatest%2Fdownload%2Fmodule.json&label=Foundry%20Verified%20Version&query=$.compatibility.verified&colorB=orange&style=for-the-badge) ![Latest Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fgithub.com%2Ffantasycalendar%2FFoundryVTT-ItemPiles-Auctioneer%2Freleases%2Flatest%2Fdownload%2Fmodule.json&label=Latest%20Release&prefix=v&query=$.version&colorB=red&style=for-the-badge)

---

# How to use this Template to create a versioned Release
<img src="https://app.fantasy-calendar.com/resources/computerworks-logo-full.png" alt="Fantasy Computerworks Logo" style="width:250px;"/>

1. Open your repository's releases page.
A module made by [Fantasy Computerworks](http://fantasycomputer.works/).

![Where to click to open repository releases.](https://user-images.githubusercontent.com/7644614/93409301-9fd25080-f864-11ea-9e0c-bdd09e4418e4.png)
Other works by us:

2. Click "Draft a new release"
- [Fantasy Calendar](https://app.fantasy-calendar.com) - The best calendar creator and management app on the internet
- [Sequencer](https://foundryvtt.com/packages/sequencer) - Wow your players by playing visual effects on the canvas
- [Item Piles](https://foundryvtt.com/packages/item-piles) - Drag & drop items into the scene to drop item piles that you can then easily pick up
- [Tagger](https://foundryvtt.com/packages/tagger) - Tag objects in the scene and retrieve them with a powerful API
- [Token Ease](https://foundryvtt.com/packages/token-ease) - Make your tokens _feel good_ to move around on the board
- [Rest Recovery](https://foundryvtt.com/packages/rest-recovery) - Automate most D&D 5e long and short rest mechanics

![Draft a new release button.](https://user-images.githubusercontent.com/7644614/93409364-c1333c80-f864-11ea-89f1-abfcb18a8d9f.png)
Like what we've done? Buy us a coffee!

3. Fill out the release version as the tag name.
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/fantasycomputerworks)

If you want to add details at this stage you can, or you can always come back later and edit them.
---

![Release Creation Form](https://user-images.githubusercontent.com/7644614/93409543-225b1000-f865-11ea-9a19-f1906a724421.png)
## What is Item Piles: Auctioneer?

4. Hit submit.
This module allows you to create self-sustained auction houses. Players can create auctions, bid on existing auctions, claim auctions that they have won, renew or renew expired auctions they have created.

5. Wait a few minutes.

A Github Action will run to populate the `module.json` and `module.zip` with the correct urls that you can then use to distribute this release. You can check on its status in the "Actions" tab.

![Actions Tab](https://user-images.githubusercontent.com/7644614/93409820-c1800780-f865-11ea-8c6b-c3792e35e0c8.png)

6. Grab the module.json url from the release's details page.

![image](https://user-images.githubusercontent.com/7644614/93409960-10c63800-f866-11ea-83f6-270cc5d10b71.png)

This `module.json` will only ever point at this release's `module.zip`, making it useful for sharing a specific version for compatibility purposes.

7. You can use the url `https://github.com/<user>/<repo>/releases/latest/download/module.json` to refer to the manifest.

This is the url you want to use to install the module typically, as it will get updated automatically.

# How to List Your Releases on Package Admin

To request a package listing for your first release, go to the [Package Submission Form](https://foundryvtt.com/packages/submit) (accessible via a link at the bottom of the "[Systems and Modules](https://foundryvtt.com/packages/)" page on the Foundry website).

Fill in the form. "Package Name" must match the name in the module manifest. Package Title will be the display name for the package. Package URL should be your repo URL.
![image](https://user-images.githubusercontent.com/36359784/120664263-b49e5500-c482-11eb-9126-af7006389903.png)


One of the Foundry staff will typically get back to you with an approval or any further questions within a few days, and give you access to the package admin pages.

Once you have access to the [module admin page](https://foundryvtt.com/admin/packages/package/), you can release a new version by going into the page for your module, scrolling to the bottom, and filling in a new Package Version.

When listing a new version, Version should be the version number you set above, and the Manifest URL should be the manifest __for that specific version__ (do not use /latest/ here).
![image](https://user-images.githubusercontent.com/36359784/120664346-c4b63480-c482-11eb-9d8b-731b50d70939.png)

> ### :warning: Important :warning:
>
> It is very important that you use the specific release manifest url, and not the `/latest` url here. For more details about why this is important and how Foundry Installs/Updates packages, read [this wiki article](https://foundryvtt.wiki/en/development/guides/releases-and-history).
Clicking "Save" in the bottom right will save the new version, which means that anyone installing your module from within Foundry will get that version, and a post will be generated in the #release-announcements channel on the official Foundry VTT Discord.


# FoundryVTT Module

Does something, probably

## Changelog
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"id": "item-piles",
"type": "module",
"compatibility": {
"minimum": "2.8.7",
"verified": "2.8.7"
"minimum": "2.8.8",
"verified": "2.8.8"
}
},
{
Expand Down
16 changes: 8 additions & 8 deletions src/applications/auctioneer/Auctions/Auctions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<div class="item-list">

<SortByTabs tab={$store.tabs.auctions} class="auctions" numVisibleElements={sortedAuctions.length}/>
<SortByTabs class="auctions" numVisibleElements={sortedAuctions.length} tab={$store.tabs.auctions}/>

<VirtualScroll
data={sortedAuctions}
Expand All @@ -49,23 +49,23 @@

<style lang="scss">
.auctions {
display: grid;
grid-template-columns: 200px auto;
grid-column-gap: 0.25rem;
}
.auctions {
display: grid;
grid-template-columns: 200px auto;
grid-column-gap: 0.25rem;
}
.item-list {
display: flex;
flex-direction: column;
border: var(--item-piles-auctioneer-border);
border-radius: var(--item-piles-auctioneer-border-radius);
height: calc(var(--item-piles-auctioneer-ui-height) - 83px);
max-height: calc(var(--item-piles-auctioneer-ui-height) - 83px);
max-height: calc(var(--item-piles-auctioneer-ui-height) - 83px);
overflow: hidden;
}
:global.virtual-scroll-root{
:global.virtual-scroll-root {
overflow-x: hidden;
}
Expand Down
10 changes: 6 additions & 4 deletions src/applications/auctioneer/Auctions/CreateAuctionSidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@
<div class="auction-title auction-border-top auction-deposit" data-tooltip-direction="UP"
data-tooltip="The amount you must pay in order to create this auction. If the auction succeeds, you get this back.">
<span>Auction deposit:</span>
<span class:cant-afford={depositCurrencies && !depositCurrencies.canBuy}>{depositCurrenciesString || "None"}</span>
<span
class:cant-afford={depositCurrencies && !depositCurrencies.canBuy}>{depositCurrenciesString || "None"}</span>
</div>
{/if}
{#if $flagStore.auctionBidVisibility === CONSTANTS.VISIBILITY_KEYS.USER}
Expand Down Expand Up @@ -264,8 +265,8 @@
</div>
{/if}
{/if}
<div class="auction-title auction-border-top auction-duration" data-tooltip-direction="UP"
data-tooltip="How long this auction will remain active">
<div class="auction-title auction-border-top auction-duration" data-tooltip="How long this auction will remain active"
data-tooltip-direction="UP">
<span>Duration:</span>
<select bind:value={$durationStore}>
{#each validTimeLimits as [key, value]}
Expand All @@ -277,7 +278,8 @@
</div>
<div class="auction-post-buttons">
<ReactiveButton callback={() => createAuctions()} disabled={!$newAuctionStore.itemData || (depositCurrencies && !depositCurrencies?.canBuy)}>
<ReactiveButton callback={() => createAuctions()}
disabled={!$newAuctionStore.itemData || (depositCurrencies && !depositCurrencies?.canBuy)}>
Post Auctions
</ReactiveButton>
{#if game.user.isGM}
Expand Down
4 changes: 2 additions & 2 deletions src/applications/auctioneer/Auctions/CurrencyList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{#each primaryCurrencies as currency}
<div class="price-currency-list-item">
<input type="number" bind:value={currency.quantity}/>
<img class="price-currency-list-img" src={currency.img} data-tooltip={currency.name}/>
<img class="price-currency-list-img" src={currency.img} data-tooltip={currency.name}/>
</div>
{/each}
</div>
Expand All @@ -51,7 +51,7 @@
{#each secondaryCurrencies as currency}
<div class="price-currency-list-item">
<input type="number" bind:value={currency.quantity}/>
<img class="price-currency-list-img" src={currency.img} data-tooltip={currency.name}/>
<img class="price-currency-list-img" src={currency.img} data-tooltip={currency.name}/>
</div>
{/each}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/applications/auctioneer/Auctions/currency-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function CurrencyStore(store) {

const { set, update, subscribe } = currencyStore;

function reset(){
function reset() {
update(data => {
data.primaryCurrencies = data.primaryCurrencies.map(currency => {
currency.quantity = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/applications/auctioneer/Bids/BidItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<div class="item-list-entry" class:selected={selected}>

<div class="item-row {$$props.class ?? ''}"
class:auction-won={auctionSucceeded}
class:auction-failed={auctionFailed}
class:auction-won={auctionSucceeded}
on:click={() => { store.entryClicked(bid.auction.uuid) }}
>
<ItemName auction={bid.auction}/>
Expand Down
2 changes: 1 addition & 1 deletion src/applications/auctioneer/Bids/Bids.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
overflow: hidden;
}
:global.virtual-scroll-root{
:global.virtual-scroll-root {
overflow-x: hidden;
}
Expand Down
31 changes: 16 additions & 15 deletions src/applications/auctioneer/Browse/AuctionItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,30 @@
{CONSTANTS.BID_VISIBILITY_UI_LABELS[auction.bidVisibility]}
</div>
{#if showStartPrice || !showReserve}
<div class="item-prices">
<div class="item-price" data-tooltip="Current bid price">
{#each auction.bidPriceData.currencies as currency (currency.id)}
<div class="price">
<span>{currency.quantity}</span>
<img src={currency.img}>
</div>
{/each}
</div>
{#if auction.buyoutPriceData}
<div class="item-price buyout-price" data-tooltip="Buyout price">
{#each auction.buyoutPriceData.currencies as currency (currency.id)}
<div class="item-prices">
<div class="item-price" data-tooltip="Current bid price">
{#each auction.bidPriceData.currencies as currency (currency.id)}
<div class="price">
<span>{currency.quantity}</span>
<img src={currency.img}>
</div>
{/each}
</div>
{/if}
</div>
{#if auction.buyoutPriceData}
<div class="item-price buyout-price" data-tooltip="Buyout price">
{#each auction.buyoutPriceData.currencies as currency (currency.id)}
<div class="price">
<span>{currency.quantity}</span>
<img src={currency.img}>
</div>
{/each}
</div>
{/if}
</div>
{:else if showReserve && !showStartPrice}
{#if auction.reservePrice}
<div class="item-prices" data-tooltip="Reserve price - if the auction does not meet this price, it will not succeed">
<div class="item-prices"
data-tooltip="Reserve price - if the auction does not meet this price, it will not succeed">
<div class="item-price">
{#each auction.reservePriceData.currencies as currency (currency.id)}
<div class="price">
Expand Down
4 changes: 2 additions & 2 deletions src/applications/auctioneer/Browse/Browse.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
.item-list {
display: flex;
flex-direction: column;
flex-direction: column;
border: var(--item-piles-auctioneer-border);
border-radius: var(--item-piles-auctioneer-border-radius);
height: calc(var(--item-piles-auctioneer-ui-height) - 114px);
Expand All @@ -81,7 +81,7 @@
}
:global.virtual-scroll-root{
:global.virtual-scroll-root {
overflow-x: hidden;
}
Expand Down
34 changes: 18 additions & 16 deletions src/applications/auctioneer/Browse/TopBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,35 @@
--border-hover="var(--item-piles-auctioneer-border)"
--border-radius="var(--item-piles-auctioneer-border-radius)"
--chevron-width="20px"
--multi-select-input-margin="none"
--internal-padding="0 0.15rem"
--value-container-padding="0"
--multi-select-padding="0 0.15rem"
--multi-item-margin="0"
--multi-item-padding="0 0.25rem"
--multi-item-gap="0"
--font-family="inherit"
--font-size="0.75rem"
--height="27px"
--input-color="black"
--internal-padding="0 0.15rem"
--margin="0 0.1rem 0 0.25rem"
--max-height="27px"
--text-overflow="ellipsis"
--multi-item-bg="rgba(255, 255, 255, 0.25)"
--multi-item-gap="0"
--multi-item-margin="0"
--multi-item-padding="0 0.25rem"
--multi-select-input-margin="none"
--multi-select-padding="0 0.15rem"
--text-overflow="ellipsis"
--value-container-padding="0"
--width="100%"
--margin="0 0.1rem 0 0.25rem"
multiFullItemClearable={true}
multiple={true}
clearable={false}
bind:value={$selectedCategoriesStore}
clearable={false}
floatingConfig={{ strategy: "fixed", placement: "bottom" }}
items={$categoryStore}
showChevron={true}
multiFullItemClearable={true}
multiple={true}
placeholder="Select type filter..."
showChevron={true}
></Select>
<button on:click={() => { store.searchClicked() }} type="button">Search</button>
<button on:click={() => { $searchStore = ""; store.searchClicked(); $selectedCategoriesStore = []; }} type="button">Clear</button>
<button on:click={() => { $searchStore = ""; store.searchClicked(); $selectedCategoriesStore = []; }} type="button">
Clear
</button>
<select bind:value={$store.itemsPerPage}>
<option value={12}>Show 12 per page</option>
<option value={20}>Show 20 per page</option>
Expand Down Expand Up @@ -97,7 +99,7 @@
input {
margin: 0;
max-width: 250px;
max-width: 250px;
height: 27px;
border: var(--item-piles-auctioneer-border);
border-radius: var(--item-piles-auctioneer-border-radius);
Expand Down Expand Up @@ -149,7 +151,7 @@
}
:global.value-container {
gap: 0 !important;
gap: 0 !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
const validCurrencies = getValidCurrenciesForPrice(auction.startPriceData.currencies);
if(auction.minBidPrice){
if (auction.minBidPrice) {
validCurrencies.forEach(currency => {
const foundCurrency = auction.minBidPriceData.currencies.find(minBidCurrency => {
return minBidCurrency.name === currency.name && minBidCurrency.abbreviation === currency.abbreviation;
})
if(foundCurrency){
if (foundCurrency) {
currency.quantity = foundCurrency.quantity;
}
})
Expand Down
12 changes: 6 additions & 6 deletions src/applications/auctioneer/Components/BottomBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@
<div class="buttons">
{#if $store.activeTab === "auctions"}
<ReactiveButton
callback={async () => await store.claimAuctions(auctions.filter(auction => auction.user === game.user && auction.expired))}
disabled={!auctions.filter(auction => auction.user === game.user && auction.expired).length}>
callback={async () => await store.claimAuctions(auctions.filter(auction => auction.user === game.user && auction.expired))}
disabled={!auctions.filter(auction => auction.user === game.user && auction.expired).length}>
Collect all
</ReactiveButton>
{:else if $store.activeTab === "bids"}
<ReactiveButton
callback={async () => await store.claimAuctions(auctions.filter(auction => !auction.won))}
disabled={!auctions.filter(auction => !auction.won).length}>
callback={async () => await store.claimAuctions(auctions.filter(auction => !auction.won))}
disabled={!auctions.filter(auction => !auction.won).length}>
Collect all
</ReactiveButton>
{:else}
<ReactiveButton
callback={async () => await store.claimAuctions(auctions.filter(auction => auction.won))}
disabled={!auctions.filter(auction => auction.won).length}>
callback={async () => await store.claimAuctions(auctions.filter(auction => auction.won))}
disabled={!auctions.filter(auction => auction.won).length}>
Collect all
</ReactiveButton>
{/if}
Expand Down
Loading

0 comments on commit d789831

Please sign in to comment.