Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Oct 10, 2023
1 parent 8a73f14 commit 73f85f5
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/src/app.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
5 changes: 4 additions & 1 deletion web/src/lib/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export class Api {

public static readonly parameterizedReplaceableKinds = [30000, 30001, 30078];

constructor(private pool: SimplePool, private relays: string[]) {}
constructor(
private pool: SimplePool,
private relays: string[]
) {}

public async fetchRelayEvents(pubkey: string): Promise<Map<Kind, Event>> {
const events = await this.pool.list(this.relays, [
Expand Down
5 changes: 2 additions & 3 deletions web/src/lib/Author.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,8 @@ export class Author {
}

const api = new Api(get(pool), get(writeRelays));
const { replaceableEvents, parameterizedReplaceableEvents } = await api.fetchAuthorEvents(
pubkey
);
const { replaceableEvents, parameterizedReplaceableEvents } =
await api.fetchAuthorEvents(pubkey);
for (const [, event] of [...replaceableEvents]) {
storage.setReplaceableEvent(event);
}
Expand Down
6 changes: 5 additions & 1 deletion web/src/lib/Contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { WebStorage } from './WebStorage';
export class Contacts {
private readonly api: Api;

constructor(private readonly authorPubkey: string, pool: SimplePool, writeRelays: string[]) {
constructor(
private readonly authorPubkey: string,
pool: SimplePool,
writeRelays: string[]
) {
this.api = new Api(pool, writeRelays);
}

Expand Down
6 changes: 5 additions & 1 deletion web/src/lib/Mute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export class Mute {
private readonly api: Api;
private readonly kind = 10000 as Kind;

constructor(private readonly authorPubkey: string, pool: SimplePool, writeRelays: string[]) {
constructor(
private readonly authorPubkey: string,
pool: SimplePool,
writeRelays: string[]
) {
this.api = new Api(pool, writeRelays);
}

Expand Down
5 changes: 4 additions & 1 deletion web/src/lib/Timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export class Timeline {
private readonly $readRelays: string[];
private readonly api: Api;

constructor(private readonly pubkey: string, private readonly authors: string[]) {
constructor(
private readonly pubkey: string,
private readonly authors: string[]
) {
this.$pool = get(pool);
this.$readRelays = get(readRelays);
this.api = new Api(this.$pool, this.$readRelays);
Expand Down
8 changes: 7 additions & 1 deletion web/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,13 @@
:global(article.timeline-item) {
padding: 12px 16px;
font-family: 'Segoe UI', Meiryo, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
font-family:
'Segoe UI',
Meiryo,
system-ui,
-apple-system,
BlinkMacSystemFont,
sans-serif;
}
:global(article.timeline-item + article.timeline-item) {
Expand Down

0 comments on commit 73f85f5

Please sign in to comment.