From 1701ca75393cc3f576515888571e4edc08a70a6d Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Wed, 11 Jan 2023 12:30:43 +0100 Subject: [PATCH 1/4] improve ln url tip modal --- src/element/LNURLTip.css | 29 +++++++++++++++++++---------- src/element/LNURLTip.js | 25 ++++++++++++++++--------- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/element/LNURLTip.css b/src/element/LNURLTip.css index 3fea13cb..e478f969 100644 --- a/src/element/LNURLTip.css +++ b/src/element/LNURLTip.css @@ -1,5 +1,5 @@ .lnurl-tip { - background-color: var(--gray-secondary); + background-color: var(--gray-tertiary); padding: 10px; border-radius: 10px; width: 500px; @@ -9,6 +9,8 @@ .lnurl-tip .btn { background-color: inherit; + width: 210px; + margin: 0 0 10px 0; } .lnurl-tip .btn:hover { @@ -17,15 +19,28 @@ .lnurl-tip .invoice { display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } .lnurl-tip .invoice .actions { + display: flex; + flex-direction: column; align-items: flex-start; - text-align: start; + text-align: center; } -.lnurl-tip .invoice .actions > div { - margin: 10px; +.lnurl-tip .invoice .actions .copy-action { + margin: 10px auto; +} + +.lnurl-tip .invoice .actions .pay-actions { + margin: 10px auto; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } @media(max-width: 720px) { @@ -33,10 +48,4 @@ width: 100vw; margin: 0 10px; } - .lnurl-tip .invoice { - flex-direction: column; - } - .lnurl-tip .invoice .actions { - text-align: center; - } } diff --git a/src/element/LNURLTip.js b/src/element/LNURLTip.js index 3d856b14..5ad391e0 100644 --- a/src/element/LNURLTip.js +++ b/src/element/LNURLTip.js @@ -3,6 +3,7 @@ import { useEffect, useMemo, useState } from "react"; import { bech32ToText } from "../Util"; import Modal from "./Modal"; import QrCode from "./QrCode"; +import Copy from "./Copy"; export default function LNURLTip(props) { const onClose = props.onClose || (() => { }); @@ -132,7 +133,7 @@ export default function LNURLTip(props) { function webLn() { if ("webln" in window) { return ( -
payWebLN()}>Pay with WebLN
+
payWebLN()}>Pay with WebLN
) } return null; @@ -168,15 +169,21 @@ export default function LNURLTip(props) { return ( <>
-
- -
+
- {pr ? <> - {webLn()} -
window.open(`lightning:${pr}`)}>Open Wallet
-
navigator.clipboard.writeText(pr)}>Copy Invoice
- : null} + {pr && ( + <> +
+ +
+
+
window.open(`lightning:${pr}`)}> + Open Wallet +
+
{webLn()}
+
+ + )}
From ac19f732dc943a0ae66fbf5909ba56e166845843 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Wed, 11 Jan 2023 12:33:34 +0100 Subject: [PATCH 2/4] highlight profile links --- src/pages/ProfilePage.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/ProfilePage.css b/src/pages/ProfilePage.css index 547eb136..05c08db2 100644 --- a/src/pages/ProfilePage.css +++ b/src/pages/ProfilePage.css @@ -55,6 +55,10 @@ font-size: 10px; } +.profile a { + color: var(--highlight); +} + .profile .lnurl::before { content: '⚡️ '; font-size: 10px; From a12d93f7e1487329b4fcd021afbb9d251ecbc902 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Wed, 11 Jan 2023 13:26:36 +0100 Subject: [PATCH 3/4] bigger tabs, bold when active --- src/index.css | 4 ++++ src/pages/ProfilePage.css | 2 +- src/pages/Root.css | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/index.css b/src/index.css index 0134d982..623f1fa2 100644 --- a/src/index.css +++ b/src/index.css @@ -267,6 +267,10 @@ body.scroll-lock { margin: 0; } +.tabs .active { + font-weight: bold; +} + .error { color: var(--error); } diff --git a/src/pages/ProfilePage.css b/src/pages/ProfilePage.css index 05c08db2..46638702 100644 --- a/src/pages/ProfilePage.css +++ b/src/pages/ProfilePage.css @@ -95,7 +95,7 @@ .tab { margin: 0; - padding: 4px; + padding: 8px 0; border-bottom: 3px solid var(--gray-secondary); } .tab.active { diff --git a/src/pages/Root.css b/src/pages/Root.css index 6363b308..aefc1bc4 100644 --- a/src/pages/Root.css +++ b/src/pages/Root.css @@ -1,4 +1,4 @@ .root-tabs > div { - padding: 5px 0; + padding: 8px 0; margin-right: 0; } From 6f8620d598d485ddbdc00c2f5fb89ef733260cb8 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Wed, 11 Jan 2023 15:22:55 +0100 Subject: [PATCH 4/4] fix: make selected amount stand out --- src/element/LNURLTip.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/element/LNURLTip.css b/src/element/LNURLTip.css index e478f969..3c0d1b73 100644 --- a/src/element/LNURLTip.css +++ b/src/element/LNURLTip.css @@ -17,6 +17,11 @@ background-color: var(--gray); } +.lnurl-tip .pill.active { + color: var(--bg-color); + background-color: var(--font-color); +} + .lnurl-tip .invoice { display: flex; flex-direction: column;