Skip to content

Commit c0bd84b

Browse files
KrapfalATclaude
andcommitted
refactor: move barcode field into image panel (between buttons and rating)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b6c2b1f commit c0bd84b

1 file changed

Lines changed: 27 additions & 23 deletions

File tree

frontend/src/lib/components/AddWineModal.svelte

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,26 @@
232232
</button>
233233
</div>
234234
235-
<!-- Bewertung unter den Buttons -->
235+
<!-- Barcode -->
236+
<div class="panel-barcode">
237+
<div class="search-row">
238+
<input
239+
type="text"
240+
id="barcode-input"
241+
class="search-input"
242+
placeholder={$t('modal_search_placeholder')}
243+
bind:value={form.barcode}
244+
/>
245+
<button class="btn-scan" type="button" title="Barcode scannen" on:click={() => showScanner = true}>
246+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
247+
<path d="M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z"/>
248+
<circle cx="12" cy="13" r="4"/>
249+
</svg>
250+
</button>
251+
</div>
252+
</div>
253+
254+
<!-- Bewertung -->
236255
<div class="panel-rating">
237256
<label class="panel-rating-label" id="panel-rating-label">{$t('modal_field_rating')}</label>
238257
<div class="star-rating" role="group" aria-labelledby="panel-rating-label">
@@ -413,28 +432,6 @@
413432
</div>
414433
{/if}
415434
416-
<!-- Barcode at the bottom -->
417-
<div class="field-divider"></div>
418-
419-
<div class="field span-2">
420-
<label class="field-label" for="barcode-input">{$t('modal_auto_search')}</label>
421-
<div class="search-row">
422-
<input
423-
type="text"
424-
id="barcode-input"
425-
class="search-input"
426-
placeholder={$t('modal_search_placeholder')}
427-
bind:value={form.barcode}
428-
/>
429-
<button class="btn-scan" type="button" title="Barcode scannen" on:click={() => showScanner = true}>
430-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
431-
<path d="M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z"/>
432-
<circle cx="12" cy="13" r="4"/>
433-
</svg>
434-
</button>
435-
</div>
436-
</div>
437-
438435
</div>
439436
</form>
440437
</div>
@@ -636,6 +633,13 @@
636633
.btn-camera:hover:not(:disabled) { background: var(--surface); color: var(--primary); }
637634
.btn-camera:disabled { opacity: 0.5; cursor: not-allowed; }
638635
636+
.panel-barcode .search-row { gap: 5px; }
637+
.panel-barcode .search-input {
638+
font-size: 11px;
639+
padding: 6px 8px;
640+
}
641+
.panel-barcode .btn-scan { width: 32px; }
642+
639643
.panel-rating {
640644
display: flex;
641645
flex-direction: column;

0 commit comments

Comments
 (0)