aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/jade/runtime.min.js
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2020-09-02 15:38:27 +0000
committerGitHub <[email protected]>2020-09-02 15:38:27 +0000
commitd7d3fce5da5d38f5d31cb59ab841bebaa1ab2bfd (patch)
tree74d908d32ff421c3e1a9df652c87eba1b3966d53 /node_modules/jade/runtime.min.js
parentf17fb75a9fa222a63df84a5a7a9ff911bb5f9765 (diff)
downloadcoinos-server-d7d3fce5da5d38f5d31cb59ab841bebaa1ab2bfd.tar.gz
coinos-server-d7d3fce5da5d38f5d31cb59ab841bebaa1ab2bfd.zip
Bump bl from 4.0.2 to 4.0.3
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3) Signed-off-by: dependabot[bot] <[email protected]>
Diffstat (limited to 'node_modules/jade/runtime.min.js')
0 files changed, 0 insertions, 0 deletions
>103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
<script>
  import { types } from "$lib/utils";
  import { page } from "$app/stores";
  import { amountPrompt } from "$lib/store";
  let {
    newAmount = $bindable(),
    invoice,
    user,
    t,
    toggleType,
    setAmount,
    setType,
    activeOnly,
  } = $props();

  let { aid, address_type, type } = $derived(invoice);
</script>

<div class="text-xl">Bitcoin</div>
<div class="flex flex-wrap gap-2">
  <button
    class="btn flex-nowrap !w-auto grow"
    class:bg-base-300={type === types.bitcoin && address_type === "bech32"}
    class:text-secondary={type === types.bitcoin && address_type === "bech32"}
    class:hidden={activeOnly &&
      (type !== types.bitcoin || address_type !== "bech32")}
    onclick={() => (activeOnly ? toggleType() : setType(types.bitcoin))}
  >
    <img src="/images/bitcoin.svg" class="w-8" alt="Bitcoin" />
    <div class="my-auto text-lg">Segwit</div>
  </button>

  <button
    class="btn flex-nowrap !w-auto grow"
    class:bg-base-300={type === types.bitcoin && address_type === "bech32m"}
    class:text-secondary={type === types.bitcoin && address_type === "bech32m"}
    class:hidden={activeOnly &&
      (type !== types.bitcoin || address_type !== "bech32m")}
    onclick={() =>
      activeOnly ? toggleType() : setType(types.bitcoin, "bech32m")}
  >
    <img src="/images/bitcoin.svg" class="w-8" alt="Bitcoin" />
    <div class="my-auto text-lg">Taproot</div>
  </button>

  <button
    class="btn flex-nowrap !w-auto grow"
    class:bg-base-300={type === types.bitcoin && address_type === "legacy"}
    class:text-secondary={type === types.bitcoin && address_type === "legacy"}
    class:hidden={activeOnly &&
      (type !== types.bitcoin || address_type !== "legacy")}
    onclick={() =>
      activeOnly ? toggleType() : setType(types.bitcoin, "legacy")}
  >
    <img src="/images/bitcoin.svg" class="w-8" alt="Bitcoin" />
    <div class="my-auto text-lg">Legacy</div>
  </button>
</div>

{#if invoice.uid === aid}
  <div class="text-xl">Lightning</div>
  <div class="flex flex-wrap gap-2">
    <button
      class="btn flex-nowrap !w-auto grow"
      class:bg-base-300={type === types.lightning &&
        $page.url.pathname.includes("/receive")}
      class:text-secondary={type === types.lightning &&
        $page.url.pathname.includes("/receive")}
      class:hidden={activeOnly &&
        (type !== types.lightning || !$page.url.pathname.includes("/receive"))}
      onclick={() => {
        if (activeOnly) toggleType();
        else {
          $amountPrompt = false;
          newAmount = undefined;
          setType(types.lightning);
        }
      }}
    >
      <div
        class="bg-black rounded-full w-8 h-8 items-center justify-center flex"
      >
        <div class="m-auto">
          <iconify-icon
            noobserver
            icon="ph:lightning-fill"
            class="text-yellow-300 text-2xl"
          ></iconify-icon>
        </div>
      </div>
      <div class="my-auto text-lg">LNURL</div>
    </button>
    <button
      class="btn flex-nowrap !w-auto grow"
      class:bg-base-300={type === types.bolt12}
      class:text-secondary={type === types.bolt12}
      class:hidden={activeOnly && type !== types.bolt12}
      onclick={() => (activeOnly ? toggleType() : setType(types.bolt12))}
    >
      <div
        class="bg-black rounded-full w-8 h-8 items-center justify-center flex"
      >
        <div class="m-auto">
          <iconify-icon
            noobserver
            icon="ph:lightning-fill"
            class="text-yellow-300 text-2xl"
          ></iconify-icon>
        </div>
      </div>
      <div class="my-auto text-lg">Bolt 12</div>
    </button>

    <button
      class="btn flex-nowrap !w-auto grow"
      class:bg-base-300={type === types.lightning &&
        !$page.url.pathname.includes("/receive")}
      class:text-secondary={type === types.lightning &&
        !$page.url.pathname.includes("/receive")}
      class:hidden={activeOnly &&
        (type !== types.lightning || $page.url.pathname.includes("/receive"))}
      onclick={() => {
        if (activeOnly) toggleType();
        else {
          $amountPrompt = false;
          newAmount = 0;
          setType(types.lightning);
        }
      }}
    >
      <div
        class="bg-black rounded-full w-8 h-8 items-center justify-center flex"
      >
        <div class="m-auto">
          <iconify-icon
            noobserver
            icon="ph:lightning-fill"
            class="text-yellow-300 text-2xl"
          ></iconify-icon>
        </div>
      </div>
      <div class="my-auto text-lg">Bolt 11</div>
    </button>
  </div>

  <div class="text-xl">{t("payments.other")}</div>
  <div class="flex flex-wrap gap-2">
    <button
      class="btn flex-nowrap !w-auto grow"
      class:bg-base-300={type === types.ecash}
      class:text-secondary={type === types.ecash}
      class:hidden={activeOnly && type !== types.ecash}
      onclick={() => (activeOnly ? toggleType() : setType(types.ecash))}
    >
      <img src="/images/cash.png" class="w-8 my-auto" />
      <div class="my-auto text-lg">Ecash</div>
    </button>

    <button
      class="btn flex-nowrap !w-auto grow"
      class:bg-base-300={type === types.liquid}
      class:text-secondary={type === types.liquid}
      class:hidden={activeOnly && type !== types.liquid}
      onclick={() => (activeOnly ? toggleType() : setType(types.liquid))}
    >
      <img src="/images/liquid.svg" class="w-8" alt="Liquid" />
      <div class="my-auto text-lg">Liquid</div>
    </button>
  </div>

  <div></div>
  <button type="button" class="btn" onclick={toggleType}>
    <iconify-icon noobserver icon="ph:x-bold" width="32"></iconify-icon>
    <div class="my-auto">
      {t("payments.cancel")}
    </div>
  </button>
{/if}