diff --git a/backend/db/report.go b/backend/db/report.go index c2bfe48..88d5723 100644 --- a/backend/db/report.go +++ b/backend/db/report.go @@ -21,7 +21,7 @@ type Report struct { CreatedAt time.Time `json:"created_at"` ResolvedAt *time.Time `json:"resolved_at"` - AdminID *xid.ID `json:"admin_id"` + AdminID xid.ID `json:"admin_id"` AdminComment *string `json:"admin_comment"` } diff --git a/backend/db/user.go b/backend/db/user.go index ab450fa..785528a 100644 --- a/backend/db/user.go +++ b/backend/db/user.go @@ -450,6 +450,7 @@ func (db *DB) ResetUser(ctx context.Context, tx pgx.Tx, id xid.ID) error { Set("username", "deleted-"+hash). Set("display_name", nil). Set("bio", nil). + Set("links", nil). Set("names", "[]"). Set("pronouns", "[]"). Set("avatar", nil). diff --git a/frontend/src/lib/api/entities.ts b/frontend/src/lib/api/entities.ts index 3198edb..8683a58 100644 --- a/frontend/src/lib/api/entities.ts +++ b/frontend/src/lib/api/entities.ts @@ -96,6 +96,13 @@ export interface Report { admin_comment: string | null; } +export interface Warning { + id: number; + reason: string; + created_at: string; + read: boolean; +} + export interface APIError { code: ErrorCode; message?: string; diff --git a/frontend/src/routes/auth/login/CallbackPage.svelte b/frontend/src/routes/auth/login/CallbackPage.svelte index efc80a0..56dbb93 100644 --- a/frontend/src/routes/auth/login/CallbackPage.svelte +++ b/frontend/src/routes/auth/login/CallbackPage.svelte @@ -194,7 +194,7 @@

- If you want to delete your account, type your username ({user.name}) below: + If you want to delete your account, type your username ({user?.name}) below:
This is irreversible! Your account cannot be recovered after you press "Force delete account". diff --git a/frontend/src/routes/nav/Navigation.svelte b/frontend/src/routes/nav/Navigation.svelte index 311ce44..f96d8d4 100644 --- a/frontend/src/routes/nav/Navigation.svelte +++ b/frontend/src/routes/nav/Navigation.svelte @@ -1,8 +1,10 @@ @@ -54,10 +105,16 @@ - - + + + {:else} + There are no open reports :) {/each} @@ -76,4 +133,40 @@ + + + + {#if error} + + {/if} + + +