fix: remove copyAll button, add MQTTX Web link in creds tab
- Removed 📋 Скопировать всё button and Подключение физического устройства block - Added MQTTX Web link (https://mqttx.app/web-client) with brief instructions: Host, Port 443, Protocol wss, Path /mqtt — copy username/password above - Warning: check port is 443 not 8084/1883 if connection fails - Updated help step 1: removed mention of copyAll, added port 443 note - Removed unused copyAll() function Image: v0.1.61
This commit is contained in:
@@ -810,10 +810,9 @@ function deviceLayout(d) {
|
|||||||
<div class="help-step">
|
<div class="help-step">
|
||||||
<div class="help-num">1</div>
|
<div class="help-num">1</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Credentials — параметры для прошивки</strong><br>
|
<strong>Credentials — параметры подключения</strong><br>
|
||||||
Перейдите на вкладку <em>Credentials</em>. Там четыре параметра: Broker URL, Username, Password, Топик.
|
Вкладка <em>Credentials</em> содержит: Broker URL, Username, Password, Топик.
|
||||||
Нажмите <strong>«📋 Скопировать всё»</strong> и вставьте в код устройства.
|
Каждый параметр копируется отдельной кнопкой. Broker URL всегда на порту <strong>443</strong>.
|
||||||
Больше ничего настраивать не нужно.
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -940,26 +939,16 @@ function credsTab(d) {
|
|||||||
|
|
||||||
<hr class="separator">
|
<hr class="separator">
|
||||||
|
|
||||||
<div style="font-size:13px;font-weight:600;color:#94a3b8;margin-bottom:10px;">
|
<!-- Инструкция тестирования через MQTTX Web (браузер, без установки) -->
|
||||||
Подключение физического устройства
|
<div style="font-size:13px;font-weight:600;color:#94a3b8;margin-bottom:8px;">Проверить подключение</div>
|
||||||
</div>
|
<div class="hint" style="line-height:1.8;">
|
||||||
<div class="hint">
|
<a href="https://mqttx.app/web-client" target="_blank" rel="noopener"
|
||||||
<p>1. Запишите параметры в прошивку устройства:</p>
|
style="color:#1a7fd4;font-weight:600;">MQTTX Web</a>
|
||||||
<div class="cred-value" style="margin:8px 0;padding:12px;line-height:1.8;">
|
— браузерный клиент, ничего не нужно устанавливать.<br>
|
||||||
broker ${h(S.mqttBase)}<br>
|
<strong>1.</strong> Host: <code>iot.kube5s.ru</code> | Port: <code>443</code> | Protocol: <code>wss</code> | Path: <code>/mqtt</code><br>
|
||||||
port 443<br>
|
<strong>2.</strong> Username / Password — скопируйте выше по кнопкам.<br>
|
||||||
username ${h(d.mqtt_username)}<br>
|
<strong>3.</strong> После коннекта — New Subscription на топик выше, затем Publish.<br>
|
||||||
password (кнопка «Копировать» у поля Password выше)<br>
|
⚠️ Если коннект не проходит — проверьте что порт <strong>443</strong>, а не 8084/1883.
|
||||||
topic ${h(topic)}
|
|
||||||
</div>
|
|
||||||
<p>2. Устройство должно публиковать JSON в топик.</p>
|
|
||||||
<p>3. Чтобы проверить отправку — перейдите на вкладку <strong>Эмулятор</strong>.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt16">
|
|
||||||
<button class="btn btn-ghost btn-sm" onclick="copyAll('${h(d.mqtt_username)}','${h(topic)}',this)">
|
|
||||||
📋 Скопировать всё
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
@@ -987,11 +976,6 @@ function togglePw() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyAll(user, topic, btn) {
|
|
||||||
const pass = S.deviceDetail ? S.deviceDetail.mqtt_password : '';
|
|
||||||
copyVal(`broker: ${S.mqttBase}\nusername: ${user}\npassword: ${pass}\ntopic: ${topic}`, btn);
|
|
||||||
}
|
|
||||||
|
|
||||||
// =============================================================
|
// =============================================================
|
||||||
// ВКЛАДКА — ЭМУЛЯТОР
|
// ВКЛАДКА — ЭМУЛЯТОР
|
||||||
// =============================================================
|
// =============================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user