diff options
| author | Adam Soltys <[email protected]> | 2026-11-25 09:50:53 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-11-25 09:50:53 -0700 |
| commit | 3a321d4e70d1244224c4643ddac8e96216bfe5f4 (patch) | |
| tree | a4996d39e4aa1acbfae66bc9aefc0a931c2e8a71 /src/routes/(app)/settings/shopify/+page.svelte | |
| parent | 032f5038e17afb80cd704b8363b8c3c8688e16b6 (diff) | |
| download | coinos-ui-3a321d4e70d1244224c4643ddac8e96216bfe5f4.tar.gz coinos-ui-3a321d4e70d1244224c4643ddac8e96216bfe5f4.zip | |
Fund page: show history read-only with a "discontinued" notice
Funds are closed, but a fund link fell through to the generic error page.
Send the viewer's token so managers can still open a fund's history, drop
the manage and share controls, and explain that funds are discontinued
instead of showing an error.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMan6W9CsdxmhFrfaKNVHU
Diffstat (limited to 'src/routes/(app)/settings/shopify/+page.svelte')
| -rw-r--r-- | src/routes/(app)/settings/shopify/+page.svelte | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/src/routes/(app)/settings/shopify/+page.svelte b/src/routes/(app)/settings/shopify/+page.svelte deleted file mode 100644 index 04f82009..00000000 --- a/src/routes/(app)/settings/shopify/+page.svelte +++ /dev/null @@ -1,99 +0,0 @@ -<script> - import { t } from "$lib/translations"; - import Icon from "$comp/Icon.svelte"; - import { page } from "$app/stores"; - - let { data } = $props(); - let { user } = $derived(data); - - let paymentsUrl = $derived( - user.shopifyStore && - "https://admin.shopify.com/store/" + - user.shopifyStore + - "/settings/payments", - ); - let checkoutUrl = $derived( - user.shopifyStore && - "https://admin.shopify.com/store/" + - user.shopifyStore + - "/settings/checkout", - ); - let appsUrl = $derived( - user.shopifyStore && - "https://admin.shopify.com/store/" + - user.shopifyStore + - "/settings/apps/development", - ); - - let script = `<script src="${$page.url.protocol}//${$page.url.host}/${user.username}/shopify.js"><\/script>`; -</script> - -<div> - <label for="shopifyStore" class="font-bold mb-1 block">Store ID</label> - <div class="flex mb-2"> - <div - class="input input-bordered input-lg !border-r-0 rounded-2xl !rounded-r-none flex items-center text-right !pr-1 bg-base-200 border-primary" - > - admin.shopify.com/store/ - </div> - <input - type="text" - name="shopifyStore" - bind:value={user.shopifyStore} - class="!border-l-0 !rounded-l-none w-auto min-w-0 !pl-1 grow" - /> - </div> - <p class="text-secondary my-2"> - Add Bitcoin under <a - class:active={!!paymentsUrl} - href={paymentsUrl || undefined}>Payments > Manual payment methods</a - > with a description like "Pay with Bitcoin". - </p> -</div> - -<div> - <label for="display" class="font-bold mb-1 block">Additional scripts</label> - <p class="text-secondary my-2"> - Copy this into <a class:active={!!paymentsUrl} href={checkoutUrl} - >Checkout -> Additional scripts</a - > - </p> - <textarea rows={5} type="text" name="shopifyScripts" readonly - >{script}</textarea - > -</div> - -<div> - <label for="shopifyToken" class="font-bold mb-1 block" - >Admin API token <span class="font-normal">(Optional)</span></label - > - <p class="text-secondary my-2"> - Coinos can automatically mark orders as Paid if you provide an API token. - <input - class="my-4" - type="text" - name="shopifyToken" - bind:value={user.shopifyToken} - /> - </p> - <p class="text-secondary my-2"> - Create a new app in <a class:active={!!appsUrl} href={appsUrl || undefined} - >Apps > App Development</a - > - </p> - - <p class="text-secondary my-2"> - Edit the Admin API scopes to enable <code class="text-black" - >write_orders</code - > permission then install the app into your store and copy the Admin API access - token here. - </p> -</div> - -<style> - @reference "../../../../app.css"; - - .active { - @apply text-blue-500; - } -</style> |
