fix: EquipmentPage — input class, code modal layout (no wrapping)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,16 +116,14 @@ function PairCodeModal({
|
|||||||
</div>
|
</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>
|
<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.25em] text-slate-900 dark:text-slate-100 whitespace-nowrap">
|
||||||
<span className="text-5xl font-mono font-bold tracking-[0.3em] text-slate-900 dark:text-slate-100">
|
{code}
|
||||||
{code?.slice(0, 3)} {code?.slice(3)}
|
</span>
|
||||||
</span>
|
<button onClick={copy} className="absolute top-3 right-3 btn-ghost p-2 text-slate-400" title="Скопировать">
|
||||||
<button onClick={copy} className="btn-ghost p-2 text-slate-400">
|
{copied ? <Check size={15} className="text-emerald-500" /> : <Copy size={15} />}
|
||||||
{copied ? <Check size={16} className="text-emerald-500" /> : <Copy size={16} />}
|
</button>
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center justify-center gap-2 text-sm mb-6">
|
<div className="flex items-center justify-center gap-2 text-sm mb-6">
|
||||||
@@ -193,7 +191,7 @@ function DeviceForm({
|
|||||||
<select
|
<select
|
||||||
value={type}
|
value={type}
|
||||||
onChange={e => setType(e.target.value as 'kkt' | 'printer')}
|
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="kkt">ККТ (касса)</option>
|
||||||
<option value="printer">Принтер</option>
|
<option value="printer">Принтер</option>
|
||||||
@@ -204,7 +202,7 @@ function DeviceForm({
|
|||||||
<select
|
<select
|
||||||
value={purpose}
|
value={purpose}
|
||||||
onChange={e => setPurpose(e.target.value as 'fiscal' | 'kitchen' | 'bar' | 'receipt' | 'other')}
|
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]) => (
|
{Object.entries(PURPOSE_LABELS).map(([k, v]) => (
|
||||||
<option key={k} value={k}>{v}</option>
|
<option key={k} value={k}>{v}</option>
|
||||||
@@ -218,7 +216,7 @@ function DeviceForm({
|
|||||||
<input
|
<input
|
||||||
value={name}
|
value={name}
|
||||||
onChange={e => setName(e.target.value)}
|
onChange={e => setName(e.target.value)}
|
||||||
className="w-full input-field text-sm"
|
className="w-full input text-sm"
|
||||||
placeholder="Касса №1 / Принтер кухни"
|
placeholder="Касса №1 / Принтер кухни"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -251,7 +249,7 @@ function DeviceForm({
|
|||||||
<input
|
<input
|
||||||
value={networkHost}
|
value={networkHost}
|
||||||
onChange={e => setNetworkHost(e.target.value)}
|
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"
|
placeholder="192.168.1.50"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -260,7 +258,7 @@ function DeviceForm({
|
|||||||
<input
|
<input
|
||||||
value={networkPort}
|
value={networkPort}
|
||||||
onChange={e => setNetworkPort(e.target.value)}
|
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"
|
placeholder="9100"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -354,7 +352,7 @@ function WorkstationCard({
|
|||||||
value={name}
|
value={name}
|
||||||
onChange={e => setName(e.target.value)}
|
onChange={e => setName(e.target.value)}
|
||||||
onKeyDown={e => { if (e.key === 'Enter') saveName(); if (e.key === 'Escape') setEditing(false) }}
|
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
|
autoFocus
|
||||||
/>
|
/>
|
||||||
<button onClick={saveName} className="btn-ghost p-1 text-emerald-600"><Check size={14} /></button>
|
<button onClick={saveName} className="btn-ghost p-1 text-emerald-600"><Check size={14} /></button>
|
||||||
@@ -572,7 +570,7 @@ export function EquipmentPage() {
|
|||||||
value={addingName}
|
value={addingName}
|
||||||
onChange={e => setAddingName(e.target.value)}
|
onChange={e => setAddingName(e.target.value)}
|
||||||
onKeyDown={e => { if (e.key === 'Enter') handleAdd(); if (e.key === 'Escape') setShowAdd(false) }}
|
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"
|
placeholder="Ресепшн 1 / Бар / Касса SPA"
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user