forked from NotNet/gluestick
fix some avatar shenanigans
This commit is contained in:
parent
15360eb6b9
commit
9aa36dd589
|
@ -68,7 +68,7 @@ export class DiscordAuthProvider extends AuthProvider {
|
|||
async getAvatar(): Promise<string | null> {
|
||||
const me = await this.getMe();
|
||||
return me.avatar !== null
|
||||
? `https://cdn.discordapp.com/avatars/${me.id}/${me.avatar}.png`
|
||||
? `https://cdn.discordapp.com/avatars/${me.id}/${me.avatar}.png?size=1024`
|
||||
: null;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
flex-direction: column;
|
||||
}
|
||||
|
||||
.avatarChanger .current-avatar,
|
||||
.avatarChanger .currentAvatar,
|
||||
.avatarChanger svg {
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.vertical.vertical .current-avatar {
|
||||
.vertical.vertical .currentAvatar {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: inherit;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @next/next/no-img-element */
|
||||
import React, { ChangeEvent } from "react";
|
||||
import classnames from "classnames";
|
||||
|
||||
|
@ -30,13 +31,12 @@ export default function AvatarChanger({
|
|||
<div
|
||||
className={classnames(
|
||||
styles.avatarChanger,
|
||||
"avatar-changer",
|
||||
vertical ? styles.vertical : null
|
||||
)}
|
||||
>
|
||||
{currentAvatarBlob != null ? (
|
||||
<img
|
||||
className="current-avatar"
|
||||
className={styles.currentAvatar}
|
||||
src={currentAvatarBlob!}
|
||||
alt="Your avatar"
|
||||
/>
|
||||
|
|
|
@ -6,8 +6,8 @@ export default function CheckIcon() {
|
|||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="check" fill="currentColor" fill-rule="nonzero">
|
||||
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
||||
<g id="check" fill="currentColor" fillRule="nonzero">
|
||||
<path
|
||||
d="M107.782834,4.91476009 C111.16323,-0.155833631 118.014111,-1.52600976 123.084704,1.85438606 C128.155298,5.23478187 129.525474,12.0856625 126.145078,17.1562562 L64.5253312,123.085877 C60.662855,128.879591 52.465466,129.691293 47.5417556,124.767582 L3.23188204,89.4577087 C-1.07729401,85.1485327 -1.07729401,78.1619779 3.23188204,73.8528018 C7.54105809,69.5436258 14.5276129,69.5436258 18.8367889,73.8528018 L53.6283699,99.643429 L107.782834,4.91476009 Z"
|
||||
id="Path-4"
|
||||
|
|
Loading…
Reference in New Issue