feat(web) improvements in ui for calculator
This commit is contained in:
@@ -52,9 +52,11 @@ import { Router } from '@angular/router';
|
|||||||
|
|
||||||
@if (loading()) {
|
@if (loading()) {
|
||||||
<app-card class="loading-state">
|
<app-card class="loading-state">
|
||||||
|
<div class="loader-content">
|
||||||
<div class="spinner"></div>
|
<div class="spinner"></div>
|
||||||
<p>Analisi geometria e slicing in corso...</p>
|
<h3 class="loading-title">Analisi in corso...</h3>
|
||||||
<small class="text-muted">Potrebbe richiedere qualche secondo.</small>
|
<p class="loading-text">Stiamo analizzando la geometria e calcolando il percorso utensile.</p>
|
||||||
|
</div>
|
||||||
</app-card>
|
</app-card>
|
||||||
} @else if (result()) {
|
} @else if (result()) {
|
||||||
<app-quote-result [result]="result()!" (consult)="onConsult()"></app-quote-result>
|
<app-quote-result [result]="result()!" (consult)="onConsult()"></app-quote-result>
|
||||||
@@ -120,19 +122,39 @@ import { Router } from '@angular/router';
|
|||||||
.benefits { padding-left: var(--space-4); color: var(--color-text-muted); line-height: 2; }
|
.benefits { padding-left: var(--space-4); color: var(--color-text-muted); line-height: 2; }
|
||||||
|
|
||||||
.loading-state {
|
.loading-state {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 300px; /* Match typical result height */
|
||||||
|
}
|
||||||
|
|
||||||
|
.loader-content {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: var(--space-8);
|
max-width: 300px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-title {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: var(--space-4) 0 var(--space-2);
|
||||||
|
color: var(--color-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-text {
|
||||||
|
font-size: 0.9rem;
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
border: 3px solid rgba(0, 0, 0, 0.1);
|
border: 3px solid var(--color-neutral-200);
|
||||||
border-left-color: var(--color-brand);
|
border-left-color: var(--color-brand);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 32px;
|
width: 48px;
|
||||||
height: 32px;
|
height: 48px;
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
margin: 0 auto var(--space-4);
|
margin: 0 auto;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
|
|||||||
@@ -101,25 +101,22 @@ import { QuoteRequest } from '../../services/quote-estimator.service';
|
|||||||
></app-input>
|
></app-input>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<!-- Progress Bar (Only when loading) -->
|
||||||
@if (loading()) {
|
@if (loading()) {
|
||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<div class="progress-bar">
|
<div class="progress-bar">
|
||||||
<div class="progress-fill"></div>
|
<div class="progress-fill"></div>
|
||||||
</div>
|
</div>
|
||||||
<p class="progress-text">Uploading & Analyzing...</p>
|
<!-- <p class="progress-text">Uploading & Analyzing...</p> -->
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<app-button
|
<app-button
|
||||||
type="submit"
|
type="submit"
|
||||||
[disabled]="form.invalid || loading()"
|
[disabled]="form.invalid || loading()"
|
||||||
[fullWidth]="true">
|
[fullWidth]="true">
|
||||||
@if (loading()) {
|
{{ loading() ? 'Processing...' : ('CALC.CALCULATE' | translate) }}
|
||||||
Slicing in progress...
|
|
||||||
} @else {
|
|
||||||
{{ 'CALC.CALCULATE' | translate }}
|
|
||||||
}
|
|
||||||
</app-button>
|
</app-button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -188,19 +185,21 @@ import { QuoteRequest } from '../../services/quote-estimator.service';
|
|||||||
|
|
||||||
/* Progress Bar */
|
/* Progress Bar */
|
||||||
.progress-container {
|
.progress-container {
|
||||||
margin-top: var(--space-4);
|
margin-bottom: var(--space-3);
|
||||||
padding: var(--space-4);
|
/* padding: var(--space-2); */
|
||||||
background: var(--color-neutral-100);
|
/* background: var(--color-neutral-100); */
|
||||||
border-radius: var(--radius-md);
|
/* border-radius: var(--radius-md); */
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
height: 6px;
|
height: 4px;
|
||||||
background: var(--color-border);
|
background: var(--color-border);
|
||||||
border-radius: 3px;
|
border-radius: 2px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: var(--space-2);
|
margin-bottom: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.progress-fill {
|
.progress-fill {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user