mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-10 09:19:24 +01:00
parent
529075f64c
commit
14f8c73b08
4 changed files with 40 additions and 21 deletions
|
@ -163,13 +163,13 @@
|
||||||
<span class="badge text-bg-warning inventory" v-if="item.inventory">
|
<span class="badge text-bg-warning inventory" v-if="item.inventory">
|
||||||
{{ item.inventory > 0 ? `${item.inventory} left` : "Sold out" }}
|
{{ item.inventory > 0 ? `${item.inventory} left` : "Sold out" }}
|
||||||
</span>
|
</span>
|
||||||
<div class="d-flex align-items-center gap-2">
|
<div class="d-flex align-items-center gap-2 quantities">
|
||||||
<button type="button" v-on:click="updateQuantity(item.id, -1)" class="btn btn-light p-1 rounded-pill d-flex align-items-center justify-content-center">
|
<button type="button" v-on:click="updateQuantity(item.id, -1)" class="btn btn-minus">
|
||||||
<vc:icon symbol="minus" />
|
<span><vc:icon symbol="minus" /></span>
|
||||||
</button>
|
</button>
|
||||||
<input class="form-control hide-number-spin w-50px" type="number" placeholder="Qty" min="1" step="1" :max="item.inventory" v-model.number="item.count">
|
<input class="form-control hide-number-spin w-50px text-center" type="number" placeholder="Qty" min="1" step="1" :max="item.inventory" v-model.number="item.count">
|
||||||
<button type="button" v-on:click="updateQuantity(item.id, +1)" class="btn btn-light p-1 rounded-pill d-flex align-items-center justify-content-center">
|
<button type="button" v-on:click="updateQuantity(item.id, +1)" class="btn btn-plus">
|
||||||
<vc:icon symbol="plus" />
|
<span><vc:icon symbol="plus" /></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
<div class="d-flex align-items-start w-100 gap-3">
|
<div class="d-flex align-items-start w-100 gap-3">
|
||||||
@if (!string.IsNullOrWhiteSpace(item.Image))
|
@if (!string.IsNullOrWhiteSpace(item.Image))
|
||||||
{
|
{
|
||||||
<div class="img">
|
<div class="img d-none d-sm-block">
|
||||||
<img src="@item.Image" alt="@item.Title" asp-append-version="true" />
|
<img src="@item.Image" alt="@item.Title" asp-append-version="true" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -138,13 +138,13 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex align-items-center gap-2 ms-auto" v-if="inStock(@index)">
|
<div class="d-flex align-items-center gap-2 ms-auto quantities">
|
||||||
<button type="button" v-on:click="updateQuantity(`@Safe.Raw(item.Id)`, -1, true)" class="btn btn-light p-1 rounded-pill d-flex align-items-center justify-content-center btn-minus" :disabled="getQuantity(`@Safe.Raw(item.Id)`) <= 0">
|
<button type="button" v-on:click="updateQuantity(`@Safe.Raw(item.Id)`, -1, true)" class="btn btn-minus" :disabled="getQuantity(`@Safe.Raw(item.Id)`) <= 0">
|
||||||
<vc:icon symbol="minus" />
|
<span><vc:icon symbol="minus" /></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="quantity text-center fs-6" style="width:2rem">{{ getQuantity(`@Safe.Raw(item.Id)`) }}</div>
|
<div class="quantity text-center fs-5" style="width:2rem">{{ getQuantity(`@Safe.Raw(item.Id)`) }}</div>
|
||||||
<button type="button" v-on:click="updateQuantity(`@Safe.Raw(item.Id)`, +1, true)" class="btn btn-light p-1 rounded-pill d-flex align-items-center justify-content-center btn-plus">
|
<button type="button" v-on:click="updateQuantity(`@Safe.Raw(item.Id)`, +1, true)" class="btn btn-plus" :disabled="!inStock(@index)">
|
||||||
<vc:icon symbol="plus" />
|
<span><vc:icon symbol="plus" /></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -100,14 +100,6 @@ header .cart-toggle-btn {
|
||||||
background-color: var(--btcpay-bg-tile);
|
background-color: var(--btcpay-bg-tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
#cart .quantity .btn {
|
|
||||||
width: 2rem;
|
|
||||||
height: 2rem;
|
|
||||||
}
|
|
||||||
#cart .quantity .btn .icon{
|
|
||||||
--btn-icon-size: .75rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#CartBadge {
|
#CartBadge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
@ -96,3 +96,30 @@
|
||||||
max-height: 210px;
|
max-height: 210px;
|
||||||
object-fit: scale-down;
|
object-fit: scale-down;
|
||||||
}
|
}
|
||||||
|
.quantities .btn {
|
||||||
|
--btcpay-btn-disabled-opacity: .3;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
background: none;
|
||||||
|
border: transparent;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.quantities .btn span {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--btcpay-light);
|
||||||
|
}
|
||||||
|
.quantities .btn:hover span {
|
||||||
|
background: var(--btcpay-light-bg-hover);
|
||||||
|
}
|
||||||
|
.quantities .icon {
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue