feat(diagnostic): Geraetename beim Rollout am PC vergeben + 'Nur einrichten'
Fire TV meldet sich in der Netz-Erkennung oft nur mit der Seriennummer (0d94400fa5b63301) — genau der Name, den man auf dem Fernseher nicht tippen will. - Namensfeld im Rollout-Dialog (am PC getippt), wird beim Einrichten mitgegeben. - Vorbelegung filtert technische Namen (Hex-Seriennummern, IPs) raus. - Neuer Button 'Nur einrichten': setzt Zugang + Namen per adb.provision, OHNE die APK neu zu installieren — zum Umbenennen bereits ausgerollter Geraete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+35
-1
@@ -1624,8 +1624,19 @@
|
||||
Spart das Abtippen auf dem Fernseher: Host und Token gehen direkt vom
|
||||
Server an den Agenten — QR-Scan geht am Fire TV ja nicht.
|
||||
</div>
|
||||
<div style="margin-top:10px;margin-left:26px;">
|
||||
<label style="display:block;margin-bottom:4px;color:#8888AA;">Name des Geräts</label>
|
||||
<input id="apk-name" type="text" style="width:100%;padding:6px;background:#0D0D1A;border:1px solid #1E1E2E;border-radius:4px;color:#E0E0F0;"
|
||||
placeholder="z.B. Wohnzimmer Fire TV">
|
||||
<div style="color:#666;font-size:11px;margin-top:4px;">
|
||||
So spricht ARIA das Gerät an („mach einen Screenshot vom Wohnzimmer Fire TV").
|
||||
Hier am PC eingeben — auf dem Fernseher wäre das Tippen mühsam.
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:14px;">
|
||||
<button class="btn" onclick="runApkDeploy()">📦 Jetzt ausrollen</button>
|
||||
<button class="btn secondary" onclick="runApkProvision()" style="margin-left:6px;"
|
||||
title="Nur Zugang/Namen setzen — App bleibt wie sie ist">Nur einrichten</button>
|
||||
<button class="btn secondary" onclick="runApkStatus()" style="margin-left:6px;">Status prüfen</button>
|
||||
<span id="apk-status" style="margin-left:10px;color:#8888AA;"></span>
|
||||
</div>
|
||||
@@ -4731,6 +4742,11 @@
|
||||
document.getElementById('apk-status').textContent = '';
|
||||
const log = document.getElementById('apk-log');
|
||||
log.style.display = 'none'; log.textContent = '';
|
||||
// Namensfeld vorbelegen — aber nicht mit Seriennummern/IP-Platzhaltern,
|
||||
// die die Netz-Erkennung bei Fire TV oft liefert (z.B. 0d94400fa5b63301).
|
||||
const looksTechnical = !name || /^[0-9a-f]{8,}$/i.test(name) ||
|
||||
/^\d{1,3}(\.\d{1,3}){3}$/.test(name);
|
||||
document.getElementById('apk-name').value = looksTechnical ? '' : name;
|
||||
document.getElementById('apk-modal').classList.add('open');
|
||||
}
|
||||
function closeApkDeploy() {
|
||||
@@ -4755,12 +4771,30 @@
|
||||
// Server ergaenzt Host/Port/Token — steht bewusst NICHT im Browser-Formular.
|
||||
if (document.getElementById('apk-provision').checked) {
|
||||
params.provision = true;
|
||||
params.name = apkTarget.name;
|
||||
// Am PC getippter Name gewinnt; sonst der aus der Netz-Erkennung (der
|
||||
// ist bei Fire TV oft nur die Seriennummer).
|
||||
params.name = document.getElementById('apk-name').value.trim() || apkTarget.name;
|
||||
}
|
||||
send({ action: 'sat_command', satellite: apkTarget.satId, cmd: 'adb.install',
|
||||
requestId: apkRequestId, params });
|
||||
}
|
||||
|
||||
/** Nur einrichten: RVS-Zugang + Namen setzen, ohne die APK neu zu installieren
|
||||
* (z.B. um ein bereits ausgerolltes Gerät umzubenennen). */
|
||||
function runApkProvision() {
|
||||
if (!apkTarget) return;
|
||||
apkRequestId = 'apk_' + Date.now() + '_' + Math.floor(Math.random() * 100000);
|
||||
document.getElementById('apk-status').innerHTML = '<span style="color:#FFD60A;">richte ein …</span>';
|
||||
const log = document.getElementById('apk-log');
|
||||
log.style.display = 'block';
|
||||
log.textContent = 'Übertrage Zugang und Namen an den Agenten …\n' +
|
||||
'Die App startet dabei kurz auf dem Bildschirm — das ist normal.';
|
||||
send({ action: 'sat_command', satellite: apkTarget.satId, cmd: 'adb.provision',
|
||||
requestId: apkRequestId,
|
||||
params: { ip: apkTarget.ip, provision: true,
|
||||
name: document.getElementById('apk-name').value.trim() || apkTarget.name } });
|
||||
}
|
||||
|
||||
/** Prüft, ob der Agent auf dem Gerät installiert ist und läuft. */
|
||||
function runApkStatus() {
|
||||
if (!apkTarget) return;
|
||||
|
||||
Reference in New Issue
Block a user