mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-03 08:07:21 +00:00
fixed safe area spacing for drawer buttons
This commit is contained in:
1 parent
80b48ae285
commit
e6cef5b87c
4 files changed
+33
-14
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<meta http-equiv="content-security-policy" content="default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; frame-src 'self' https:; font-src 'self'; base-uri 'self'; manifest-src 'self'; connect-src 'self' blob: https: wss:; img-src 'self' data: blob: https:; media-src 'self' https:">
|
||||
<title>NutStack</title>
|
||||
<meta name="description" content="A Bitcoin wallet powered by Nostr">
|
||||
|
||||
@@ -614,11 +614,11 @@ export function CashuWallet() {
|
||||
|
||||
{/* Bottom Drawer Modals */}
|
||||
<Drawer open={showSendModal} onOpenChange={handleSendDrawerClose}>
|
||||
<DrawerContent className="h-[40vh] max-w-4xl mx-auto">
|
||||
<DrawerContent className="min-h-[40vh] max-w-4xl mx-auto">
|
||||
<DrawerHeader>
|
||||
<DrawerTitle className="text-center text-3xl font-bold">Send</DrawerTitle>
|
||||
</DrawerHeader>
|
||||
<div className="px-4 pb-4">
|
||||
<div className="px-4 pb-6 pb-safe-bottom">
|
||||
<TransactionCard
|
||||
mode={mode}
|
||||
operation="send"
|
||||
@@ -683,11 +683,11 @@ export function CashuWallet() {
|
||||
</Drawer>
|
||||
|
||||
<Drawer open={showReceiveModal} onOpenChange={handleReceiveDrawerClose}>
|
||||
<DrawerContent className="h-[40vh] max-w-4xl mx-auto">
|
||||
<DrawerContent className="min-h-[40vh] max-w-4xl mx-auto">
|
||||
<DrawerHeader>
|
||||
<DrawerTitle className="text-center text-3xl font-bold">Receive</DrawerTitle>
|
||||
</DrawerHeader>
|
||||
<div className="px-4 pb-4">
|
||||
<div className="px-4 pb-6 pb-safe-bottom">
|
||||
<TransactionCard
|
||||
mode={mode}
|
||||
operation="receive"
|
||||
|
||||
@@ -293,7 +293,7 @@ export function TransactionCard({
|
||||
Send Max
|
||||
</button>
|
||||
</div>
|
||||
<div className="mt-6">
|
||||
<div className="mt-6 mb-safe-bottom pb-6">
|
||||
<div className="relative w-full">
|
||||
<div
|
||||
onMouseUp={() => handleSliderMouseUp('bitcoin')}
|
||||
@@ -331,7 +331,7 @@ export function TransactionCard({
|
||||
}}
|
||||
className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
||||
/>
|
||||
<div className="flex justify-center mt-6">
|
||||
<div className="flex justify-center mt-6 mb-safe-bottom pb-6">
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (bitcoinRecipient) {
|
||||
@@ -364,7 +364,7 @@ export function TransactionCard({
|
||||
disabled={!activeMintUrl}
|
||||
className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
|
||||
/>
|
||||
<div className="flex justify-center mt-6">
|
||||
<div className="flex justify-center mt-6 mb-safe-bottom pb-6">
|
||||
<Button
|
||||
onClick={onSend}
|
||||
disabled={!sendAmount || !activeMintUrl || isLoading}
|
||||
@@ -378,7 +378,7 @@ export function TransactionCard({
|
||||
) : pendingInvoice && decodedInvoiceAmount ? (
|
||||
// Lightning Invoice Confirmation (with slider)
|
||||
<div className="space-y-8">
|
||||
<div className="mt-6">
|
||||
<div className="mt-6 mb-safe-bottom pb-6">
|
||||
<div className="relative">
|
||||
<div
|
||||
onMouseUp={() => handleSliderMouseUp('invoice')}
|
||||
@@ -418,7 +418,7 @@ export function TransactionCard({
|
||||
disabled={!activeMintUrl}
|
||||
className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
|
||||
/>
|
||||
<div className="mt-6">
|
||||
<div className="mt-6 mb-safe-bottom pb-6">
|
||||
<div className="relative w-full">
|
||||
<div
|
||||
onMouseUp={() => handleSliderMouseUp('address')}
|
||||
@@ -466,7 +466,7 @@ export function TransactionCard({
|
||||
disabled={!activeMintUrl}
|
||||
className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
||||
/>
|
||||
<div className="flex justify-center mt-6">
|
||||
<div className="flex justify-center mt-6 mb-safe-bottom pb-6">
|
||||
<Button
|
||||
onClick={onSend}
|
||||
disabled={(!lightningInvoice.trim() && !lightningAddressInput.trim()) || !activeMintUrl || isLoading}
|
||||
@@ -488,7 +488,7 @@ export function TransactionCard({
|
||||
{bitcoinAddress}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-center mt-6">
|
||||
<div className="flex justify-center mt-6 mb-safe-bottom pb-6">
|
||||
<Button
|
||||
onClick={onReceive}
|
||||
disabled={isLoading}
|
||||
@@ -514,7 +514,7 @@ export function TransactionCard({
|
||||
disabled={!activeMintUrl}
|
||||
className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
||||
/>
|
||||
<div className="flex justify-center mt-6">
|
||||
<div className="flex justify-center mt-6 mb-safe-bottom pb-6">
|
||||
<Button
|
||||
onClick={onReceive}
|
||||
disabled={!tokenInput.trim() || !activeMintUrl || isLoading}
|
||||
@@ -541,7 +541,7 @@ export function TransactionCard({
|
||||
disabled={!activeMintUrl}
|
||||
className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
|
||||
/>
|
||||
<div className="flex justify-center mt-6">
|
||||
<div className="flex justify-center mt-6 mb-safe-bottom pb-6">
|
||||
<Button
|
||||
onClick={onReceive}
|
||||
disabled={!quoteAmount || !activeMintUrl || isLoading}
|
||||
|
||||
@@ -98,4 +98,23 @@
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
/* Safe area inset utilities */
|
||||
.pb-safe-bottom {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.mb-safe-bottom {
|
||||
margin-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.pt-safe-top {
|
||||
padding-top: env(safe-area-inset-top);
|
||||
}
|
||||
|
||||
.mt-safe-top {
|
||||
margin-top: env(safe-area-inset-top);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user