mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-17 21:31:43 +01:00
small changes
This commit is contained in:
parent
ab3ac8b14c
commit
27260a9f9b
@ -5,7 +5,8 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "vite serve",
|
||||
"build": "vite build"
|
||||
"build": "vite build",
|
||||
"format": "prettier --ignore-path .gitignore -w ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^2.8.1",
|
||||
|
@ -19,6 +19,9 @@ export const Page = ({ children }) => {
|
||||
<Box flexGrow={1} overflow="auto">
|
||||
<ErrorBoundary>{children}</ErrorBoundary>
|
||||
</Box>
|
||||
<VStack style={{ width: "20rem" }} alignItems="stretch" flexShrink={0}>
|
||||
<Button onClick={() => navigate("/")}>Manage Follows</Button>
|
||||
</VStack>
|
||||
</HStack>
|
||||
</Container>
|
||||
);
|
||||
|
@ -37,12 +37,11 @@ export const Post = ({ event }) => {
|
||||
<Text>{moment(event.created_at * 1000).fromNow()}</Text>
|
||||
</Box>
|
||||
</Flex>
|
||||
<EventSeenOn id={event.id} />
|
||||
</Flex>
|
||||
</CardHeader>
|
||||
<CardBody pt={0}>
|
||||
<VStack alignItems="flex-start" justifyContent="stretch">
|
||||
<Box maxHeight="10rem" overflow="hidden" width="100%">
|
||||
<Box maxHeight="20rem" overflow="hidden" width="100%">
|
||||
<ReactMarkdown>
|
||||
{event.content.replace(/(?<! )\n/g, " \n")}
|
||||
</ReactMarkdown>
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Subject } from "rxjs";
|
||||
import { Relay } from "./relay";
|
||||
import settingsService from "../settings";
|
||||
|
||||
export class RelayPool {
|
||||
relays = new Map();
|
||||
@ -18,9 +19,9 @@ export class RelayPool {
|
||||
|
||||
requestRelay(url, connect = true) {
|
||||
if (!this.relays.has(url)) {
|
||||
const newRelay = new Relay(url)
|
||||
const newRelay = new Relay(url);
|
||||
this.relays.set(url, newRelay);
|
||||
this.onRelayCreated.next(newRelay)
|
||||
this.onRelayCreated.next(newRelay);
|
||||
}
|
||||
|
||||
const relay = this.relays.get(url);
|
||||
@ -70,4 +71,12 @@ if (import.meta.env.DEV) {
|
||||
window.relayPool = relayPool;
|
||||
}
|
||||
|
||||
setTimeout(async () => {
|
||||
const urls = await settingsService.getRelays();
|
||||
|
||||
for (const url of urls) {
|
||||
relayPool.requestRelay(url);
|
||||
}
|
||||
}, 1000 * 10);
|
||||
|
||||
export default relayPool;
|
||||
|
Loading…
x
Reference in New Issue
Block a user