aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-01 14:45:04 -0700
committerAdam Soltys <[email protected]>2024-11-01 14:45:06 -0700
commitba185fae48a70d49521b6e0cb4371b126f295022 (patch)
treea188f7dddc8dd64f06d7ed3ef50023955720c9d8 /src
parentd7fd16243c7c6f6260cc2958abc0cb60f50deef9 (diff)
downloadcoinos-ui-ba185fae48a70d49521b6e0cb4371b126f295022.tar.gz
coinos-ui-ba185fae48a70d49521b6e0cb4371b126f295022.zip
focus start button
Diffstat (limited to 'src')
-rw-r--r--src/components/LandingHero.svelte2
-rw-r--r--src/routes/(app)/invoice/[id]/tip/+page.svelte21
-rw-r--r--src/routes/(app)/send/lightning/[payreq]/+page.server.ts8
3 files changed, 23 insertions, 8 deletions
diff --git a/src/components/LandingHero.svelte b/src/components/LandingHero.svelte
index 43223499..154944fa 100644
--- a/src/components/LandingHero.svelte
+++ b/src/components/LandingHero.svelte
@@ -1,4 +1,5 @@
<script>
+ import { focus } from "$lib/utils";
import { goto } from "$app/navigation";
import Icon from "$comp/Icon.svelte";
import Image from "$comp/Image.svelte";
@@ -29,6 +30,7 @@
<div class="flex justify-center">
<a href="/register">
<button
+ use:focus
class="bg-black text-white border rounded-full px-6 py-2 font-bold hover:opacity-80"
>
{$t("nav.startInSeconds")}
diff --git a/src/routes/(app)/invoice/[id]/tip/+page.svelte b/src/routes/(app)/invoice/[id]/tip/+page.svelte
index da2d041e..217b8474 100644
--- a/src/routes/(app)/invoice/[id]/tip/+page.svelte
+++ b/src/routes/(app)/invoice/[id]/tip/+page.svelte
@@ -153,12 +153,21 @@
<button type="button" on:click={() => (tipPercent = 0)}>Reset</button>
</div>
{:else}
- {#each tipAmounts as amount}
- <button
- type="button"
- class:active={active(amount, tipPercent)}
- on:click={() => handleTipButtonClick(amount)}>{amount}</button
- >
+ {#each tipAmounts as amount, i}
+ {#if i === 0}
+ <button
+ use:focus
+ type="button"
+ class:active={active(amount, tipPercent)}
+ on:click={() => handleTipButtonClick(amount)}>{amount}</button
+ >
+ {:else}
+ <button
+ type="button"
+ class:active={active(amount, tipPercent)}
+ on:click={() => handleTipButtonClick(amount)}>{amount}</button
+ >
+ {/if}
{/each}
{/if}
diff --git a/src/routes/(app)/send/lightning/[payreq]/+page.server.ts b/src/routes/(app)/send/lightning/[payreq]/+page.server.ts
index 0df87255..a101b803 100644
--- a/src/routes/(app)/send/lightning/[payreq]/+page.server.ts
+++ b/src/routes/(app)/send/lightning/[payreq]/+page.server.ts
@@ -1,5 +1,5 @@
+import { auth, fd, post } from "$lib/utils";
import { fail, redirect } from "@sveltejs/kit";
-import { fd, auth, post } from "$lib/utils";
export async function load({ cookies, params }) {
return post("/parse", params, auth(cookies));
@@ -15,7 +15,11 @@ export const actions = {
p = await post("/payments", body, auth(cookies));
} catch (e: any) {
- if (e.message.includes("unusable") || e.message.includes("routes"))
+ if (
+ e.message.includes("unusable") ||
+ e.message.includes("routes") ||
+ e.message.includes("minflow")
+ )
e.message = "payments.failedToRoute";
return fail(400, { message: e.message });
}