Add comment field that is shown on account hover. Update discord link

This commit is contained in:
Calli
2023-09-28 16:57:37 +03:00
parent d4e3ed978e
commit d2b66eb193
7 changed files with 47 additions and 28 deletions

View File

@@ -7,7 +7,7 @@ import { styled, useTheme } from "@mui/material/styles";
import React from "react";
import { CharacterDialog } from "./CharacterDialog";
import { AccessToken } from "@/types";
import { Box, Button } from "@mui/material";
import { Box, Button, Tooltip } from "@mui/material";
import { EVE_IMAGE_URL } from "@/const";
import { CharacterContext } from "@/app/context/Context";
@@ -38,30 +38,32 @@ export const CharacterRow = ({ character }: { character: AccessToken }) => {
updateCharacter={updateCharacter}
closeDialog={() => setSelectedCharacter(undefined)}
/>
<Box
display="flex"
flexDirection="column"
maxWidth={120}
onClick={() => setSelectedCharacter(character)}
>
<Image
src={`${EVE_IMAGE_URL}/characters/${character.character.characterId}/portrait?size=128`}
alt=""
width={theme.custom.cardImageSize}
height={theme.custom.cardImageSize}
style={{ marginBottom: "0.2rem", borderRadius: 8 }}
/>
<Button
style={{
padding: 6,
fontSize: theme.custom.smallText,
lineHeight: 1,
}}
variant="outlined"
<Tooltip title={character.comment}>
<Box
display="flex"
flexDirection="column"
maxWidth={120}
onClick={() => setSelectedCharacter(character)}
>
{character.character.name}
</Button>
</Box>
<Image
src={`${EVE_IMAGE_URL}/characters/${character.character.characterId}/portrait?size=128`}
alt=""
width={theme.custom.cardImageSize}
height={theme.custom.cardImageSize}
style={{ marginBottom: "0.2rem", borderRadius: 8 }}
/>
<Button
style={{
padding: 6,
fontSize: theme.custom.smallText,
lineHeight: 1,
}}
variant="outlined"
>
{character.character.name}
</Button>
</Box>
</Tooltip>
</StackItem>
);
};