mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 21:16:40 +02:00
fix: separate handset icon (landline) and smartphone icon (mobile) in PDF export
- Landline phone: classic telephone handset with earpiece, mouthpiece and curved connector - Mobile phone: smartphone outline with display and home button Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
82af9cb1f0
commit
0c195dc3a9
1 changed files with 23 additions and 3 deletions
|
|
@ -175,11 +175,11 @@ export class ProfileExportService {
|
|||
|
||||
const iconTextOffset = 18; // Abstand Icon → Text
|
||||
if (data.phone) {
|
||||
this.drawPhoneIcon(doc, leftColX + 1, yLeft, accentColor);
|
||||
this.drawHandsetIcon(doc, leftColX + 1, yLeft, accentColor);
|
||||
yLeft = this.pdfContactText(doc, data.phone, leftColX + iconTextOffset, yLeft, leftColWidth - iconTextOffset);
|
||||
}
|
||||
if (data.mobile) {
|
||||
this.drawPhoneIcon(doc, leftColX + 1, yLeft, accentColor);
|
||||
this.drawMobileIcon(doc, leftColX + 1, yLeft, accentColor);
|
||||
yLeft = this.pdfContactText(doc, data.mobile, leftColX + iconTextOffset, yLeft, leftColWidth - iconTextOffset);
|
||||
}
|
||||
if (data.email) {
|
||||
|
|
@ -731,7 +731,27 @@ export class ProfileExportService {
|
|||
|
||||
// --- Vektor-Icons für Kontakt ---
|
||||
|
||||
private drawPhoneIcon(doc: PDFKit.PDFDocument, x: number, y: number, color: string): void {
|
||||
private drawHandsetIcon(doc: PDFKit.PDFDocument, x: number, y: number, color: string): void {
|
||||
doc.save();
|
||||
// Klassischer Telefonhörer (Festnetz)
|
||||
// Hörer-Form: oben Ohrmuschel, unten Sprechmuschel, verbunden durch Bogen
|
||||
const cx = x + 4;
|
||||
|
||||
// Ohrmuschel (oben) — abgerundetes Rechteck
|
||||
doc.roundedRect(cx - 3.5, y - 0.5, 7, 3, 1.2).fill(color);
|
||||
|
||||
// Sprechmuschel (unten) — abgerundetes Rechteck
|
||||
doc.roundedRect(cx - 3.5, y + 7, 7, 3, 1.2).fill(color);
|
||||
|
||||
// Verbindungsbogen (links) zwischen Ohr- und Sprechmuschel
|
||||
doc.moveTo(cx - 2, y + 2.5)
|
||||
.bezierCurveTo(cx - 5, y + 4, cx - 5, y + 5.5, cx - 2, y + 7)
|
||||
.strokeColor(color).lineWidth(2.2).stroke();
|
||||
|
||||
doc.restore();
|
||||
}
|
||||
|
||||
private drawMobileIcon(doc: PDFKit.PDFDocument, x: number, y: number, color: string): void {
|
||||
doc.save();
|
||||
// Smartphone-Icon: abgerundetes Rechteck mit Display und Home-Button
|
||||
const w = 7;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue