]> git.openstreetmap.org Git - nominatim-ui.git/blobdiff - src/components/DetailsOneRow.svelte
replace httpbin with beeceptor for mocking HTTP error codes
[nominatim-ui.git] / src / components / DetailsOneRow.svelte
index 4c439070b1012b8e7ab30bdbe722b4bb078905f6..67c5152be865481d5b7b3119103b07bd8e24a332 100644 (file)
   export let bMarkUnusedLines = false;
 
   $: bAddressLineUsed = addressLine.isaddress;
   export let bMarkUnusedLines = false;
 
   $: bAddressLineUsed = addressLine.isaddress;
-
+  $: reverse_only = Nominatim_Config.Reverse_Only;
 </script>
 
 <tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>
 </script>
 
 <tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>
-  <td class="name font-weight-bold">
+  <td class="name fw-bold">
     {#if addressLine.localname}
       {addressLine.localname}
     {:else}
     {#if addressLine.localname}
       {addressLine.localname}
     {:else}
   <td>
     {#if addressLine.osm_id}
       <DetailsLink feature={addressLine}>details</DetailsLink>
   <td>
     {#if addressLine.osm_id}
       <DetailsLink feature={addressLine}>details</DetailsLink>
-    {:else if addressLine.type.match(/^country/)}
+    {:else if !reverse_only && addressLine.type.match(/^country/)}
       <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>
       <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>
-    {:else if addressLine.type === 'postcode'}
+    {:else if !reverse_only && addressLine.type === 'postcode'}
       <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>
     {/if}
   </td>
 </tr>
 
 <style>
       <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>
     {/if}
   </td>
 </tr>
 
 <style>
-  .notused {
-    color:#ddd;
+  .notused td {
+    color: #ccc;
   }
 
   td {
   }
 
   td {