]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 15 Apr 2021 09:19:15 +0000 (11:19 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 15 Apr 2021 09:19:15 +0000 (11:19 +0200)
CHANGES.md
package.json
src/components/DetailsOneRow.svelte
src/components/LastUpdated.svelte
src/pages/DetailsPage.svelte
yarn.lock

index 6cba4d22577d6d361185303d3599f2cb10839885..929b9e8c73235dd54c15b8f1187a45f96d4e3576 100644 (file)
@@ -1,6 +1,11 @@
 # CHANGES
 
-* version 3.0.4 - 2021-03-12
+* version 3.0.5 - 2021-04-14
+
+    * Details page: better indicate places having no name, thanks darkshredder
+    * Last updated: avoid race conditions, make less API requests
+
+* version 3.0.4 - 2021-04-12
 
     * Search page: when clicking to reverse page keep the map position
     * Search page: automatically switch to structured form when URL contains structured fields
index 88f554d68eb793d4119367a83e2a9a14afa0f26b..b4cbe45154ffac00aa9750e369a6b710a27113af 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "nominatim-ui",
   "description": "Debug web interface for Nominatim geocoder",
-  "version": "3.0.4",
+  "version": "3.0.5",
   "license": "GPL-2.0",
   "scripts": {
     "build": "rollup -c",
index 7455245a2e1ce88407ae10f2b00debbd0897048a..4c439070b1012b8e7ab30bdbe722b4bb078905f6 100644 (file)
@@ -41,9 +41,6 @@
   .notused {
     color:#ddd;
   }
-  .noname{
-    color:#800;
-  }
 
   td {
     padding: 2px 8px;
index a51b4b6a42e982b6e47235beea48305910b34e87..a5b3277e2408b86cbd797cecd30c131a3ae9355f 100644 (file)
@@ -6,11 +6,17 @@
 
   let last_updated_date;
   let last_api_request_url;
+  let fetch_running = false; // prevent multiple parallel fetch runs
 
   last_api_request_url_store.subscribe(url => {
+    if (fetch_running || last_updated_date) return;
+
+    fetch_running = true;
+
     last_api_request_url = url;
     fetch_from_api('status', { format: 'json' }, function (data) {
       last_updated_date = data.data_updated;
+      fetch_running = false;
     });
   });
 </script>
index 34a7f6365bf4aede5f75d4d1fa97f76ea535ca75..9d729441e5b3ec993e0d2baf5218c957e7f28c87 100644 (file)
@@ -4,7 +4,7 @@
 
   import {
     osmLink, wikipediaLink, coverageType, isAdminBoundary,
-    formatAddressRank, formatKeywordToken
+    formatAddressRank, formatKeywordToken, formatOSMType
   } from '../lib/helpers.js';
   import Header from '../components/Header.svelte';
   import MapIcon from '../components/MapIcon.svelte';
@@ -72,7 +72,7 @@
     <div class="row">
       <div class="col-sm-10">
         <h1>
-          {aPlace.localname}
+          {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` }
           <small><DetailsLink feature={aPlace}>link to this page</DetailsLink></small>
         </h1>
       </div>
       <div class="col-md-6">
         <table id="locationdetails" class="table table-striped table-responsive">
           <tbody>
-            <InfoRow title="Name"><InfoRowList items={aPlace.names} /></InfoRow>
+            <InfoRow title="Name">
+            {#if (Array.isArray(aPlace.names)) }
+              <span class="noname font-weight-bold">No Name</span>
+            {:else}
+              <InfoRowList items={aPlace.names} />
+            {/if}
+            </InfoRow>
             <InfoRow title="Type">{aPlace.category}:{aPlace.type}</InfoRow>
             <InfoRow title="Last Updated">{aPlace.indexed_date}</InfoRow>
             {#if (isAdminBoundary(aPlace)) }
     border-top: none !important;
     padding-left: 0 !important;
   }
+  :global(span.noname){
+    color:#800;
+  }
 
   #map-wrapper {
     width:100%;
index 21f18813ffd1119afb10daf10f164f28daecb11b..c0ce698fc06f0d503cb237a025c4c4446869a425 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -1419,9 +1419,9 @@ rollup-pluginutils@^2.8.2:
     estree-walker "^0.6.1"
 
 rollup@^2.3.4:
-  version "2.45.1"
-  resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.1.tgz#eae2b94dc2088b4e0a3b7197a5a1ee0bdd589d5c"
-  integrity sha512-vPD+JoDj3CY8k6m1bLcAFttXMe78P4CMxoau0iLVS60+S9kLsv2379xaGy4NgYWu+h2WTlucpoLPAoUoixFBag==
+  version "2.45.2"
+  resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.45.2.tgz#8fb85917c9f35605720e92328f3ccbfba6f78b48"
+  integrity sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ==
   optionalDependencies:
     fsevents "~2.3.1"
 
@@ -1609,9 +1609,9 @@ svelte@^3.0.0:
   integrity sha512-TRF30F4W4+d+Jr2KzUUL1j8Mrpns/WM/WacxYlo5MMb2E5Qy2Pk1Guj6GylxsW9OnKQl1tnF8q3hG/hQ3h6VUA==
 
 table@^6.0.4:
-  version "6.0.9"
-  resolved "https://registry.yarnpkg.com/table/-/table-6.0.9.tgz#790a12bf1e09b87b30e60419bafd6a1fd85536fb"
-  integrity sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==
+  version "6.1.0"
+  resolved "https://registry.yarnpkg.com/table/-/table-6.1.0.tgz#676a0cfb206008b59e783fcd94ef8ba7d67d966c"
+  integrity sha512-T4G5KMmqIk6X87gLKWyU5exPpTjLjY5KyrFWaIjv3SvgaIUGXV7UEzGEnZJdTA38/yUS6f9PlKezQ0bYXG3iIQ==
   dependencies:
     ajv "^8.0.1"
     is-boolean-object "^1.1.0"