Repository navigation
Commit c55f1c4
committed
feat(image): printer-storage UI for ~DY+^XG upload/recall
Macht das ~DY+^XG-Feature aus PR #84 für neue Bilder im Designer
bedienbar — bisher griff es nur beim Import existierender Labels mit
upload+recall.
Properties-Panel-Section am Ende der Image-Properties, mit konsistentem
'Drucker-Speicher'-Header (Info-Icon, border-t-Trennung) der in beiden
States sichtbar ist:
- Off-State: 'Aktivieren'-Button. Toggle-on setzt storedAs auf
{ device: 'R', name: 'IMG_xxxx' } mit auto-generiertem 4-char-UUID.
- On-State: Device-Dropdown (R/E/B/A mit Klartext), Name-Input
(max 8 Zeichen, auto-uppercase, [A-Z0-9_]-Filter, empty-Guard gegen
broken ZPL), Path-Preview, 'Bytes mitsenden'-Checkbox + Hint
(entkoppelt Upload von Recall: off = nur ^XG, on = ~DY+^XG),
'Inline einbetten'-Button als Toggle-off.
Parser ergänzt: ^XG ohne preceding ~DY ist jetzt valider Import
(recall-only). Erzeugt Image-Objekt mit storedAs.embedInZpl=false
und ohne gecachte Bytes; partial-Finding flagged die degradierte
Preview.
Image-Cache löschen: Trash-Button neben Bildquelle-Dropdown öffnet
einen ConfirmDialog (destructive, autoFocus auf Cancel) der erklärt
dass das Bild für ALLE referenzierenden Etiketten verschwindet.
Vorher konnte man nur das Image-Objekt löschen (Del-Taste), nicht
die Bytes selbst.
Canvas-Resize via Griffe: image-Registry hatte kein commitTransform
— Konva applied sx/sy als visual scale, aber nichts übersetzte das
in widthDots. Jetzt: cached PNG = aspect-locked via dominantem Axis-
Drag (Math.abs-Heuristik damit alle 8 Handles inward+outward
funktionieren); kein Cache (Placeholder) = free-form via heightDots
sodass der User die Box als Layout-Platzhalter shapen kann.
Empty-Source-Selection: handleImageSelect hatte early-return bei
leerem imageId. Die 'Bild auswählen…'-Placeholder-Option war
funktional tot. Jetzt clearet sie imageId + _gfaCache.
Canvas-Placeholder: 🖼-Emoji ersetzt durch Konva.Path mit dem
Heroicons 'photo'-outline. Emoji-Rendering war OS-abhängig.
Shared infrastructure die im Prozess entstanden ist:
- src/lib/storagePath.ts erweitert um STORAGE_DEVICES,
StorageDevice, MAX_STORAGE_NAME_LEN, STORAGE_NAME_FILTER_RE,
defaultStorageName — alle Storage-Path-Begriffe in einer
kanonischen Heimat.
- src/components/Properties/styles.ts: neuer buttonCls für
Secondary-Action-Buttons (Upload, Toggle, Inline einbetten),
Tailwind-Duplikation eliminiert (vorher 4× derselbe String in
image.tsx und text.tsx).
ZPL-Codes (^XG, ~DY) ausschließlich in Tooltips, nicht in
sichtbaren Labels. Neue Locale-Keys (storage, storeOnPrinter,
storeOnPrinterHint, storeInline, embedInZpl, embedInZplHint,
removeFromCache, removeFromCacheConfirm) über alle 32 Sprachen
gepflegt.1 parent 3e9a321 commit c55f1c4
41 files changed
Lines changed: 597 additions & 67 deletions
File tree
- src
- components
- Canvas
- Properties
- lib
- locales
- registry
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 124 | + | |
130 | 125 | | |
131 | 126 | | |
132 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
11 | 32 | | |
12 | 33 | | |
13 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
576 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
577 | 591 | | |
578 | | - | |
| 592 | + | |
579 | 593 | | |
580 | 594 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
591 | 598 | | |
592 | 599 | | |
593 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
| 679 | + | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
| 693 | + | |
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
698 | 702 | | |
699 | 703 | | |
700 | | - | |
701 | | - | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
702 | 709 | | |
703 | 710 | | |
704 | 711 | | |
| |||
709 | 716 | | |
710 | 717 | | |
711 | 718 | | |
712 | | - | |
| 719 | + | |
713 | 720 | | |
714 | 721 | | |
715 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1468 | 1468 | | |
1469 | 1469 | | |
1470 | 1470 | | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
1474 | 1478 | | |
1475 | 1479 | | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | 1480 | | |
1485 | 1481 | | |
1486 | | - | |
| 1482 | + | |
| 1483 | + | |
1487 | 1484 | | |
1488 | 1485 | | |
1489 | 1486 | | |
1490 | | - | |
1491 | | - | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
1492 | 1505 | | |
1493 | 1506 | | |
1494 | | - | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1495 | 1511 | | |
1496 | 1512 | | |
1497 | 1513 | | |
1498 | 1514 | | |
1499 | 1515 | | |
1500 | 1516 | | |
1501 | | - | |
1502 | | - | |
| 1517 | + | |
| 1518 | + | |
1503 | 1519 | | |
1504 | | - | |
1505 | | - | |
| 1520 | + | |
1506 | 1521 | | |
1507 | 1522 | | |
1508 | 1523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
304 | 312 | | |
305 | 313 | | |
306 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
304 | 312 | | |
305 | 313 | | |
306 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
304 | 312 | | |
305 | 313 | | |
306 | 314 | | |
| |||
0 commit comments