This commit is contained in:
@@ -865,13 +865,6 @@ pub fn t(lang: Lang, key: &str) -> &'static str {
|
|||||||
"Datele de inventar nu au fost încă raportate. Agentul le colectează la pornire și le încarcă la următorul ciclu sysinfo (≤120 s).",
|
"Datele de inventar nu au fost încă raportate. Agentul le colectează la pornire și le încarcă la următorul ciclu sysinfo (≤120 s).",
|
||||||
"Aún no se han reportado datos de inventario. El agente los recopila al iniciar y los envía en el próximo ciclo sysinfo (≤120 s).",
|
"Aún no se han reportado datos de inventario. El agente los recopila al iniciar y los envía en el próximo ciclo sysinfo (≤120 s).",
|
||||||
),
|
),
|
||||||
"devices.inventory_unsupported" => (
|
|
||||||
"Inventory data is only reported by HelloAgent. This device is running {0}; the standard RustDesk client does not collect hardware or BitLocker inventory.",
|
|
||||||
"Inventardaten werden nur von HelloAgent gemeldet. Auf diesem Gerät läuft {0}; der Standard-RustDesk-Client erfasst keine Hardware- oder BitLocker-Inventardaten.",
|
|
||||||
"Les données d'inventaire ne sont rapportées que par HelloAgent. Cet appareil exécute {0} ; le client RustDesk standard ne collecte pas l'inventaire matériel ou BitLocker.",
|
|
||||||
"Datele de inventar sunt raportate doar de HelloAgent. Acest dispozitiv rulează {0}; clientul RustDesk standard nu colectează inventar hardware sau BitLocker.",
|
|
||||||
"Los datos de inventario solo los reporta HelloAgent. Este dispositivo está ejecutando {0}; el cliente RustDesk estándar no recopila inventario de hardware ni BitLocker.",
|
|
||||||
),
|
|
||||||
"devices.serial_number" => (
|
"devices.serial_number" => (
|
||||||
"Serial number",
|
"Serial number",
|
||||||
"Seriennummer",
|
"Seriennummer",
|
||||||
|
|||||||
@@ -521,32 +521,24 @@ fn render_detail(lang: Lang, d: &DashboardDeviceRow) -> String {
|
|||||||
mem_rt = html_escape(if mem_runtime.is_empty() { "—" } else { &mem_runtime }),
|
mem_rt = html_escape(if mem_runtime.is_empty() { "—" } else { &mem_runtime }),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Inventory section — only present when the agent reports it. We key
|
// Inventory section — rendered whenever the device's sysinfo payload
|
||||||
// gating off `agent_name == "HelloAgent"` because the regular RustDesk
|
// contains a populated `inventory` object, regardless of which client
|
||||||
// client doesn't ship the inventory collector and would never populate
|
// sent it. We used to gate this on `agent_name == "HelloAgent"` (the
|
||||||
// this. `agent_name` is the explicit rebrand identity stamped by
|
// explicit rebrand identity stamped by hello-agent), but that filter
|
||||||
// hello-agent's main.rs; absence means vanilla rustdesk.
|
// (a) broke silently when hello-agent's APP_NAME changed casing, and
|
||||||
let inventory_section = if agent_name == "HelloAgent" {
|
// (b) hid any inventory data shipped by a future client variant that
|
||||||
match parsed.get("inventory") {
|
// didn't carry the exact same agent_name string. Rendering on presence
|
||||||
Some(inv) if inv.is_object() => render_inventory_table(lang, inv),
|
// (`inv.is_object()`) instead of identity makes the page robust to both.
|
||||||
_ => format!(
|
// The "pending" message covers the only remaining absence case: an
|
||||||
r##"<div class="rounded-md border border-amber-700/50 bg-amber-900/20 p-3 text-sm text-amber-300">
|
// agent that doesn't (or doesn't yet) report inventory.
|
||||||
{msg}
|
let inventory_section = match parsed.get("inventory") {
|
||||||
</div>"##,
|
Some(inv) if inv.is_object() => render_inventory_table(lang, inv),
|
||||||
msg = t(lang, "devices.inventory_pending"),
|
_ => format!(
|
||||||
),
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
format!(
|
|
||||||
r##"<div class="rounded-md border border-slate-700 bg-slate-900 p-3 text-sm text-slate-400">
|
r##"<div class="rounded-md border border-slate-700 bg-slate-900 p-3 text-sm text-slate-400">
|
||||||
{msg}
|
{msg}
|
||||||
</div>"##,
|
</div>"##,
|
||||||
msg = tf1(
|
msg = t(lang, "devices.inventory_pending"),
|
||||||
lang,
|
),
|
||||||
"devices.inventory_unsupported",
|
|
||||||
&format!("<span class=\"text-slate-200\">{}</span>", html_escape(&identity_label))
|
|
||||||
),
|
|
||||||
)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
format!(
|
format!(
|
||||||
|
|||||||
Reference in New Issue
Block a user