Network Overhaul#139
Conversation
- Implemented completely new, custom-developed core network features like speed test integration, signal strength, latency, custom dns-switching -etc. - Overhauled the user interface and visual design for a modernised look. - Optimised the code for smoothness and efficiency while sustaining all new and improved features
Added new properties for networking configuration.
|
Hmmm, am not really sure about how to link this to the existing event in the Kanban EDIT: Okay, I think i figured it out! |
Replaced latency, downloadSpeed, and uploadSpeed properties with a JSON-serialised map for speed test results.
|
@LeVraiArdox all done :P Each network shows their unique stats, as intended.
Extremely long DNS addresses no longer overflow from the tab when the window's dimensions are decreased
|
LeVraiArdox
left a comment
There was a problem hiding this comment.
Some stuff to change in the code. Also, I would prefer you to make backend logic in C++ (see network.cpp and network.hpp) than using the frontend file to add backend logic. Or, if you don't want to dirt your hands, make a Network.qml file in services/ that does these stuff.
| // Keeping it per-SSID (rather than the old single latency/downloadSpeed/ | ||
| // uploadSpeed strings) means each network's last speed test result | ||
| // survives switching networks, reconnecting, and shell restarts. | ||
| property string speedTestResultsJson: "{}" |
There was a problem hiding this comment.
I don't think results should be in a json config. We can keep them in RAM and not display them when we don't have value. After all, the results can change anytime.
| readonly property var activeNetwork: { | ||
| let _t = root.refreshTrigger; | ||
| const nets = Network.networks || []; | ||
| for (let i = 0; i < nets.length; i++) { | ||
| if (nets[i].active) return nets[i]; | ||
| } | ||
| return null; | ||
| } |
There was a problem hiding this comment.
There is a Network.active variable in the Sleex network service that returns the AccessPoint object of the active network. See network.cpp and network.hpp
| function cacheSpeedTestResult(ssid) { | ||
| if (!ssid) return; | ||
| const next = Object.assign({}, root.speedTestResults); | ||
| next[ssid] = { | ||
| pingMs: root.speedTestPingMs, | ||
| downloadMbps: root.speedTestDownloadMbps, | ||
| uploadMbps: root.speedTestUploadMbps | ||
| }; | ||
| root.speedTestResults = next; // reassign (not mutate) so bindings notice | ||
| try { | ||
| Config.options.networking.speedTestResultsJson = JSON.stringify(next); | ||
| } catch (e) { | ||
| // Non-fatal - worst case the result just won't survive a restart. | ||
| } | ||
| } |
There was a problem hiding this comment.
As previously said, we shouldn't save results, especially not in the config section
| function loadSavedSpeedTestResults() { | ||
| const raw = Config.options.networking.speedTestResultsJson; | ||
| if (!raw) return {}; | ||
| try { | ||
| const parsed = JSON.parse(raw); | ||
| return (parsed && typeof parsed === "object") ? parsed : {}; | ||
| } catch (e) { | ||
| return {}; | ||
| } | ||
| } |
There was a problem hiding this comment.
If we don't save, dump this
| Layout.alignment: Qt.AlignHCenter | ||
| text: parent.parent.hasResult | ||
| ? parent.parent.pingValue.toFixed(0) + " ms" | ||
| : (parent.parent.isLive && root.speedTestStage === "ping" ? "…" : "—") |
There was a problem hiding this comment.
Just don't show if there is no result instead of showing —
Aye aye, captain! |




Network Overhaul
What's New
Sensitive Info & Connection Details
Sensitive Infois switched off, all sensitive information likeIP addresses,BSSIDS- etc are hidden for privacy.Connection Details
If enabled, displays automatically when connected via Ethernet or Wi-Fi.
The section has several useful details about the current connection, such as:
Frequency is no longer shown with the combined channel like,
2462. It is now shown more aesthetically, example, "2,4GHz, Channel 11"Speed test directly integrated, so the user can perform a network test directly from the sleex settings if they wish. Uses the cloudflare provider.
On Wifi
On Ethernet
Custom DNS
Improved the look of Available Networks
Improved the look of the search feature
Integration of QR Codes
Full Showcase