dev #8

Closed
JoeKung wants to merge 72 commits from dev into int
7 changed files with 43 additions and 17 deletions
Showing only changes of commit a6eae757c5 - Show all commits

View File

@@ -3,10 +3,16 @@
<div class="section"> <div class="section">
@if (selectedFile()) { @if (selectedFile()) {
<div class="viewer-wrapper"> <div class="viewer-wrapper">
<app-stl-viewer @if (isStepFile(selectedFile())) {
[file]="selectedFile()" <div class="step-warning">
[color]="getSelectedFileColor()"> <p>{{ 'CALC.STEP_WARNING' | translate }}</p>
</app-stl-viewer> </div>
} @else {
<app-stl-viewer
[file]="selectedFile()"
[color]="getSelectedFileColor()">
</app-stl-viewer>
}
<!-- Close button removed as requested --> <!-- Close button removed as requested -->
</div> </div>
} }

View File

@@ -202,6 +202,18 @@
.progress-fill { .progress-fill {
height: 100%; height: 100%;
background: var(--color-brand); background: var(--color-brand);
width: 0%; }
transition: width 0.2s ease-out;
.step-warning {
display: flex;
justify-content: center;
align-items: center;
height: 300px;
background: var(--color-neutral-100);
border: 1px dashed var(--color-border);
border-radius: var(--radius-md);
padding: var(--space-4);
text-align: center;
color: var(--color-text-muted);
font-weight: 500;
} }

View File

@@ -61,7 +61,13 @@ export class UploadFormComponent implements OnInit {
} }
} }
acceptedFormats = '.stl,.3mf,.step,.stp,.obj,.amf,.ply,.igs,.iges'; acceptedFormats = '.stl,.3mf,.step,.stp';
isStepFile(file: File | null): boolean {
if (!file) return false;
const name = file.name.toLowerCase();
return name.endsWith('.step') || name.endsWith('.stp');
}
constructor() { constructor() {
this.form = this.fb.group({ this.form = this.fb.group({

View File

@@ -51,7 +51,7 @@
<div class="drop-zone" (click)="fileInput.click()" <div class="drop-zone" (click)="fileInput.click()"
(dragover)="onDragOver($event)" (drop)="onDrop($event)"> (dragover)="onDragOver($event)" (drop)="onDrop($event)">
<input #fileInput type="file" multiple (change)="onFileSelected($event)" hidden <input #fileInput type="file" multiple (change)="onFileSelected($event)" hidden
accept=".jpg,.jpeg,.png,.pdf,.stl,.step,.stp,.3mf,.obj"> accept=".jpg,.jpeg,.png,.pdf,.stl,.step,.stp,.3mf">
<p>{{ 'CONTACT.DROP_FILES' | translate }}</p> <p>{{ 'CONTACT.DROP_FILES' | translate }}</p>
</div> </div>

View File

@@ -10,8 +10,8 @@ import { CommonModule } from '@angular/common';
}) })
export class AppDropzoneComponent { export class AppDropzoneComponent {
label = input<string>('Drop files here or click to upload'); label = input<string>('Drop files here or click to upload');
subtext = input<string>('Supports .stl, .obj'); subtext = input<string>('Supports .stl, .3mf, .step');
accept = input<string>('.stl,.obj'); accept = input<string>('.stl,.3mf,.step,.stp');
multiple = input<boolean>(true); multiple = input<boolean>(true);
filesDropped = output<File[]>(); filesDropped = output<File[]>();

View File

@@ -43,7 +43,7 @@
"MODE_EASY": "Quick", "MODE_EASY": "Quick",
"MODE_ADVANCED": "Advanced", "MODE_ADVANCED": "Advanced",
"UPLOAD_LABEL": "Drag your 3D file here", "UPLOAD_LABEL": "Drag your 3D file here",
"UPLOAD_SUB": "Supports STL, 3MF, STEP, OBJ up to 50MB", "UPLOAD_SUB": "Supports STL, 3MF, STEP up to 50MB",
"MATERIAL": "Material", "MATERIAL": "Material",
"QUALITY": "Quality", "QUALITY": "Quality",
"QUANTITY": "Quantity", "QUANTITY": "Quantity",
@@ -68,7 +68,8 @@
"BENEFITS_1": "Automatic quote with instant cost and time", "BENEFITS_1": "Automatic quote with instant cost and time",
"BENEFITS_2": "Selected materials and quality control", "BENEFITS_2": "Selected materials and quality control",
"BENEFITS_3": "CAD consultation if file needs modifications", "BENEFITS_3": "CAD consultation if file needs modifications",
"ERR_FILE_REQUIRED": "File is required." "ERR_FILE_REQUIRED": "File is required.",
"STEP_WARNING": "3D preview is not available for STEP files, but the calculator works perfectly. You can proceed with the quotation."
}, },
"SHOP": { "SHOP": {
"TITLE": "Technical solutions", "TITLE": "Technical solutions",
@@ -140,7 +141,7 @@
"COMPANY_NAME": "Company Name", "COMPANY_NAME": "Company Name",
"REF_PERSON": "Reference Person", "REF_PERSON": "Reference Person",
"UPLOAD_LABEL": "Attachments", "UPLOAD_LABEL": "Attachments",
"UPLOAD_HINT": "Max 15 files. Supported: Images, PDF, STL, STEP, 3MF, OBJ", "UPLOAD_HINT": "Max 15 files. Supported: Images, PDF, STL, STEP, 3MF",
"DROP_FILES": "Drop files here or click to upload", "DROP_FILES": "Drop files here or click to upload",
"PLACEHOLDER_NAME": "Your Name", "PLACEHOLDER_NAME": "Your Name",
"PLACEHOLDER_EMAIL": "your@email.com", "PLACEHOLDER_EMAIL": "your@email.com",

View File

@@ -58,14 +58,14 @@
}, },
"CALC": { "CALC": {
"TITLE": "Calcola Preventivo 3D", "TITLE": "Calcola Preventivo 3D",
"SUBTITLE": "Carica il tuo file 3D (STL, 3MF, STEP...) e ricevi una stima immediata di costi e tempi di stampa.", "SUBTITLE": "Carica il tuo file 3D (STL, 3MF, STEP), imposta la qualtà, colore e calcola immediatamente prezzo e tempi.",
"CTA_START": "Inizia Ora", "CTA_START": "Inizia Ora",
"BUSINESS": "Aziende", "BUSINESS": "Aziende",
"PRIVATE": "Privati", "PRIVATE": "Privati",
"MODE_EASY": "Base", "MODE_EASY": "Base",
"MODE_ADVANCED": "Avanzata", "MODE_ADVANCED": "Avanzata",
"UPLOAD_LABEL": "Trascina il tuo file 3D qui", "UPLOAD_LABEL": "Trascina il tuo file 3D qui",
"UPLOAD_SUB": "Supportiamo STL, 3MF, STEP, OBJ fino a 50MB", "UPLOAD_SUB": "Supportiamo STL, 3MF, STEP fino a 50MB",
"MATERIAL": "Materiale", "MATERIAL": "Materiale",
"QUALITY": "Qualità", "QUALITY": "Qualità",
"PRINT_SPEED": "Velocità di Stampa", "PRINT_SPEED": "Velocità di Stampa",
@@ -101,7 +101,8 @@
"UPLOADING": "Caricamento...", "UPLOADING": "Caricamento...",
"PROCESSING": "Elaborazione...", "PROCESSING": "Elaborazione...",
"NOTES_PLACEHOLDER": "Istruzioni specifiche...", "NOTES_PLACEHOLDER": "Istruzioni specifiche...",
"SETUP_NOTE": "* Include {{cost}} Costo di Setup" "SETUP_NOTE": "* Include {{cost}} Costo di Setup",
"STEP_WARNING": "La visualizzazione 3D non è compatibile con i file STEP, ma il calcolatore funziona."
}, },
"QUOTE": { "QUOTE": {
"PROCEED_ORDER": "Procedi con l'ordine", "PROCEED_ORDER": "Procedi con l'ordine",
@@ -203,7 +204,7 @@
"COMPANY_NAME": "Ragione Sociale", "COMPANY_NAME": "Ragione Sociale",
"REF_PERSON": "Persona di Riferimento", "REF_PERSON": "Persona di Riferimento",
"UPLOAD_LABEL": "Allegati", "UPLOAD_LABEL": "Allegati",
"UPLOAD_HINT": "Max 15 file. Supportati: Immagini, PDF, STL, STEP, 3MF, OBJ", "UPLOAD_HINT": "Max 15 file. Supportati: Immagini, PDF, STL, STEP, 3MF",
"DROP_FILES": "Trascina qui i file o clicca per caricare", "DROP_FILES": "Trascina qui i file o clicca per caricare",
"PLACEHOLDER_NAME": "Il tuo nome", "PLACEHOLDER_NAME": "Il tuo nome",
"PLACEHOLDER_EMAIL": "tuo@email.com", "PLACEHOLDER_EMAIL": "tuo@email.com",