]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/LastUpdated.svelte
npm updates. All but svelte
[nominatim-ui.git] / src / components / LastUpdated.svelte
index f03e8cd69da89ca06f147bd2a0f457b85cecb74d..0d7768d3f34d76ac36d0a2d7f9840bb1c9f5582f 100644 (file)
@@ -12,7 +12,7 @@
     last_api_request_url = url;
 
     if (last_api_request_url) {
-      last_api_request_url = new URL(last_api_request_url);
+      last_api_request_url = new URL(last_api_request_url, window.location.origin);
       last_api_request_url.searchParams.delete('polygon_geojson');
       last_api_request_url = last_api_request_url.toString();
     }
@@ -48,7 +48,7 @@
 
 <div id="last-updated" class="container-fluid py-2 px-4 mb-3">
   <div id="loading" class="py-2 px-4">
-    <div class="spinner-border spinner-border-sm text-primary mr-1" role="status"></div>
+    <div class="spinner-border spinner-border-sm text-primary me-1" role="status"></div>
     Loading data from API ...
   </div>
   <div class="row">
         </div>
       {/if}
     </div>
-    <div class="col-sm-6 text-right">
+    <div class="col-sm-6 text-end">
       {#if last_updated_date}
         Data last updated:
-        <abbr id="data-date" title="{last_updated_date} (UTC timezone)">{timeago.format(new Date(last_updated_date))}</abbr>
+        <abbr id="data-date" title="{last_updated_date} (UTC timezone)">
+          {timeago.format(new Date(last_updated_date))}
+        </abbr>
       {/if}
       (<PageLink page="status">Details</PageLink>)
     </div>