Add server avatars. Closes #52

Add identity edit menu. Closes #51
This commit is contained in:
Paul
2021-08-07 22:42:15 +01:00
parent 97816e1feb
commit 4f1ba8942f
10 changed files with 135 additions and 8 deletions

View File

@@ -114,6 +114,7 @@ type Action =
| { action: "close_dm"; target: Channel }
| { action: "leave_server"; target: Server }
| { action: "delete_server"; target: Server }
| { action: "edit_identity"; target: Server }
| { action: "open_notification_options"; channel: Channel }
| { action: "open_settings" }
| { action: "open_channel_settings"; id: string }
@@ -408,6 +409,13 @@ function ContextMenus(props: Props) {
} as unknown as Screen);
break;
case "edit_identity":
openScreen({
id: "server_identity",
server: data.target,
});
break;
case "ban_member":
case "kick_member":
openScreen({
@@ -850,6 +858,17 @@ function ContextMenus(props: Props) {
}
if (sid && server) {
if (
serverPermissions &
ServerPermission.ChangeNickname ||
serverPermissions &
ServerPermission.ChangeAvatar
)
generateAction(
{ action: "edit_identity", target: server },
"edit_identity",
);
if (
serverPermissions &
ServerPermission.ManageServer