chore: misc
This commit is contained in:
parent
0545a07ea6
commit
b23b1764e5
12
README.md
12
README.md
@ -47,3 +47,15 @@ To build the application and nostr package, use
|
||||
```
|
||||
$ yarn build
|
||||
```
|
||||
|
||||
### Translations
|
||||
|
||||
Translations are managed on [Crowdin](https://crowdin.com/project/snort)
|
||||
|
||||
To extract translations run:
|
||||
```bash
|
||||
yarn workspace @snort/app intl-extract
|
||||
yarn workspace @snort/app intl-compile
|
||||
```
|
||||
|
||||
This will create the source file `packages/app/src/translations/en.json`
|
@ -60,18 +60,18 @@ export default function Text({ content, tags, creator, users }: TextProps) {
|
||||
if (ref) {
|
||||
switch (ref.Key) {
|
||||
case "p": {
|
||||
return <Mention key={`ref-${ref.PubKey}-${idx}`} pubkey={ref.PubKey ?? ""} />;
|
||||
return <Mention pubkey={ref.PubKey ?? ""} />;
|
||||
}
|
||||
case "e": {
|
||||
const eText = hexToBech32("note", ref.Event).substring(0, 12);
|
||||
return (
|
||||
<Link key={ref.Event} to={eventLink(ref.Event ?? "")} onClick={e => e.stopPropagation()}>
|
||||
<Link to={eventLink(ref.Event ?? "")} onClick={e => e.stopPropagation()}>
|
||||
#{eText}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
case "t": {
|
||||
return <Hashtag key={ref.Hashtag} tag={ref.Hashtag ?? ""} />;
|
||||
return <Hashtag tag={ref.Hashtag ?? ""} />;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -92,7 +92,7 @@ export default function Text({ content, tags, creator, users }: TextProps) {
|
||||
if (typeof f === "string") {
|
||||
return f.split(InvoiceRegex).map(i => {
|
||||
if (i.toLowerCase().startsWith("lnbc")) {
|
||||
return <Invoice key={i} invoice={i} />;
|
||||
return <Invoice invoice={i} />;
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
@ -109,7 +109,7 @@ export default function Text({ content, tags, creator, users }: TextProps) {
|
||||
if (typeof f === "string") {
|
||||
return f.split(HashtagRegex).map(i => {
|
||||
if (i.toLowerCase().startsWith("#")) {
|
||||
return <Hashtag key={i} tag={i.substring(1)} />;
|
||||
return <Hashtag tag={i.substring(1)} />;
|
||||
} else {
|
||||
return i;
|
||||
}
|
||||
|
@ -82,7 +82,6 @@ export default class Connection {
|
||||
this.EventsCallback = new Map();
|
||||
this.AwaitingAuth = new Map();
|
||||
this.Authed = false;
|
||||
this.Connect();
|
||||
}
|
||||
|
||||
async Connect() {
|
||||
|
@ -82,10 +82,11 @@ export class NostrSystem {
|
||||
/**
|
||||
* Connect to a NOSTR relay if not already connected
|
||||
*/
|
||||
ConnectToRelay(address: string, options: RelaySettings) {
|
||||
async ConnectToRelay(address: string, options: RelaySettings) {
|
||||
try {
|
||||
if (!this.Sockets.has(address)) {
|
||||
const c = new Connection(address, options);
|
||||
await c.Connect();
|
||||
this.Sockets.set(address, c);
|
||||
for (const [, s] of this.Subscriptions) {
|
||||
c.AddSubscription(s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user