mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-17 11:25:48 +02:00
fix: remove incorrect ethernet badge on printer cards
home_flag bit 18 was incorrectly interpreted as "wired/ethernet connection", causing the ethernet badge to always show — even on printers without an ethernet port (e.g. A1, P1S). This hid the WiFi signal indicator entirely. Removed the wired_network field and ethernet badge UI. The WiFi signal badge now shows correctly whenever the printer reports signal strength.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { X, Copy, Check, Signal, Cable } from 'lucide-react';
|
||||
import { X, Copy, Check, Signal } from 'lucide-react';
|
||||
import { Card, CardContent } from './Card';
|
||||
import { formatDateOnly } from '../utils/date';
|
||||
import { getPrinterImage, getWifiStrength } from '../utils/printer';
|
||||
@@ -109,18 +109,8 @@ export function PrinterInfoModal({ printer, status, totalPrintHours, onClose }:
|
||||
),
|
||||
});
|
||||
|
||||
// Network connection
|
||||
if (status?.wired_network) {
|
||||
rows.push({
|
||||
label: t('printers.networkLabel', 'Network'),
|
||||
value: (
|
||||
<span className="flex items-center gap-2">
|
||||
<Cable className="w-4 h-4 text-bambu-green" />
|
||||
<span className="text-bambu-green">{t('printers.connection.ethernet', 'Ethernet')}</span>
|
||||
</span>
|
||||
),
|
||||
});
|
||||
} else if (status?.wifi_signal != null) {
|
||||
// WiFi signal
|
||||
if (status?.wifi_signal != null) {
|
||||
const wifi = getWifiStrength(status.wifi_signal);
|
||||
rows.push({
|
||||
label: t('printers.wifiSignalLabel'),
|
||||
|
||||
Reference in New Issue
Block a user