Handlers for UserShort.

View user's profile picture.
Close #25, adds logic to hamburger.
This commit is contained in:
Paul
2021-08-09 15:51:22 +01:00
parent d2f0532344
commit f1babfdd51
8 changed files with 74 additions and 14 deletions

View File

@@ -130,7 +130,20 @@ export const UserProfile = observer(
`linear-gradient( rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7) ), url('${backgroundURL}')`,
}}>
<div className={styles.profile}>
<UserIcon size={80} target={user} status animate />
<UserIcon
size={80}
target={user}
status
animate
hover={typeof user.avatar !== "undefined"}
onClick={() =>
user.avatar &&
openScreen({
id: "image_viewer",
attachment: user.avatar,
})
}
/>
<div className={styles.details}>
<Localizer>
<span

View File

@@ -79,7 +79,6 @@ export function grabFiles(
const files = (e.currentTarget as HTMLInputElement)?.files;
if (!files) return;
for (const file of files) {
alert(file.size);
if (file.size > maxFileSize) {
return tooLarge();
}