fix: TTLockPage — move alerts to workstations section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -276,31 +276,6 @@ export function TTLockPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Alerts */}
|
|
||||||
{error && (
|
|
||||||
<div className="flex items-start gap-2 p-4 rounded-xl bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 text-sm">
|
|
||||||
<AlertCircle size={16} className="mt-0.5 shrink-0" />
|
|
||||||
<div className="flex-1 space-y-1">
|
|
||||||
<span>{error}</span>
|
|
||||||
{isDllEntryError(error) && (
|
|
||||||
<div className="mt-2 p-2 rounded bg-red-100 dark:bg-red-900/40 text-xs">
|
|
||||||
<strong>Имена функций в DLL не совпадают.</strong>{' '}
|
|
||||||
Откройте файл{' '}
|
|
||||||
<code className="font-mono">C:\Program Files (x86)\TTHotel\resources\libs\index.js</code>{' '}
|
|
||||||
и сообщите содержимое разработчику.
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<button onClick={() => setError(null)}><X size={14} /></button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{success && (
|
|
||||||
<div className="flex items-center gap-2 p-4 rounded-xl bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-400 text-sm">
|
|
||||||
<Check size={16} className="shrink-0" />
|
|
||||||
<span>{success}</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* ── Шаг 1: Подключение к TTHotel ── */}
|
{/* ── Шаг 1: Подключение к TTHotel ── */}
|
||||||
<Section title="Шаг 1 — Подключение к TTHotel">
|
<Section title="Шаг 1 — Подключение к TTHotel">
|
||||||
<div className="space-y-5">
|
<div className="space-y-5">
|
||||||
@@ -371,6 +346,32 @@ export function TTLockPage() {
|
|||||||
Нажмите <strong>↺</strong> рядом с полем, чтобы загрузить список портов с агента.
|
Нажмите <strong>↺</strong> рядом с полем, чтобы загрузить список портов с агента.
|
||||||
Агент должен быть онлайн.
|
Агент должен быть онлайн.
|
||||||
</Hint>
|
</Hint>
|
||||||
|
|
||||||
|
{/* Alerts */}
|
||||||
|
{error && (
|
||||||
|
<div className="flex items-start gap-2 p-4 rounded-xl bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 text-sm">
|
||||||
|
<AlertCircle size={16} className="mt-0.5 shrink-0" />
|
||||||
|
<div className="flex-1 space-y-1">
|
||||||
|
<span>{error}</span>
|
||||||
|
{isDllEntryError(error) && (
|
||||||
|
<div className="mt-2 p-2 rounded bg-red-100 dark:bg-red-900/40 text-xs">
|
||||||
|
<strong>Имена функций в DLL не совпадают.</strong>{' '}
|
||||||
|
Откройте файл{' '}
|
||||||
|
<code className="font-mono">C:\Program Files (x86)\TTHotel\resources\libs\index.js</code>{' '}
|
||||||
|
и сообщите содержимое разработчику.
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<button onClick={() => setError(null)}><X size={14} /></button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{success && (
|
||||||
|
<div className="flex items-center gap-2 p-4 rounded-xl bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-400 text-sm">
|
||||||
|
<Check size={16} className="shrink-0" />
|
||||||
|
<span>{success}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{workstations.length === 0 && (
|
{workstations.length === 0 && (
|
||||||
<p className="text-sm text-slate-500">Нет рабочих мест. Добавьте их на странице «Оборудование».</p>
|
<p className="text-sm text-slate-500">Нет рабочих мест. Добавьте их на странице «Оборудование».</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user