feat: generic nostr.com client config
This commit is contained in:
parent
ef8a5c29bf
commit
6fd02cffbb
43
packages/app/config/nostr.json
Normal file
43
packages/app/config/nostr.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"appName": "Nostr",
|
||||
"appNameCapitalized": "Nostr",
|
||||
"appTitle": "Nostr",
|
||||
"hostname": "nostr.com",
|
||||
"nip05Domain": "nostr.com",
|
||||
"favicon": "public/favicon.ico",
|
||||
"appleTouchIconUrl": "/nostrich_512.png",
|
||||
"navLogo": null,
|
||||
"publicDir": "public/snort",
|
||||
"httpCache": "",
|
||||
"animalNamePlaceholders": false,
|
||||
"features": {
|
||||
"analytics": false,
|
||||
"subscriptions": false,
|
||||
"deck": false,
|
||||
"zapPool": false,
|
||||
"notificationGraph": true,
|
||||
"communityLeaders": false
|
||||
},
|
||||
"signUp": {
|
||||
"moderation": true,
|
||||
"defaultFollows": []
|
||||
},
|
||||
"defaultPreferences": {
|
||||
"hideMutedNotes": false
|
||||
},
|
||||
"media": {
|
||||
"bypassImgProxyError": false,
|
||||
"preferLargeMedia": true
|
||||
},
|
||||
"noteCreatorToast": true,
|
||||
"hideFromNavbar": ["/graph"],
|
||||
"deckSubKind": 1,
|
||||
"showPowIcon": true,
|
||||
"eventLinkPrefix": "nevent",
|
||||
"profileLinkPrefix": "nprofile",
|
||||
"defaultRelays": {
|
||||
"wss://relay.snort.social/": { "read": true, "write": true },
|
||||
"wss://nostr.wine/": { "read": true, "write": false },
|
||||
"wss://eden.nostr.land/": { "read": true, "write": false }
|
||||
}
|
||||
}
|
@ -64,10 +64,6 @@ const DonatePage = () => {
|
||||
const [today, setSumToday] = useState<RevenueToday>();
|
||||
const [onChain, setOnChain] = useState("");
|
||||
const api = new SnortApi(ApiHost);
|
||||
const zapPool = useSyncExternalStore(
|
||||
c => unwrap(ZapPoolController).hook(c),
|
||||
() => unwrap(ZapPoolController).snapshot(),
|
||||
);
|
||||
|
||||
async function getOnChainAddress() {
|
||||
const { address } = await api.onChainDonation();
|
||||
@ -178,34 +174,7 @@ 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,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<ZapPoolDonateSection />
|
||||
<h3>
|
||||
<FormattedMessage defaultMessage="Primary Developers" id="4IPzdn" />
|
||||
</h3>
|
||||
@ -228,4 +197,44 @@ const DonatePage = () => {
|
||||
);
|
||||
};
|
||||
|
||||
function ZapPoolDonateSection() {
|
||||
if (!CONFIG.features.zapPool) {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const zapPool = useSyncExternalStore(
|
||||
c => unwrap(ZapPoolController).hook(c),
|
||||
() => unwrap(ZapPoolController).snapshot(),
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<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,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default DonatePage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user