integration new apis

This commit is contained in:
sdarbinyan
2026-03-24 00:09:11 +04:00
parent 3445f55758
commit 56f4c56b9e
47 changed files with 2603 additions and 1577 deletions

View File

@@ -102,6 +102,34 @@
}
</div>
@if (item()!.colour || item()!.size) {
<div class="novo-variants">
@if (item()!.colour) {
<div class="variant-group">
<span class="variant-label">{{ 'itemDetail.colour' | translate }}:</span>
<span class="variant-chip colour-chip">{{ item()!.colour }}</span>
</div>
}
@if (item()!.size) {
<div class="variant-group">
<span class="variant-label">{{ 'itemDetail.size' | translate }}:</span>
<span class="variant-chip size-chip">{{ item()!.size }}</span>
</div>
}
</div>
}
@if (item()!.attributes && item()!.attributes!.length > 0) {
<div class="novo-attributes">
@for (attr of item()!.attributes!; track attr.key) {
<div class="attribute-row">
<span class="attribute-key">{{ attr.key }}</span>
<span class="attribute-value">{{ attr.value }}</span>
</div>
}
</div>
}
<button class="novo-add-cart" (click)="addToCart()">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="9" cy="21" r="1"></circle>
@@ -339,6 +367,34 @@
}
</div>
@if (item()!.colour || item()!.size) {
<div class="dx-variants">
@if (item()!.colour) {
<div class="variant-group">
<span class="variant-label">{{ 'itemDetail.colour' | translate }}:</span>
<span class="variant-chip colour-chip">{{ item()!.colour }}</span>
</div>
}
@if (item()!.size) {
<div class="variant-group">
<span class="variant-label">{{ 'itemDetail.size' | translate }}:</span>
<span class="variant-chip size-chip">{{ item()!.size }}</span>
</div>
}
</div>
}
@if (item()!.attributes && item()!.attributes!.length > 0) {
<div class="dx-attributes">
@for (attr of item()!.attributes!; track attr.key) {
<div class="attribute-row">
<span class="attribute-key">{{ attr.key }}</span>
<span class="attribute-value">{{ attr.value }}</span>
</div>
}
</div>
}
<button class="dx-add-cart" (click)="addToCart()">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="9" cy="21" r="1"></circle>

View File

@@ -291,6 +291,64 @@ $dx-card-bg: #f5f3f9;
}
}
// Variant chips (colour/size) — shared between dexar and novo
.dx-variants, .novo-variants {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 12px;
.variant-group {
display: flex;
align-items: center;
gap: 8px;
}
.variant-label {
font-size: 0.9rem;
color: #6b7280;
font-weight: 500;
}
.variant-chip {
display: inline-flex;
align-items: center;
padding: 6px 14px;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 600;
border: 1.5px solid $dx-border;
background: rgba(73, 118, 113, 0.06);
color: $dx-primary;
}
}
.dx-attributes, .novo-attributes {
display: flex;
flex-wrap: wrap;
gap: 6px 16px;
margin-bottom: 14px;
padding: 10px 14px;
background: #f8fafa;
border-radius: 10px;
.attribute-row {
display: flex;
gap: 6px;
font-size: 0.85rem;
}
.attribute-key {
color: #6b7280;
&::after { content: ':'; }
}
.attribute-value {
font-weight: 600;
color: #1a1a1a;
}
}
.dx-description {
padding-top: 8px;
border-top: 1px solid $dx-border;