feat: generic nostr.com client config
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Kieran 2024-01-22 13:52:18 +00:00
parent ef8a5c29bf
commit 6fd02cffbb
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 84 additions and 32 deletions

View 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 }
}
}

View File

@ -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,7 +174,40 @@ const DonatePage = () => {
</div>
</Modal>
)}
{CONFIG.features.zapPool && (
<ZapPoolDonateSection />
<h3>
<FormattedMessage defaultMessage="Primary Developers" id="4IPzdn" />
</h3>
{DeveloperAccounts.map(a => (
<ProfilePreview pubkey={a} key={a} actions={actions(a)} />
))}
<h4>
<FormattedMessage defaultMessage="Contributors" id="ZLmyG9" />
</h4>
{Contributors.map(a => (
<ProfilePreview pubkey={a} key={a} actions={actions(a)} />
))}
<h4>
<FormattedMessage defaultMessage="Translators" id="3gOsZq" />
</h4>
{Translators.map(a => (
<ProfilePreview pubkey={a} key={a} actions={actions(a)} />
))}
</div>
);
};
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" />
@ -205,27 +234,7 @@ const DonatePage = () => {
}
/>
</>
)}
<h3>
<FormattedMessage defaultMessage="Primary Developers" id="4IPzdn" />
</h3>
{DeveloperAccounts.map(a => (
<ProfilePreview pubkey={a} key={a} actions={actions(a)} />
))}
<h4>
<FormattedMessage defaultMessage="Contributors" id="ZLmyG9" />
</h4>
{Contributors.map(a => (
<ProfilePreview pubkey={a} key={a} actions={actions(a)} />
))}
<h4>
<FormattedMessage defaultMessage="Translators" id="3gOsZq" />
</h4>
{Translators.map(a => (
<ProfilePreview pubkey={a} key={a} actions={actions(a)} />
))}
</div>
);
};
}
export default DonatePage;