From 479aae2bce8335a7890794ec34330aa6160c2f02 Mon Sep 17 00:00:00 2001 From: xbpcb Date: Tue, 3 Dec 2024 17:41:48 +0200 Subject: [PATCH] Migrate to new Google Map Markers, improve GP main page clustering (#711) --- src/assets/less/common-globalping.less | 2 +- src/assets/less/pages/globalping.less | 56 +++ src/views/pages/globalping/_index.html | 457 +++++++++++++++++-------- src/views/pages/network.html | 20 +- 4 files changed, 381 insertions(+), 154 deletions(-) diff --git a/src/assets/less/common-globalping.less b/src/assets/less/common-globalping.less index eeff3e07ae..e049d75d03 100644 --- a/src/assets/less/common-globalping.less +++ b/src/assets/less/common-globalping.less @@ -533,7 +533,7 @@ display: none !important; } -.p-globalping-network .gm-style-iw-chr { +.p-globalping .gm-style-iw-chr, .p-globalping-network .gm-style-iw-chr { display: none !important; } diff --git a/src/assets/less/pages/globalping.less b/src/assets/less/pages/globalping.less index 58fc110ca5..ec9583b2ea 100644 --- a/src/assets/less/pages/globalping.less +++ b/src/assets/less/pages/globalping.less @@ -1915,6 +1915,62 @@ } } } + + &_map-cluster-iw { + display: flex; + flex-direction: column; + row-gap: 4px; + padding: 16px 1px 4px; + min-width: 128px; + + span { + font-family: Lexend, sans-serif; + font-size: 14px; + line-height: 20px; + color: #17233a; + } + + &_header { + display: flex; + align-items: center; + column-gap: 4px; + margin-bottom: 8px; + + &_location, &_cnt { + font-weight: 600; + } + + &_cnt { + display: flex; + align-items: center; + justify-content: center; + height: 20px; + padding: 0 8px; + border: 1px solid #e7e7ee; + border-radius: 12px; + background: #e8fff9; + } + } + + &_row { + display: flex; + align-items: center; + column-gap: 4px; + + &_network-cnt { + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 14px; + font-weight: 600; + line-height: 20px; + padding: 0 8px; + border: 1px solid #e7e7ee; + border-radius: 12px; + background-color: #fff; + } + } + } } .c-tags-input { diff --git a/src/views/pages/globalping/_index.html b/src/views/pages/globalping/_index.html index ab51541e74..14acac7374 100644 --- a/src/views/pages/globalping/_index.html +++ b/src/views/pages/globalping/_index.html @@ -19,7 +19,6 @@ openGraphImage="{{#if measurement}}{{@shared.serverHost}}/open-graph/image/measurement/{{measurement}}{{/if}}" > - {{#if !@shared.isServer && !@shared.googleMapsLoaded}} diff --git a/src/views/pages/network.html b/src/views/pages/network.html index 323424e9a9..ff805019e5 100644 --- a/src/views/pages/network.html +++ b/src/views/pages/network.html @@ -42,7 +42,7 @@ }); } - + {{/if}} @@ -140,7 +140,6 @@

Low latency "Near China" network