Enhance mobile UI and network scanning experience

- Fix modal scroll issues on mobile devices with proper viewport constraints
- Remove status column and apply status colors directly to device names
- Reorder columns: IP before MAC for better logical flow
- Optimize table layout for mobile with reduced padding and text ellipsis
- Implement visual disabled state for existing devices in scan modal
- Add intelligent device comparison to prevent duplicate additions
- Exclude Docker bridge networks from Linux scanning fallback
- Improve scan result handling with better error messaging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-07 15:32:32 +03:00
parent 3c14094650
commit 43e997ba47
4 changed files with 151 additions and 38 deletions

View File

@@ -360,6 +360,9 @@ class WOLManager:
parts = line.split()
if len(parts) >= 2:
gateway = parts[1]
# Skip Docker bridge networks
if gateway.startswith('172.17.') or gateway.startswith('172.18.') or gateway.startswith('172.19.') or gateway.startswith('172.20.'):
continue
# Construiește rețeaua bazată pe gateway
network_parts = gateway.split('.')
network = f"{network_parts[0]}.{network_parts[1]}.{network_parts[2]}.0/24"
@@ -377,6 +380,10 @@ class WOLManager:
mac = match.group(2)
hostname = line.split()[0] if line.split() else '?'
# Skip Docker bridge networks
if ip.startswith('172.17.') or ip.startswith('172.18.') or ip.startswith('172.19.') or ip.startswith('172.20.'):
continue
# Verifică dacă IP-ul este în rețeaua specificată
if custom_network:
import ipaddress
@@ -392,7 +399,7 @@ class WOLManager:
except:
pass
else:
# Autodetectare - adaugă toate intrările ARP
# Autodetectare - adaugă toate intrările ARP (fără Docker bridge)
scanned.append({
'ip': ip,
'mac': mac,
@@ -408,6 +415,14 @@ class WOLManager:
'message': f'Nu s-au găsit dispozitive cu MAC addresses în rețeaua {custom_network}. În Docker Desktop Windows, scanarea automată este limitată. Rulează scanul Windows sau folosește butonul " Adaugă Calculator" pentru a adăuga manual dispozitivele cu IP și MAC cunoscute.'
}
# Dacă nu s-au găsit dispozitive în autodetectare, probabil rulează în Docker
if not custom_network and not scanned:
return {
'success': True,
'computers': [],
'message': 'Nu s-au găsit dispozitive în rețeaua locală. Aplicația rulează în Docker cu acces limitat la rețea. Pentru rezultate complete, rulează scanul Windows din sistemul host sau specifică manual o rețea CIDR.'
}
return {'success': True, 'computers': scanned}
wol_manager = WOLManager()