Cleanup
This commit is contained in:
parent
dadf5159bd
commit
5182b65591
@ -1,8 +1,8 @@
|
||||
.cashu {
|
||||
background: var(--cashu-gradient);
|
||||
background: var(--cashu-gradient);
|
||||
}
|
||||
|
||||
.cashu h1 {
|
||||
font-size: 44px;
|
||||
line-height: 1em;
|
||||
}
|
||||
font-size: 44px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
@ -57,20 +57,50 @@ export default function CashuNuts({ token }: { token: string }) {
|
||||
<div className="flex f-center g16">
|
||||
<svg width="30" height="39" viewBox="0 0 30 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="Group 47711">
|
||||
<path id="Rectangle 585" d="M29.3809 2.47055L29.3809 11.7277L26.7913 11.021C23.8493 10.2181 20.727 10.3835 17.8863 11.4929C15.5024 12.4238 12.9113 12.6933 10.3869 12.2728L7.11501 11.7277L7.11501 2.47054L10.3869 3.01557C12.9113 3.43607 15.5024 3.1666 17.8863 2.23566C20.727 1.12632 23.8493 0.960876 26.7913 1.7638L29.3809 2.47055Z" fill="url(#paint0_linear_1976_19241)" />
|
||||
<path id="Rectangle 587" d="M29.3809 27.9803L29.3809 37.2375L26.7913 36.5308C23.8493 35.7278 20.727 35.8933 17.8863 37.0026C15.5024 37.9336 12.9113 38.203 10.3869 37.7825L7.11501 37.2375L7.11501 27.9803L10.3869 28.5253C12.9113 28.9458 15.5024 28.6764 17.8863 27.7454C20.727 26.6361 23.8493 26.4706 26.7913 27.2736L29.3809 27.9803Z" fill="url(#paint1_linear_1976_19241)" />
|
||||
<path id="Rectangle 586" d="M8.494e-08 15.2069L4.89585e-07 24.4641L2.5896 23.7573C5.53159 22.9544 8.6539 23.1198 11.4946 24.2292C13.8784 25.1601 16.4695 25.4296 18.9939 25.0091L22.2658 24.4641L22.2658 15.2069L18.9939 15.7519C16.4695 16.1724 13.8784 15.9029 11.4946 14.972C8.6539 13.8627 5.53159 13.6972 2.5896 14.5001L8.494e-08 15.2069Z" fill="url(#paint2_linear_1976_19241)" />
|
||||
<path
|
||||
id="Rectangle 585"
|
||||
d="M29.3809 2.47055L29.3809 11.7277L26.7913 11.021C23.8493 10.2181 20.727 10.3835 17.8863 11.4929C15.5024 12.4238 12.9113 12.6933 10.3869 12.2728L7.11501 11.7277L7.11501 2.47054L10.3869 3.01557C12.9113 3.43607 15.5024 3.1666 17.8863 2.23566C20.727 1.12632 23.8493 0.960876 26.7913 1.7638L29.3809 2.47055Z"
|
||||
fill="url(#paint0_linear_1976_19241)"
|
||||
/>
|
||||
<path
|
||||
id="Rectangle 587"
|
||||
d="M29.3809 27.9803L29.3809 37.2375L26.7913 36.5308C23.8493 35.7278 20.727 35.8933 17.8863 37.0026C15.5024 37.9336 12.9113 38.203 10.3869 37.7825L7.11501 37.2375L7.11501 27.9803L10.3869 28.5253C12.9113 28.9458 15.5024 28.6764 17.8863 27.7454C20.727 26.6361 23.8493 26.4706 26.7913 27.2736L29.3809 27.9803Z"
|
||||
fill="url(#paint1_linear_1976_19241)"
|
||||
/>
|
||||
<path
|
||||
id="Rectangle 586"
|
||||
d="M8.494e-08 15.2069L4.89585e-07 24.4641L2.5896 23.7573C5.53159 22.9544 8.6539 23.1198 11.4946 24.2292C13.8784 25.1601 16.4695 25.4296 18.9939 25.0091L22.2658 24.4641L22.2658 15.2069L18.9939 15.7519C16.4695 16.1724 13.8784 15.9029 11.4946 14.972C8.6539 13.8627 5.53159 13.6972 2.5896 14.5001L8.494e-08 15.2069Z"
|
||||
fill="url(#paint2_linear_1976_19241)"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_1976_19241" x1="29.3809" y1="6.7213" x2="7.11501" y2="6.7213" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient
|
||||
id="paint0_linear_1976_19241"
|
||||
x1="29.3809"
|
||||
y1="6.7213"
|
||||
x2="7.11501"
|
||||
y2="6.7213"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" />
|
||||
<stop offset="1" stop-color="white" stop-opacity="0.5" />
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_1976_19241" x1="29.3809" y1="32.2311" x2="7.11501" y2="32.2311" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient
|
||||
id="paint1_linear_1976_19241"
|
||||
x1="29.3809"
|
||||
y1="32.2311"
|
||||
x2="7.11501"
|
||||
y2="32.2311"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" />
|
||||
<stop offset="1" stop-color="white" stop-opacity="0.5" />
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_1976_19241" x1="2.70746e-07" y1="19.4576" x2="22.2658" y2="19.4576" gradientUnits="userSpaceOnUse">
|
||||
<linearGradient
|
||||
id="paint2_linear_1976_19241"
|
||||
x1="2.70746e-07"
|
||||
y1="19.4576"
|
||||
x2="22.2658"
|
||||
y2="19.4576"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white" />
|
||||
<stop offset="1" stop-color="white" stop-opacity="0.5" />
|
||||
</linearGradient>
|
||||
@ -79,15 +109,19 @@ export default function CashuNuts({ token }: { token: string }) {
|
||||
<FormattedMessage
|
||||
defaultMessage="<h1>{n}</h1> Cashu sats"
|
||||
values={{
|
||||
h1: (c) => <h1>{c}</h1>,
|
||||
n: <FormattedNumber value={amount} />
|
||||
}} />
|
||||
h1: c => <h1>{c}</h1>,
|
||||
n: <FormattedNumber value={amount} />,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<small className="xs w-max">
|
||||
<FormattedMessage defaultMessage="<b>Mint:</b> {url}" values={{
|
||||
b: (c) => <b>{c}</b>,
|
||||
url: new URL(cashu.token[0].mint).hostname
|
||||
}} />
|
||||
<FormattedMessage
|
||||
defaultMessage="<b>Mint:</b> {url}"
|
||||
values={{
|
||||
b: c => <b>{c}</b>,
|
||||
url: new URL(cashu.token[0].mint).hostname,
|
||||
}}
|
||||
/>
|
||||
</small>
|
||||
</div>
|
||||
<div className="flex g8">
|
||||
|
@ -15,16 +15,30 @@ export function LiveEvent({ ev }: { ev: NostrEvent }) {
|
||||
function statusLine() {
|
||||
switch (status) {
|
||||
case "live": {
|
||||
return <div className="flex g4">
|
||||
<Icon name="signal-01" />
|
||||
<b className="uppercase"><FormattedMessage defaultMessage="Live" /></b>
|
||||
</div>
|
||||
return (
|
||||
<div className="flex g4">
|
||||
<Icon name="signal-01" />
|
||||
<b className="uppercase">
|
||||
<FormattedMessage defaultMessage="Live" />
|
||||
</b>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
case "ended": {
|
||||
return <b className="uppercase"><FormattedMessage defaultMessage="Ended" /></b>
|
||||
return (
|
||||
<b className="uppercase">
|
||||
<FormattedMessage defaultMessage="Ended" />
|
||||
</b>
|
||||
);
|
||||
}
|
||||
case "planned": {
|
||||
return <b className="uppercase">{new Intl.DateTimeFormat(undefined, { dateStyle: 'full', timeStyle: 'short' }).format(new Date(starts * 1000))}</b>
|
||||
return (
|
||||
<b className="uppercase">
|
||||
{new Intl.DateTimeFormat(undefined, { dateStyle: "full", timeStyle: "short" }).format(
|
||||
new Date(starts * 1000),
|
||||
)}
|
||||
</b>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -33,19 +47,23 @@ export function LiveEvent({ ev }: { ev: NostrEvent }) {
|
||||
const link = `https://zap.stream/${NostrLink.fromEvent(ev).encode()}`;
|
||||
switch (status) {
|
||||
case "live": {
|
||||
return <Link to={link} target="_blank">
|
||||
<button type="button">
|
||||
<FormattedMessage defaultMessage="Join Stream" />
|
||||
</button>
|
||||
</Link>;
|
||||
return (
|
||||
<Link to={link} target="_blank">
|
||||
<button type="button">
|
||||
<FormattedMessage defaultMessage="Join Stream" />
|
||||
</button>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
case "ended": {
|
||||
if (findTag(ev, "recording")) {
|
||||
return <Link to={link} target="_blank">
|
||||
<button type="button">
|
||||
<FormattedMessage defaultMessage="Watch Replay" />
|
||||
</button>
|
||||
</Link>;
|
||||
return (
|
||||
<Link to={link} target="_blank">
|
||||
<button type="button">
|
||||
<FormattedMessage defaultMessage="Watch Replay" />
|
||||
</button>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -60,9 +78,7 @@ export function LiveEvent({ ev }: { ev: NostrEvent }) {
|
||||
{statusLine()}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{cta()}
|
||||
</div>
|
||||
<div>{cta()}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -157,17 +157,25 @@ export default function LoginPage() {
|
||||
await signer.init();
|
||||
await delay(500);
|
||||
await signer.describe();
|
||||
LoginStore.loginWithPubkey(await signer.getPubKey(), LoginSessionType.Nip46, undefined, ["wss://relay.damus.io"], await PinEncrypted.create(nip46Key, pin));
|
||||
LoginStore.loginWithPubkey(
|
||||
await signer.getPubKey(),
|
||||
LoginSessionType.Nip46,
|
||||
undefined,
|
||||
["wss://relay.damus.io"],
|
||||
await PinEncrypted.create(nip46Key, pin),
|
||||
);
|
||||
navigate("/");
|
||||
}
|
||||
|
||||
function nip46Buttons() {
|
||||
return (
|
||||
<>
|
||||
<AsyncButton type="button" onClick={() => {
|
||||
generateNip46();
|
||||
setPin(true);
|
||||
}}>
|
||||
<AsyncButton
|
||||
type="button"
|
||||
onClick={() => {
|
||||
generateNip46();
|
||||
setPin(true);
|
||||
}}>
|
||||
<FormattedMessage defaultMessage="Nostr Connect" description="Login button for NIP-46 signer app" />
|
||||
</AsyncButton>
|
||||
{nostrConnect && !pin && (
|
||||
|
@ -60,11 +60,16 @@ export class Nip4ChatSystem extends ExternalStore<Array<Chat>> implements ChatSy
|
||||
{} as Record<string, Array<NostrEvent>>,
|
||||
);
|
||||
|
||||
return [...Object.entries(chats)].map(([k, v]) => Nip4ChatSystem.createChatObj(encodeTLVEntries("chat4" as NostrPrefix, {
|
||||
type: TLVEntryType.Author,
|
||||
value: k,
|
||||
length: 32,
|
||||
}), v));
|
||||
return [...Object.entries(chats)].map(([k, v]) =>
|
||||
Nip4ChatSystem.createChatObj(
|
||||
encodeTLVEntries("chat4" as NostrPrefix, {
|
||||
type: TLVEntryType.Author,
|
||||
value: k,
|
||||
length: 32,
|
||||
}),
|
||||
v,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static createChatObj(id: string, messages: Array<NostrEvent>) {
|
||||
|
@ -46,7 +46,7 @@
|
||||
--header-padding-tb: 10px;
|
||||
--btn-color: #fff;
|
||||
--primary-gradient: linear-gradient(90deg, rgba(239, 150, 68, 1) 0%, rgba(123, 65, 246, 1) 100%);
|
||||
--cashu-gradient: linear-gradient(90deg, #40B039, #ADFF2A)
|
||||
--cashu-gradient: linear-gradient(90deg, #40b039, #adff2a);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
|
@ -193,6 +193,12 @@
|
||||
"5ykRmX": {
|
||||
"defaultMessage": "Send zap"
|
||||
},
|
||||
"6/SF6e": {
|
||||
"defaultMessage": "<h1>{n}</h1> Cashu sats"
|
||||
},
|
||||
"6/hB3S": {
|
||||
"defaultMessage": "Watch Replay"
|
||||
},
|
||||
"65BmHb": {
|
||||
"defaultMessage": "Failed to proxy image from {host}, click here to load directly"
|
||||
},
|
||||
@ -362,6 +368,9 @@
|
||||
"Dh3hbq": {
|
||||
"defaultMessage": "Auto Zap"
|
||||
},
|
||||
"Dn82AL": {
|
||||
"defaultMessage": "Live"
|
||||
},
|
||||
"DtYelJ": {
|
||||
"defaultMessage": "Transfer"
|
||||
},
|
||||
@ -434,6 +443,9 @@
|
||||
"GL8aXW": {
|
||||
"defaultMessage": "Bookmarks ({n})"
|
||||
},
|
||||
"GQPtfk": {
|
||||
"defaultMessage": "Join Stream"
|
||||
},
|
||||
"GSye7T": {
|
||||
"defaultMessage": "Lightning Address"
|
||||
},
|
||||
@ -459,9 +471,6 @@
|
||||
"HAlOn1": {
|
||||
"defaultMessage": "Name"
|
||||
},
|
||||
"HF4YnO": {
|
||||
"defaultMessage": "Watch Live!"
|
||||
},
|
||||
"HFls6j": {
|
||||
"defaultMessage": "name will be available later"
|
||||
},
|
||||
@ -725,10 +734,6 @@
|
||||
"SP0+yi": {
|
||||
"defaultMessage": "Buy Subscription"
|
||||
},
|
||||
"SX58hM": {
|
||||
"defaultMessage": "Copy",
|
||||
"description": "Button: Copy Cashu token"
|
||||
},
|
||||
"SYQtZ7": {
|
||||
"defaultMessage": "LN Address Proxy"
|
||||
},
|
||||
@ -747,8 +752,8 @@
|
||||
"TDR5ge": {
|
||||
"defaultMessage": "Media in notes will automatically be shown for selected people, otherwise only the link will show"
|
||||
},
|
||||
"TMfYfY": {
|
||||
"defaultMessage": "Cashu token"
|
||||
"TP/cMX": {
|
||||
"defaultMessage": "Ended"
|
||||
},
|
||||
"TpgeGw": {
|
||||
"defaultMessage": "Hex Salt..",
|
||||
@ -760,9 +765,6 @@
|
||||
"UDYlxu": {
|
||||
"defaultMessage": "Pending Subscriptions"
|
||||
},
|
||||
"ULotH9": {
|
||||
"defaultMessage": "Amount: {amount} sats"
|
||||
},
|
||||
"UT7Nkj": {
|
||||
"defaultMessage": "New Chat"
|
||||
},
|
||||
@ -1049,9 +1051,6 @@
|
||||
"iNWbVV": {
|
||||
"defaultMessage": "Handle"
|
||||
},
|
||||
"iUsU2x": {
|
||||
"defaultMessage": "Mint: {url}"
|
||||
},
|
||||
"iXPL0Z": {
|
||||
"defaultMessage": "Can't login with private key on an insecure connection, please use a Nostr key manager extension instead"
|
||||
},
|
||||
@ -1428,5 +1427,8 @@
|
||||
},
|
||||
"zvCDao": {
|
||||
"defaultMessage": "Automatically show latest notes"
|
||||
},
|
||||
"zwb6LR": {
|
||||
"defaultMessage": "<b>Mint:</b> {url}"
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,8 @@
|
||||
"5u6iEc": "Transfer to Pubkey",
|
||||
"5vMmmR": "Usernames are not unique on Nostr. The nostr address is your unique human-readable address that is unique to you upon registration.",
|
||||
"5ykRmX": "Send zap",
|
||||
"6/SF6e": "<h1>{n}</h1> Cashu sats",
|
||||
"6/hB3S": "Watch Replay",
|
||||
"65BmHb": "Failed to proxy image from {host}, click here to load directly",
|
||||
"6OSOXl": "Reason: <i>{reason}</i>",
|
||||
"6Yfvvp": "Get an identifier",
|
||||
@ -118,6 +120,7 @@
|
||||
"DZzCem": "Show latest {n} notes",
|
||||
"DcL8P+": "Supporter",
|
||||
"Dh3hbq": "Auto Zap",
|
||||
"Dn82AL": "Live",
|
||||
"DtYelJ": "Transfer",
|
||||
"E8a4yq": "Follow some popular accounts",
|
||||
"ELbg9p": "Data Providers",
|
||||
@ -142,6 +145,7 @@
|
||||
"G1BGCg": "Select Wallet",
|
||||
"GFOoEE": "Salt",
|
||||
"GL8aXW": "Bookmarks ({n})",
|
||||
"GQPtfk": "Join Stream",
|
||||
"GSye7T": "Lightning Address",
|
||||
"GUlSVG": "Claim your included Snort nostr address",
|
||||
"Gcn9NQ": "Magnet Link",
|
||||
@ -150,7 +154,6 @@
|
||||
"H0JBH6": "Log Out",
|
||||
"H6/kLh": "Order Paid!",
|
||||
"HAlOn1": "Name",
|
||||
"HF4YnO": "Watch Live!",
|
||||
"HFls6j": "name will be available later",
|
||||
"HOzFdo": "Muted",
|
||||
"HWbkEK": "Clear cache and reload",
|
||||
@ -237,18 +240,16 @@
|
||||
"SMO+on": "Send zap to {name}",
|
||||
"SOqbe9": "Update Lightning Address",
|
||||
"SP0+yi": "Buy Subscription",
|
||||
"SX58hM": "Copy",
|
||||
"SYQtZ7": "LN Address Proxy",
|
||||
"ShdEie": "Mark all read",
|
||||
"Sjo1P4": "Custom",
|
||||
"Ss0sWu": "Pay Now",
|
||||
"StKzTE": "The author has marked this note as a <i>sensitive topic</i>",
|
||||
"TDR5ge": "Media in notes will automatically be shown for selected people, otherwise only the link will show",
|
||||
"TMfYfY": "Cashu token",
|
||||
"TP/cMX": "Ended",
|
||||
"TpgeGw": "Hex Salt..",
|
||||
"Tpy00S": "People",
|
||||
"UDYlxu": "Pending Subscriptions",
|
||||
"ULotH9": "Amount: {amount} sats",
|
||||
"UT7Nkj": "New Chat",
|
||||
"UUPFlt": "Users must accept the content warning to show the content of your note.",
|
||||
"Up5U7K": "Block",
|
||||
@ -343,7 +344,6 @@
|
||||
"iEoXYx": "DeepL translations",
|
||||
"iGT1eE": "Prevent fake accounts from imitating you",
|
||||
"iNWbVV": "Handle",
|
||||
"iUsU2x": "Mint: {url}",
|
||||
"iXPL0Z": "Can't login with private key on an insecure connection, please use a Nostr key manager extension instead",
|
||||
"ieGrWo": "Follow",
|
||||
"itPgxd": "Profile",
|
||||
@ -466,5 +466,6 @@
|
||||
"zcaOTs": "Zap amount in sats",
|
||||
"zjJZBd": "You're ready!",
|
||||
"zonsdq": "Failed to load LNURL service",
|
||||
"zvCDao": "Automatically show latest notes"
|
||||
"zvCDao": "Automatically show latest notes",
|
||||
"zwb6LR": "<b>Mint:</b> {url}"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user