X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/f2633dcc2939466943d2257439c12775fb712a11..c838f872bd244e6e2abf6beff46984c0aa60b58b:/src/components/DetailsOneRow.svelte

diff --git a/src/components/DetailsOneRow.svelte b/src/components/DetailsOneRow.svelte
index 9b3b27e..8b77df2 100644
--- a/src/components/DetailsOneRow.svelte
+++ b/src/components/DetailsOneRow.svelte
@@ -7,13 +7,14 @@
 
   export let addressLine;
   export let bDistanceInMeters;
+  export let bMarkUnusedLines = false;
 
   $: bAddressLineUsed = addressLine.isaddress;
-
+  $: reverse_only = Nominatim_Config.Reverse_Only;
 </script>
 
-<tr class:notused={!bAddressLineUsed}>
-  <td class="name font-weight-bold">
+<tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>
+  <td class="name fw-bold">
     {#if addressLine.localname}
       {addressLine.localname}
     {:else}
@@ -21,27 +22,32 @@
     {/if}
   </td>
   <td>{formatPlaceType(addressLine)}</td>
+  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
   <td>{@html osmLink(addressLine)}</td>
   <td>{addressLine.rank_address}</td>
   <td>{formatAdminLevel(addressLine.admin_level)}</td>
+  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
   <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>
   <td>
     {#if addressLine.osm_id}
-      <DetailsLink feature={addressLine}>details</DetailsLink>
-    {:else if addressLine.type.match(/^country/)}
-      <PageLink page='search', params_hash={{ country: addressLine.localname }}>search by name</PageLink>
-    {:else if addressLine.type === 'postcode'}
-      <PageLink page='search', params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>
+      <DetailsLink feature={addressLine}>
+        details
+      </DetailsLink>
+    {:else if !reverse_only && addressLine.type.match(/^country/)}
+      <PageLink page='search' params_hash={{ country: addressLine.localname }}>
+        search by name
+      </PageLink>
+    {:else if !reverse_only && addressLine.type === 'postcode'}
+      <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>
+        search by name
+      </PageLink>
     {/if}
   </td>
 </tr>
 
 <style>
-  .notused {
-    color:#ddd;
-  }
-  .noname{
-    color:#800;
+  .notused td {
+    color: #ccc;
   }
 
   td {
