Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
v0l committed Dec 11, 2023
1 parent 07e4240 commit b63d46e
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 48 deletions.
4 changes: 1 addition & 3 deletions packages/app/src/Element/Embed/MediaElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export function MediaElement(props: MediaElementProps) {
const autoplay = window.innerWidth >= 768;

if (props.mime.startsWith("image/")) {
return (
<ProxyImg key={props.url} src={props.url} onClick={props.onMediaClick} className="max-h-[80vh] mx-auto" />
);
return <ProxyImg key={props.url} src={props.url} onClick={props.onMediaClick} className="max-h-[80vh] mx-auto" />;
} else if (props.mime.startsWith("audio/")) {
return <audio key={props.url} src={props.url} controls />;
} else if (props.mime.startsWith("video/")) {
Expand Down
49 changes: 27 additions & 22 deletions packages/app/src/Pages/DonatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,34 @@ const DonatePage = () => {
</div>
</Modal>
)}
{CONFIG.features.zapPool && <>
<h3>
<FormattedMessage defaultMessage="ZapPool" id="pRess9" />
</h3>
<p>
<FormattedMessage defaultMessage="Fund the services that you use by splitting a portion of all your zaps into a pool of funds!" id="x/Fx2P" />
</p>
<p>
<Link to="/zap-pool" className="underline">
<FormattedMessage defaultMessage="Configure zap pool" id="kqPQJD" />
</Link>
</p>
<ZapPoolTarget
target={
zapPool.find(b => b.pubkey === bech32ToHex(SnortPubKey) && b.type === ZapPoolRecipientType.Generic) ?? {
type: ZapPoolRecipientType.Generic,
pubkey: bech32ToHex(SnortPubKey),
split: 0,
sum: 0,
{CONFIG.features.zapPool && (
<>
<h3>
<FormattedMessage defaultMessage="ZapPool" id="pRess9" />
</h3>
<p>
<FormattedMessage
defaultMessage="Fund the services that you use by splitting a portion of all your zaps into a pool of funds!"
id="x/Fx2P"
/>
</p>
<p>
<Link to="/zap-pool" className="underline">
<FormattedMessage defaultMessage="Configure zap pool" id="kqPQJD" />
</Link>
</p>
<ZapPoolTarget
target={
zapPool.find(b => b.pubkey === bech32ToHex(SnortPubKey) && b.type === ZapPoolRecipientType.Generic) ?? {
type: ZapPoolRecipientType.Generic,
pubkey: bech32ToHex(SnortPubKey),
split: 0,
sum: 0,
}
}
}
/>
</>}
/>
</>
)}
<h3>
<FormattedMessage defaultMessage="Primary Developers" id="4IPzdn" />
</h3>
Expand Down
24 changes: 13 additions & 11 deletions packages/app/src/Pages/Profile/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) {
targets={
lnurl?.lnurl && id
? [
{
type: "lnurl",
value: lnurl?.lnurl,
weight: 1,
name: user?.display_name || user?.name,
zap: { pubkey: id },
} as ZapTarget,
]
{
type: "lnurl",
value: lnurl?.lnurl,
weight: 1,
name: user?.display_name || user?.name,
zap: { pubkey: id },
} as ZapTarget,
]
: undefined
}
show={showLnQr}
Expand Down Expand Up @@ -300,9 +300,11 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) {
<div className="profile-actions">
{renderIcons()}
{!isMe && id && <FollowButton pubkey={id} />}
{isMe && id && <AsyncButton className="secondary">
<FormattedMessage defaultMessage="Edit" id="wEQDC6" />
</AsyncButton>}
{isMe && id && (
<AsyncButton className="secondary">
<FormattedMessage defaultMessage="Edit" id="wEQDC6" />
</AsyncButton>
)}
</div>
</div>
);
Expand Down
18 changes: 9 additions & 9 deletions packages/app/src/lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@
"6OSOXl": {
"defaultMessage": "Reason: <i>{reason}</i>"
},
"6TfgXX": {
"defaultMessage": "{site} is an open source project built by passionate people in their free time"
},
"6bgpn+": {
"defaultMessage": "Not all clients support this, you may still receive some zaps as if zap splits was not configured"
},
Expand Down Expand Up @@ -933,6 +930,9 @@
"XgWvGA": {
"defaultMessage": "Reactions"
},
"XhpBfA": {
"defaultMessage": "{site} is an open source project built by passionate people in their free time, your donations are greatly appreciated"
},
"Xopqkl": {
"defaultMessage": "Your default zap amount is {number} sats, example values are calculated from this."
},
Expand Down Expand Up @@ -1254,6 +1254,9 @@
"kc79d3": {
"defaultMessage": "Topics"
},
"kqPQJD": {
"defaultMessage": "Configure zap pool"
},
"kuPHYE": {
"defaultMessage": "{n,plural,=0{{name} liked} other{{name} & {n} others liked}}"
},
Expand Down Expand Up @@ -1293,9 +1296,6 @@
"mErPop": {
"defaultMessage": "It looks like you dont have any, check {link} to buy one!"
},
"mH91FY": {
"defaultMessage": "Each contributor will get paid a percentage of all donations and NIP-05 orders, you can see the split amounts below"
},
"mKAr6h": {
"defaultMessage": "Follow all"
},
Expand Down Expand Up @@ -1324,9 +1324,6 @@
"nihgfo": {
"defaultMessage": "Listen to this article"
},
"nn1qb3": {
"defaultMessage": "Your donations are greatly appreciated"
},
"nwZXeh": {
"defaultMessage": "{n} blocked"
},
Expand All @@ -1351,6 +1348,9 @@
"pI+77w": {
"defaultMessage": "Downloadable backups from Snort relay"
},
"pRess9": {
"defaultMessage": "ZapPool"
},
"puLNUJ": {
"defaultMessage": "Pin"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"62nsdy": "Retry",
"65BmHb": "Failed to proxy image from {host}, click here to load directly",
"6OSOXl": "Reason: <i>{reason}</i>",
"6TfgXX": "{site} is an open source project built by passionate people in their free time",
"6bgpn+": "Not all clients support this, you may still receive some zaps as if zap splits was not configured",
"6ewQqw": "Likes ({n})",
"6k7xfM": "Trending notes",
Expand Down Expand Up @@ -307,6 +306,7 @@
"XICsE8": "File hosts",
"XXm7jJ": "Trending Hashtags",
"XgWvGA": "Reactions",
"XhpBfA": "{site} is an open source project built by passionate people in their free time, your donations are greatly appreciated",
"Xopqkl": "Your default zap amount is {number} sats, example values are calculated from this.",
"XrSk2j": "Redeem",
"YDURw6": "Service URL",
Expand Down Expand Up @@ -413,6 +413,7 @@
"kJYo0u": "{n,plural,=0{{name} reposted} other{{name} & {n} others reposted}}",
"kaaf1E": "now",
"kc79d3": "Topics",
"kqPQJD": "Configure zap pool",
"kuPHYE": "{n,plural,=0{{name} liked} other{{name} & {n} others liked}}",
"l+ikU1": "Everything in {plan}",
"l3H1EK": "Invite your friends",
Expand All @@ -426,7 +427,6 @@
"lsNFM1": "Click to load content from {link}",
"lvlPhZ": "Pay Invoice",
"mErPop": "It looks like you dont have any, check {link} to buy one!",
"mH91FY": "Each contributor will get paid a percentage of all donations and NIP-05 orders, you can see the split amounts below",
"mKAr6h": "Follow all",
"mKh2HS": "File upload service",
"mKhgP9": "{n,plural,=0{} =1{zapped} other{zapped}}",
Expand All @@ -436,7 +436,6 @@
"nDejmx": "Unblock",
"nGBrvw": "Bookmarks",
"nihgfo": "Listen to this article",
"nn1qb3": "Your donations are greatly appreciated",
"nwZXeh": "{n} blocked",
"o7e+nJ": "{n} followers",
"oJ+JJN": "Nothing found :/",
Expand All @@ -445,6 +444,7 @@
"p4N05H": "Upload",
"p85Uwy": "Active Subscriptions",
"pI+77w": "Downloadable backups from Snort relay",
"pRess9": "ZapPool",
"puLNUJ": "Pin",
"pzTOmv": "Followers",
"qD9EUF": "Email <> DM bridge for your Snort nostr address",
Expand Down

0 comments on commit b63d46e

Please sign in to comment.