app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

SupportLink.svelte (917B)


      1 <script lang="ts">
      2   import { deploymentSupportPolicy } from '../config/deployment-support.ts';
      3   import { readSupportPolicy, type SupportPolicy } from '../config/support.ts';
      4   import { navigationHref } from '../navigation-url.ts';
      5   let { policy = deploymentSupportPolicy }: { policy?: SupportPolicy } =
      6     $props();
      7   const actual = $derived.by(() => {
      8     try {
      9       return readSupportPolicy(policy);
     10     } catch {
     11       return undefined;
     12     }
     13   });
     14 </script>
     15 
     16 {#if actual?.owner && actual.destination}
     17   <p>Support is operated by {actual.owner}.</p>
     18   <p>
     19     This opens an external support destination. No report is attached
     20     automatically.
     21   </p>
     22   <a
     23     href={navigationHref(actual.destination)}
     24     rel="noopener noreferrer"
     25     referrerpolicy="no-referrer">Contact support</a
     26   >
     27 {:else}
     28   <p class="notice">
     29     Support has not been configured. Reporting to an operator is unavailable.
     30   </p>
     31 {/if}