Web: Produktformular-Feinschliff (Barcode-Buttons, Foto-Entfernen, Typ-Abstand)
- Barcode-Zeile: Eingabefeld fuellt die Breite, die beiden Knoepfe (Nachschlagen + Vergleichen) stehen nebeneinander statt gestapelt – keine Luecke mehr rechts. - Foto: "Entfernen" ist jetzt ein normaler Button wie "Foto machen"/"Galerie" (gleiche Hoehe/Ausrichtung) statt reiner Text. - Umschalter "Typ"/"Verwaltung": Abstand zwischen Beschriftung und Segmenten. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -534,7 +534,7 @@ export default function ProductForm() {
|
|||||||
<div className="produkt-kopf">
|
<div className="produkt-kopf">
|
||||||
<div className="produkt-kopf-felder">
|
<div className="produkt-kopf-felder">
|
||||||
<div className="field-inline">
|
<div className="field-inline">
|
||||||
<label className="grow">
|
<label className="grow" style={{ flex: "1 1 auto", minWidth: 0 }}>
|
||||||
Barcode
|
Barcode
|
||||||
<input value={form.barcode} onChange={(e) => set("barcode", e.target.value)} disabled={readOnly} />
|
<input value={form.barcode} onChange={(e) => set("barcode", e.target.value)} disabled={readOnly} />
|
||||||
</label>
|
</label>
|
||||||
@@ -576,7 +576,7 @@ export default function ProductForm() {
|
|||||||
<input hidden type="file" accept="image/*" onChange={onPickPhoto} />
|
<input hidden type="file" accept="image/*" onChange={onPickPhoto} />
|
||||||
</label>
|
</label>
|
||||||
{hatBild && (
|
{hatBild && (
|
||||||
<button type="button" className="btn sm ghost" onClick={removePhoto}>Entfernen</button>
|
<button type="button" className="btn sm" onClick={removePhoto}>Entfernen</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -677,7 +677,7 @@ export default function ProductForm() {
|
|||||||
</div>
|
</div>
|
||||||
</>)}
|
</>)}
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<label className="grow">
|
<label className="grow seg-label">
|
||||||
Typ
|
Typ
|
||||||
<div className="segmented">
|
<div className="segmented">
|
||||||
<button type="button" className={modus === "food" ? "active" : ""}
|
<button type="button" className={modus === "food" ? "active" : ""}
|
||||||
@@ -744,7 +744,7 @@ export default function ProductForm() {
|
|||||||
|
|
||||||
{isObject && (<>
|
{isObject && (<>
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<label className="grow">
|
<label className="grow seg-label">
|
||||||
Verwaltung
|
Verwaltung
|
||||||
<div className="segmented">
|
<div className="segmented">
|
||||||
<button type="button" className={!form.individual ? "active" : ""}
|
<button type="button" className={!form.individual ? "active" : ""}
|
||||||
|
|||||||
@@ -212,8 +212,9 @@ input::placeholder { color: var(--muted); opacity: 0.7; }
|
|||||||
.produkt-kopf { flex-direction: column-reverse; align-items: center; }
|
.produkt-kopf { flex-direction: column-reverse; align-items: center; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Zwei gestapelte Knoepfe neben einem Eingabefeld. */
|
/* Knoepfe neben dem Barcode-Feld: nebeneinander, mit Umbruch auf schmalen
|
||||||
.knopf-spalte { display: flex; flex-direction: column; gap: var(--sp-2); flex: 0 0 auto; }
|
Fenstern. Das Eingabefeld daneben fuellt die restliche Breite. */
|
||||||
|
.knopf-spalte { display: flex; flex-flow: row wrap; gap: var(--sp-2); flex: 0 0 auto; }
|
||||||
.knopf-spalte .btn { justify-content: center; white-space: nowrap; }
|
.knopf-spalte .btn { justify-content: center; white-space: nowrap; }
|
||||||
|
|
||||||
/* Gegenueberstellung mit Open Food Facts */
|
/* Gegenueberstellung mit Open Food Facts */
|
||||||
@@ -912,8 +913,12 @@ tr.row-active { background: var(--surface-2); }
|
|||||||
.segmented button + button { border-left: 1px solid var(--border); }
|
.segmented button + button { border-left: 1px solid var(--border); }
|
||||||
.segmented button.active { background: var(--accent); color: #fff; }
|
.segmented button.active { background: var(--accent); color: #fff; }
|
||||||
.segmented button:disabled { cursor: default; opacity: 0.6; }
|
.segmented button:disabled { cursor: default; opacity: 0.6; }
|
||||||
|
/* Beschriftung (z.B. „Typ") neben einem Umschalter mit etwas Abstand statt
|
||||||
|
direkt daneben geklebt. */
|
||||||
|
.seg-label { display: flex; align-items: center; gap: var(--sp-3); }
|
||||||
|
.seg-label .segmented { margin-top: 0; }
|
||||||
|
|
||||||
/* Artikelfoto mit Aufnahme-/Galerie-Knöpfen */
|
/* Artikelfoto mit Aufnahme-/Galerie-Knöpfen */
|
||||||
.produkt-foto { display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; }
|
.produkt-foto { display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; }
|
||||||
.foto-knoepfe { display: flex; flex-wrap: wrap; gap: var(--sp-1); justify-content: center; }
|
.foto-knoepfe { display: flex; flex-wrap: wrap; gap: var(--sp-1); justify-content: center; align-items: center; }
|
||||||
.foto-knoepfe .btn { cursor: pointer; }
|
.foto-knoepfe .btn { cursor: pointer; }
|
||||||
|
|||||||
Reference in New Issue
Block a user