mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 15:17:42 +03:00
Mobile responsive
This commit is contained in:
parent
f3810f3c69
commit
b46f872e37
@ -2,6 +2,7 @@
|
||||
|
||||
#include <GfxRenderer.h>
|
||||
#include <WiFi.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "CrossPointWebServer.h"
|
||||
@ -98,16 +99,16 @@ void WifiScreen::processWifiScanResults() {
|
||||
// Scan complete, process results
|
||||
// Use a map to deduplicate networks by SSID, keeping the strongest signal
|
||||
std::map<std::string, WifiNetworkInfo> uniqueNetworks;
|
||||
|
||||
|
||||
for (int i = 0; i < scanResult; i++) {
|
||||
std::string ssid = WiFi.SSID(i).c_str();
|
||||
int32_t rssi = WiFi.RSSI(i);
|
||||
|
||||
|
||||
// Skip hidden networks (empty SSID)
|
||||
if (ssid.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Check if we've already seen this SSID
|
||||
auto it = uniqueNetworks.find(ssid);
|
||||
if (it == uniqueNetworks.end() || rssi > it->second.rssi) {
|
||||
@ -120,7 +121,7 @@ void WifiScreen::processWifiScanResults() {
|
||||
uniqueNetworks[ssid] = network;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Convert map to vector
|
||||
networks.clear();
|
||||
for (const auto& pair : uniqueNetworks) {
|
||||
|
||||
@ -379,6 +379,88 @@
|
||||
.delete-btn-cancel:hover {
|
||||
background-color: #7f8c8d;
|
||||
}
|
||||
/* Mobile responsive styles */
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.card {
|
||||
padding: 12px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.page-header {
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.page-header-left {
|
||||
gap: 8px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
.breadcrumb-inline {
|
||||
font-size: 0.95em;
|
||||
}
|
||||
.nav-links a {
|
||||
padding: 8px 12px;
|
||||
margin-right: 6px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.action-buttons {
|
||||
gap: 6px;
|
||||
}
|
||||
.action-btn {
|
||||
padding: 8px 10px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
.file-table th,
|
||||
.file-table td {
|
||||
padding: 8px 6px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.file-table th {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
.file-icon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.epub-badge,
|
||||
.folder-badge {
|
||||
padding: 2px 5px;
|
||||
font-size: 0.65em;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.contents-header {
|
||||
margin-bottom: 8px;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
.contents-title {
|
||||
font-size: 1em;
|
||||
}
|
||||
.summary-inline {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.modal {
|
||||
padding: 15px;
|
||||
}
|
||||
.modal h3 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.actions-col {
|
||||
width: 40px;
|
||||
}
|
||||
.delete-btn {
|
||||
font-size: 1em;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
.no-files {
|
||||
padding: 20px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user