add user feature
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
function ListElement() {
|
||||
return (
|
||||
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
function Relations() {
|
||||
return (
|
||||
<aside className="flex, flex-col, items-center,w-80 bg-amber-600">
|
||||
<button>SWAP</button>
|
||||
</aside>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type {User} from "../types";
|
||||
|
||||
function UserBlock(user: User) {
|
||||
return (
|
||||
<div className="w-80">
|
||||
<img className="w-20 h-20 rounded-full" src={user.avatarKey} alt="avatar"/>
|
||||
<div className="flex flex-col">
|
||||
<p className="">{user.name}</p>
|
||||
<p className="text-sm text-gray-600">{user.pronouns}</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export interface User {
|
||||
id: string;
|
||||
name: string;
|
||||
pronouns: string;
|
||||
description: string;
|
||||
avatarKey?: string;
|
||||
background?: string;
|
||||
createdAt: string;
|
||||
hubs?: string; // TODO
|
||||
color: number[];
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
function Relations() {
|
||||
return (
|
||||
<aside className="w-80 bg-amber-600">
|
||||
|
||||
</aside>
|
||||
)
|
||||
}
|
||||
@@ -31,14 +31,14 @@ type User struct {
|
||||
Name string `json:"name"`
|
||||
Pronouns string `json:"pronouns"`
|
||||
Description string `json:"description"`
|
||||
AvatarKey string `json:"avatarType"`
|
||||
ProfileBgKey string `json:"profileBackgroundType"`
|
||||
AvatarKey string `json:"avatarKey"`
|
||||
ProfileBgKey string `json:"profileBackgroundKey"`
|
||||
PasswordHash string `json:"-"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
WsConn *websocket.Conn `json:"-"`
|
||||
Id uuid.UUID `json:"-"`
|
||||
Connections map[uuid.UUID]*Connection `json:"-"`
|
||||
Hubs map[uuid.UUID]*Hub `json:"hubs-to-delete"`
|
||||
Hubs map[uuid.UUID]*Hub `json:"hubs"`
|
||||
ChannelUnreadMessage map[uuid.UUID]uint8 `json:"-"`
|
||||
Color Rgba `json:"color"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user