fix: EquipmentPage — input class, code modal layout (no wrapping)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 10:47:08 +03:00
parent cd5b5e4c4e
commit 4cfa98d7f0

View File

@@ -116,17 +116,15 @@ function PairCodeModal({
</div>
) : (
<>
<div className="bg-slate-50 dark:bg-slate-900 rounded-xl p-6 text-center mb-4">
<div className="bg-slate-50 dark:bg-slate-900 rounded-xl p-6 text-center mb-4 relative">
<p className="text-xs text-slate-500 mb-3 uppercase tracking-wide font-medium">Код подключения</p>
<div className="flex items-center justify-center gap-3">
<span className="text-5xl font-mono font-bold tracking-[0.3em] text-slate-900 dark:text-slate-100">
{code?.slice(0, 3)}&thinsp;{code?.slice(3)}
<span className="text-5xl font-mono font-bold tracking-[0.25em] text-slate-900 dark:text-slate-100 whitespace-nowrap">
{code}
</span>
<button onClick={copy} className="btn-ghost p-2 text-slate-400">
{copied ? <Check size={16} className="text-emerald-500" /> : <Copy size={16} />}
<button onClick={copy} className="absolute top-3 right-3 btn-ghost p-2 text-slate-400" title="Скопировать">
{copied ? <Check size={15} className="text-emerald-500" /> : <Copy size={15} />}
</button>
</div>
</div>
<div className="flex items-center justify-center gap-2 text-sm mb-6">
<Clock size={14} className={cn('text-slate-400', timeLeft < 60 && 'text-red-500')} />
@@ -193,7 +191,7 @@ function DeviceForm({
<select
value={type}
onChange={e => setType(e.target.value as 'kkt' | 'printer')}
className="w-full input-field text-sm"
className="w-full input text-sm"
>
<option value="kkt">ККТ (касса)</option>
<option value="printer">Принтер</option>
@@ -204,7 +202,7 @@ function DeviceForm({
<select
value={purpose}
onChange={e => setPurpose(e.target.value as 'fiscal' | 'kitchen' | 'bar' | 'receipt' | 'other')}
className="w-full input-field text-sm"
className="w-full input text-sm"
>
{Object.entries(PURPOSE_LABELS).map(([k, v]) => (
<option key={k} value={k}>{v}</option>
@@ -218,7 +216,7 @@ function DeviceForm({
<input
value={name}
onChange={e => setName(e.target.value)}
className="w-full input-field text-sm"
className="w-full input text-sm"
placeholder="Касса №1 / Принтер кухни"
/>
</div>
@@ -251,7 +249,7 @@ function DeviceForm({
<input
value={networkHost}
onChange={e => setNetworkHost(e.target.value)}
className="w-full input-field text-sm font-mono"
className="w-full input text-sm font-mono"
placeholder="192.168.1.50"
/>
</div>
@@ -260,7 +258,7 @@ function DeviceForm({
<input
value={networkPort}
onChange={e => setNetworkPort(e.target.value)}
className="w-full input-field text-sm font-mono"
className="w-full input text-sm font-mono"
placeholder="9100"
/>
</div>
@@ -354,7 +352,7 @@ function WorkstationCard({
value={name}
onChange={e => setName(e.target.value)}
onKeyDown={e => { if (e.key === 'Enter') saveName(); if (e.key === 'Escape') setEditing(false) }}
className="input-field py-1 text-sm w-48"
className="input py-1 text-sm w-48"
autoFocus
/>
<button onClick={saveName} className="btn-ghost p-1 text-emerald-600"><Check size={14} /></button>
@@ -572,7 +570,7 @@ export function EquipmentPage() {
value={addingName}
onChange={e => setAddingName(e.target.value)}
onKeyDown={e => { if (e.key === 'Enter') handleAdd(); if (e.key === 'Escape') setShowAdd(false) }}
className="flex-1 input-field"
className="flex-1 input"
placeholder="Ресепшн 1 / Бар / Касса SPA"
autoFocus
/>