mirror of
https://github.com/librespeed/speedtest.git
synced 2026-10-22 08:10:55 +00:00
feat: add a modern design for the result image
The shared result image had one look, and it no longer matched the modern frontend. The renderer can now draw either design. The image follows the same useNewDesign setting as the frontend, so a deployment has one switch rather than two that can disagree, and classic remains the fallback. - An explicit style query parameter overrides it, which is how the modern frontend asks for the design it matches. - The modern design reuses the frontend palette and shows the client, address family and timestamp already present in the result data.
This commit is contained in:
parent
ca1e033d8d
commit
3d1118bc50
4 changed files with 558 additions and 11 deletions
|
|
@ -419,7 +419,10 @@ function startRenderingLoop() {
|
|||
window.location.href.lastIndexOf("/")
|
||||
) +
|
||||
"/results/?id=" +
|
||||
testState.testData.testId;
|
||||
testState.testData.testId +
|
||||
// Ask for the design this frontend matches; the classic frontend
|
||||
// links the same URL and gets the classic image without asking.
|
||||
"&style=modern";
|
||||
}
|
||||
|
||||
testState.testDataDirty = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue