Skip to content

Commit

Permalink
Supermassive update
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Aug 20, 2022
1 parent 0dbdbeb commit 58cc10d
Show file tree
Hide file tree
Showing 18 changed files with 518 additions and 134 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release Creation

on:
release:
types: [published]
types: [ published ]

jobs:
build:
Expand Down Expand Up @@ -39,10 +39,14 @@ jobs:
manifest: https://raw.githubusercontent.com/${{github.repository}}/next/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip

# Install packages.
- run: npm install

# Build distribution.
- run: npm run build

# Create a zip file with all files required by the module to add to the release
- run: zip -r ./module.zip module.json LICENSE styles/ scripts/ templates/ languages/
- run: zip -r ./module.zip module.json LICENSE styles/ templates/ languages/ module.js style.css

# Create a release for this specific version
- name: Update Release with Files
Expand Down
2 changes: 1 addition & 1 deletion module.js.map

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
"Michael Leahy <[email protected]> (https://github.com/typhonrt)"
],
"dependencies": {
"@typhonjs-fvtt/runtime": "^0.0.18",
"@typhonjs-fvtt/svelte-standard": "^0.0.6",
"@typhonjs-fvtt/runtime": "^0.0.19",
"@typhonjs-fvtt/svelte-standard": "^0.0.7",
"svelte": "^3.49.0"
},
"devDependencies": {
"@babel/core": "^7",
"@babel/preset-env": "^7",
"@league-of-foundry-developers/foundry-vtt-types": "^9.238.1",
"@rollup/plugin-babel": "^5",
"rollup": "^2",
"svelte-dnd-action": "^0.9.18",
"@typhonjs-config/eslint-config": "^0.3.0",
"@typhonjs-fvtt/eslint-config-foundry.js": "^0.8.0",
"eslint": "^8",
"rollup": "^2",
"svelte-dnd-action": "^0.9.18",
"svelte-preprocess": "^4.10.0",
"vite": "^3"
},
Expand Down
2 changes: 1 addition & 1 deletion src/applications/merchant-app/MerchantBuyTab.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</div>

{#each $categoryStore as category, index (category.type)}
<div transition:fade|local={{duration: 150}}>
<div in:fade|local={{duration: 150}}>
<h3 class="merchant-item-group-type item-piles-flexrow">
<div>
{localize(category.label)}
Expand Down
29 changes: 20 additions & 9 deletions src/applications/merchant-app/MerchantItemEntry.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
$: itemFlagData = $itemFlagDataStore;
$: displayQuantity = $displayQuantityStore;
$: quantity = $quantityStore;
$: editQuantity = $quantityStore;
let showEditQuantity = false;
const displayControlButtons = store.actor.isOwner && !selling;
const displayBuyButton = !!store.recipient;
Expand Down Expand Up @@ -50,14 +52,22 @@
{:else}
{$itemName}
{/if}
{#if displayQuantity && quantity}
<span class="item-piles-small-text">
{#if itemFlagData.infiniteQuantity}
(∞)
{:else}
(x{quantity})
{/if}
</span>
{#if displayQuantity}
{#if itemFlagData.infiniteQuantity}
<span class="item-piles-small-text">(∞)</span>
{:else if !showEditQuantity}
<span class="item-piles-small-text" class:item-piles-clickable-link={game.user.isGM}
on:click={() => { if(game.user.isGM) showEditQuantity = true; }}>(x{quantity})</span>
{/if}
{/if}
{#if showEditQuantity}
<div class="item-piles-quantity-container" style="flex:0 1 50px;">
<div class="item-piles-quantity-input-container">
<input class="item-piles-quantity" type="text" bind:value="{editQuantity}" autofocus
on:change={() => { showEditQuantity = false; item.updateQuantity(editQuantity); }}
on:keydown={(evt) => { if(evt.key === "Enter") showEditQuantity = false; }}/>
</div>
</div>
{/if}
</div>
</div>
Expand All @@ -82,9 +92,10 @@
{/if}
{#if displayBuyButton}
<span class:item-piles-clickable-link={!itemFlagData.notForSale || game.user.isGM}
class:item-piles-clickable-link-disabled={itemFlagData.notForSale && !game.user.isGM}
class:item-piles-clickable-link-disabled={quantity <= 0 || (itemFlagData.notForSale && !game.user.isGM)}
class:buy-button={displayControlButtons}
on:click={() => {
if(quantity <= 0 || (itemFlagData.notForSale && !game.user.isGM)) return;
store.tradeItem(item, selling)
}}>
<i class="fas" class:fa-shopping-cart={!selling} class:fa-hand-holding-usd={selling}></i>
Expand Down
70 changes: 36 additions & 34 deletions src/applications/merchant-app/MerchantLeftPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,51 +31,42 @@
{#if activeSidebarTab === 'description'}
<div class="tab merchant-description">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore
eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore
eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
dolore
eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.

</div>
</div>
{/if}

{#if activeSidebarTab === 'settings'}
<div class="tab merchant-settings">
<div class="setting-container">
<div class="tab merchant-settings ">

<div class="setting-container item-piles-config-container">

<div class="form-group slider-group">
<div class="form-group">
<label style="flex:3;">
{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.BuyPriceModifier")}<br>
<span>{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.PurchaseOnly")}</span>
<p>{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.PurchaseOnlyExplanation")}</p>
</label>
<SliderInput style="flex:4;" bind:value={$pileDataStore.buyPriceModifier}/>
<input type="checkbox" bind:checked={$pileDataStore.purchaseOnly}/>
</div>

<div class="form-group slider-group">
<div class="form-group">
<label style="flex:3;">
{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.SellPriceModifier")}<br>
<span>{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.HideNewItems")}</span>
<p>{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.HideNewItemsExplanation")}</p>
</label>
<input type="checkbox" bind:checked={$pileDataStore.hideNewItems}/>
</div>

<div class="form-group slider-group item-piles-flexcol">
<label>
{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.BuyPriceModifier")}
</label>
<SliderInput bind:value={$pileDataStore.buyPriceModifier}/>
</div>

<div class="form-group slider-group item-piles-flexcol">
<label>
{localize("ITEM-PILES.Applications.ItemPileConfig.Merchant.SellPriceModifier")}
</label>
<SliderInput style="flex:4;" bind:value={$pileDataStore.sellPriceModifier}/>
</div>
Expand Down Expand Up @@ -147,6 +138,17 @@
top: 0;
bottom: 37px;
position: absolute;
.form-group {
clear: both;
display: flex;
flex-wrap: wrap;
margin: 3px 0;
&.item-piles-flexcol {
align-items: flex-start;
}
}
}
.update-button {
Expand Down
Loading

0 comments on commit 58cc10d

Please sign in to comment.